Get the current user
Returns the user bound to the calling session token. Designed for browser-side preference-centre flows: pass a publishable key (pk_…) plus a user session token (see POST /users/{userId}/sessions) in the X-Spotzee-User-Token header. A project-scoped key on this endpoint is rejected to keep semantics clear.
Authorizations
Project-scoped publishable key (pk_…). Safe for browser use. Allowed only on a strict allow-list of endpoints.
Short-lived signed token that scopes the call to one user. Mint via POST /users/{userId}/sessions (sk_-only). Required alongside a publishable key on the preference-centre endpoints.
Response
The user bound to the session token.
A customer record being marketed to. Owned by a project; identified by external_id.
Numeric identifier. Use external_id as the stable cross-system reference.
1024
Identifier of the project this user belongs to.
42
Stable identifier supplied by the calling system. Treated as the user’s primary key for upserts.
"cust-9f4b21"
Time the user was first created. ISO 8601.
"2026-04-28T05:14:00.000Z"
Time the user was last modified. ISO 8601.
"2026-04-28T05:14:00.000Z"
Anonymous tracking identifier captured before the user was identified, when available.
"anon-2c8a3e"
User’s email address. Format-validated on write.
"jane@example.com"
User’s phone number in E.164 format on read.
"+61400123456"
IANA timezone used for time-of-day delivery scheduling.
"Australia/Sydney"
BCP-47 locale used for content rendering.
"en-AU"
Free-form custom attributes attached to the user. Used in segmentation and template rendering.
True when the user has at least one registered push device.
Registered push devices, when included.