POST /v1/identify
POST /v1/identify — link an anonymous_id to a user_id.
Bind a known user_id to the visitor's anonymous_id. Persists as a special $identify event so future analysis can stitch pre- and post-login behavior together.
Auth
Required scope
ingest
Key kinds
pk_* · sk_*
Request
POST /v1/identify
Authorization: Bearer {key}
Content-Type: application/json{
"anonymous_id": "u_abc",
"user_id": "user_42",
"traits": { "email": "matt@example.com", "plan": "pro" }
}anonymous_id
yes
The pseudonymous id the visitor's browser/server has been using.
user_id
yes
Your stable internal user id.
traits
no
Free-form attributes about the user, stored on the $identify event's properties.
Response
How it integrates
After /v1/identify:
Subsequent events should include
"user_id"on eachtrackcall. The SDK does this automatically once you callidentify().Historical events for the same
anonymous_idremain — they're not retroactively rewritten. Joins for user-level analysis use the$identifyevent as a stitch point.The
sessions_vview seesuser_idon the$identifyevent itself; running totals per user are easy.
Example query: time-to-conversion per user
Last updated
Was this helpful?