Identify visitors
POST /api/v1/analytics/identify associates an anonymous visitor with your external user identifier. A key requires events:write.
{
"userId": "user_demo_42",
"anonymousId": "example-visitor",
"traits": { "plan": "pro" }
}
userId is required; include the anonymousId of the same visitor to link the anonymous activity. Minimize traits and send only fields you are entitled to process.
A COLLECT key can receive 204 No Content because it cannot read profiles. Do not parse a JSON profile after a 204 response. A caller with the relevant read permission may receive a 200 profile response.
Do not use identify as an erasure request. Stored-data export and erasure use the application's authorized privacy workflow. An accepted erasure request is not proof that deletion has completed.