Anonymize Profile (GDPR)
Strip personal identifiers from one of your brand's profiles, keeping its behavioral data.
POST /cdp/profiles/{id}/anonymize strips the personal-identifier properties (email, phone,
name, …) from ONE profile while KEEPING its behavioral and event history — the "forget who,
keep the behavior" half of the privacy toolkit.
This is IRREVERSIBLE — the removed identifiers cannot be restored. To guard against an
accidental call you MUST send { "confirm": true } in the body; without it the request is
rejected before anything changes. A missing or out-of-scope profile returns 404 with zero
effect. The route is tightly rate-limited and every anonymization writes an immutable audit
record.
Every anonymize 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 anonymize. (Not a query parameter.) |
confirm | true | Yes | — | Body field — REQUIRED, must be true. Acknowledges the IRREVERSIBLE effect; the request is rejected without it. |
Response
The 200 response body:
| Field | Type | Description |
|---|---|---|
profileId | string | |
status | 'anonymized' | |
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, the body is not valid JSON, 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 POST. |
429 | rate_limited | Too many privacy requests for this brand — retry shortly. |
502 | upstream_error | The CDP rejected the anonymize. |
503 | upstream_unavailable | The CDP is temporarily unavailable — retry. |
500 | internal_error | An unexpected error prevented the anonymize. |