Delete customer data
Call Create agent first and replace the example agent ID with its returned ID.
/agent/v1/agents/{agent_id}/customers/{customer_id}● SupportedRequest parameters
agent_idstringrequiredpath: Active service agent id from agent creation or listing. Also accepts an 8-character identity number (0–9, A–Z); malformed, absent and foreign references return 404, and response ids always use agent_….
customer_idstringrequiredpath: Customer id from customer listing, or your own customer_id.
confirmstringrequiredquery: Must equal the customer_id path parameter exactly, confirming the destructive deletion.
Returns
202
Develop only. Set confirm to the exact customer id; a missing or different confirm returns 400 naming the value to send. Returns 202 with a pending task id; poll the deletion endpoint. Concurrent requests reuse the unfinished task; retry DELETE after failure to resume it. Tokens are revoked and the customer is blocked before a seven-day recovery snapshot is verified; sessions including child sessions, conversation data, grants and feedback are then removed. A block that existed before stays; a temporary block is removed on success. File attachments are retained. Example: DELETE /agent/v1/agents/agent_example/customers/cus_8f2a91?confirm=cus_8f2a91.
Errors follow the Anthropic error format (type / message / request_id) — see error codes
Request
curl
# Call Create agent first and replace the example agent ID with its returned ID.
curl -X DELETE "https://api.deepraxis.com/agent/v1/agents/agent_123/customers/docs-sample?confirm=docs-sample" \
-H "Authorization: Bearer $PRAXIS_API_KEY"Python
# Call Create agent first and replace the example agent ID with its returned ID.
import requests
opts = dict(
base_url="https://api.deepraxis.com/agent",
api_key="$PRAXIS_API_KEY",
)
# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.delete(
f"{opts['base_url']}/v1/agents/agent_123/customers/docs-sample?confirm=docs-sample",
headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())TypeScript
// Call Create agent first and replace the example agent ID with its returned ID.
const opts = {
baseURL: "https://api.deepraxis.com/agent",
apiKey: "$PRAXIS_API_KEY",
};
// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/agents/agent_123/customers/docs-sample?confirm=docs-sample`, {
method: "DELETE",
headers: { Authorization: `Bearer ${opts.apiKey}`, "Content-Type": "application/json" },
});
console.log(resp.status, await resp.json());Response 202
{
"id": "eud_8a5f88fd-efbd-4475-bdc9-ec4e140bba01",
"status": "pending"
}Response
HTTP 202
Deletion accepted; poll the deletion endpoint until done or failed.
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Deletion task identifier. |
| status | string | Accepted for asynchronous processing; poll deletion for progress. |
Before running the example
Create a service agent and sign your own test customer docs-sample in with a grant code from the Customer face (/customer/v1); replace agent_123. Block the customer before testing unblock. For deletion, confirm must equal the customer ID. Revoke tokens and delete the test customer’s data after testing, then archive the agent.