Deployments.ai Docs
Runtime

Permanently erase every thread of one end user in the environment

POST /v1/end-users/erasures · SDK eraseEndUser · CLI deployments end-user erase

POST
/v1/end-users/erasures

Requires end-users:erase. A suspended organization can still call it, except while an abuse hold preserves evidence.

Authorization

headerAuthorizationBearer <token>

Opaque bearer credential scoped to one service account and tenant.

Header Parameters

x-deployments-environment?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-organization?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-project?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Request Body

application/json
  1. body
endUserId*string
Length1 <= length <= 256

Response Body

ConversationErasureResponse

application/json
  1. response
erasure*
curl -X POST "https://example.com/v1/end-users/erasures" \  -H "Content-Type: application/json" \  -d '{    "endUserId": "string"  }'
{  "erasure": {    "completedAt": "2019-08-24T14:15:22Z",    "counts": {      "automationsArchived": 0,      "emailMessagesErased": 0,      "emailThreadsErased": 0,      "ingressRecordsDeleted": 0,      "memoriesErased": 0,      "objectsStaged": 0,      "recordsDeleted": 0,      "runsCanceled": 0,      "streamsDeleted": 0,      "threadsErased": 0,      "threadsPlanned": 0    },    "createdAt": "2019-08-24T14:15:22Z",    "environmentId": "string",    "error": {      "code": "string",      "message": "string"    },    "id": "string",    "kind": "end-user",    "phase": "planning",    "status": "canceled",    "threadId": "string",    "updatedAt": "2019-08-24T14:15:22Z"  }}