Docs

Subjects & identifiers

Create subjects, add identifiers, and merge anonymous → identified.

These endpoints are `sk_` only. In the browser, POST /v1/consent already creates the subject if you pass identifiers.

Create

POST /v1/subjects
{ "identifiers": [{ "type": "EMAIL", "value": "user@example.com" }] }
→ { "subjectId": "cmtr…", "created": true }

Merge (anonymous → identified)

When an anonymous visitor (identified by cookie_id or device_id) signs in, merge their identity into the identified one:

POST /v1/subjects/merge
{ "source": "cookie_id:ck_abc", "target": "email:user@example.com", "reason": "login" }
→ { "sourceSubjectId", "targetSubjectId", "movedRecords", "movedIdentifiers" }

The source subject's identifiers and vault rows are re-pointed to the target; the source keeps a mergedIntoId pointer. Later reads by any of its identifiers resolve to the target. subject.merged is emitted.