Welcome to Encatch Docs
Admin API ReferenceUsers

Delete Users

Queue deletion or anonymization for up to 1000 users with POST /v2/admin/users/delete.

Delete or anonymize users and their associated data from your backend. The request is asynchronous: users are queued with a 5-minute undo window (cancel from Job status in the admin panel), then a batch job removes data.

The API always returns 202 with a requestId. Names are queued for the consumer; users not in the project or already being deleted are handled in Job status (not in this response body). Authenticate with an admin API key. Admin API rate limits apply separately from SDK limits.

POSThttps://api.encatch.com/engage-product/encatch/api/v2/admin/users/delete

Authentication

X-Api-KeystringRequired

Admin (secret) API key

Content-TypestringRequired

Request body format

application/json

Publishable SDK keys receive 403 (publishable API keys cannot call /v2/admin routes).

Server-side only

Keep admin API keys on your server. Never ship them in client code.

Request body

Maximum body size: 512 KB (413 if larger).

userNamesstring[]Required

External user ids (userName used with identify-user), 1–1000 values. Each value 1–255 characters, no empty strings. Duplicates are removed (first occurrence kept). Names are used exactly as sent (not trimmed).

modestringRequired

DELETE removes users and their responses. ANONYMIZE removes users and keeps responses without identity.

DELETEANONYMIZE

Examples

cURL
curl -X POST 'https://api.encatch.com/engage-product/encatch/api/v2/admin/users/delete' \
  -H 'X-Api-Key: YOUR_ADMIN_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "userNames": ["alice@example.com", "bob@example.com"],
    "mode": "DELETE"
  }'

Success response

202JSONResponse
{ "requestId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8" }
requestIdstringRequired

Id of the queued delete job. Use Job status in the dashboard to monitor progress or undo within 5 minutes.

Errors

These are specific to Delete Users. Shared errors include invalid or missing API key (401), publishable key on admin routes (403), rate limits (429), and sanitized 500 responses.

400Error
{
  "status": 400,
  "error": "Bad Request",
  "message": "Validation error: mode must be DELETE or ANONYMIZE"
}
StatusWhen
400Missing userNames or mode; empty userNames; empty name in list; more than 1000 names; name longer than 255 characters; mode not DELETE or ANONYMIZE
413Request body larger than 512 KB
  • Identify User: user names must match those used at identify time

Was this page helpful?