User identification
Create Organization-scoped identities and aliases.
Identities belong to the Organization, not to a single Project. Use your own stable user identifier and optional aliases:
await client.identify({
user_id: 'user_123',
properties: {
email: 'john@example.com',
plan: 'pro',
},
aliases: ['john@example.com'],
});
Identifying the same user_id again merges the new properties into the
stored ones: new values replace old ones, and keys you leave out are kept. An
alias moves to the identity that claimed it most recently. The response lists
the aliases this call newly claimed.
An event can use the canonical identifier or an alias in userId. To erase a
user, call DELETE /v1/identities/{user_id} with the canonical identifier (see
Erasing a user).