CDP REST APIAPI Reference
Export Profile (Data Portability)
Export one of your brand's profiles — its properties, events, and sessions — as JSON.
GET /cdp/profiles/{id}/export returns ONE profile’s full record — the profile document, its
events, and its sessions — as a single JSON payload for GDPR data portability. This is a READ
(it changes nothing), all scope-bound to your brand.
The export is synchronous and capped at 10000 events. A profile with more events
returns 413 — page them instead via GET /cdp/profiles/{id}/events. (Async export jobs are
out of scope.)
Every export 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 export. (Not a query parameter.) |
maxEvents | number | No | 10000 | Query parameter (?maxEvents=) — synchronous event cap; omit for the default (10000). Over the cap returns 413. |
Response
The 200 response body:
| Field | Type | Description |
|---|---|---|
profileId | string | |
profile | string | The profile document (itemId, properties, segments, …). |
events | string[] | The profile's event documents, scope-bound (newest first). |
sessions | string[] | The profile's session documents, scope-bound. |
eventCount | number | Total in-scope event count included in the export. |
status | 'exported' | |
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 maxEvents value 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 GET. |
413 | payload_too_large | The profile has more than 10000 events — page them via GET /cdp/profiles/{id}/events. |
502 | upstream_error | The CDP rejected the export read. |
503 | upstream_unavailable | The CDP is temporarily unavailable — retry. |
500 | internal_error | An unexpected error prevented the export. |