Delete Profile (GDPR)
Permanently delete one of your brand's profiles, and (by default) its events + sessions.
DELETE /cdp/profiles/{id} permanently deletes ONE profile. With ?withData=true (the
default) it ALSO purges the profile’s events and sessions — the GDPR erasure semantics.
This is IRREVERSIBLE — there is no undo. To guard against an accidental erase you MUST
pass ?confirm=true; without it the request is rejected before anything is deleted. A
missing or out-of-scope profile returns 404 with zero effect (missing and out-of-scope are
indistinguishable by design). The route is tightly rate-limited so a runaway script cannot
mass-delete, and every deletion writes an immutable audit record.
Every delete is bound to your brand's shop scope. See Tenant Isolation & Scope.
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
profileId | string | Yes | — | Path parameter ({id}) — the Unomi profile id to delete. (Not a query parameter.) |
withData | boolean | No | true | Query parameter (?withData=) — true (default) also purges the profile’s events + sessions; false deletes only the profile document. |
confirm | true | Yes | — | Query parameter (?confirm=true) — REQUIRED. Acknowledges the IRREVERSIBLE effect; the request is rejected without it. |
Response
The 200 response body:
| Field | Type | Description |
|---|---|---|
profileId | string | |
withData | boolean | |
deleted | boolean | |
status | 'deleted' | |
scope | string | Your brand's resolved shop domain. |
Errors
All errors share the standard envelope { "error": string, "error_description": string }.
| Status | Code | When |
|---|---|---|
400 | bad_request | The confirm=true guard is missing, or the input failed validation. |
401 | unauthorized | Missing or invalid API credential. |
403 | forbidden | No connected Shopify integration resolves a scope for the brand. |
404 | not_found | No such profile in your brand scope (missing or out-of-scope). |
405 | method_not_allowed | The request used a method other than DELETE. |
429 | rate_limited | Too many privacy requests for this brand — retry shortly. |
502 | upstream_error | The CDP rejected the delete. |
503 | upstream_unavailable | The CDP is temporarily unavailable — retry. |
500 | internal_error | An unexpected error prevented the delete. |