Web Tracking Keys
Mint Web Tracking Identity
Mint a short-lived proof that lets the browser SDK attach events to one authenticated contact
POST
Mint Web Tracking Identity
Call this endpoint from your authenticated backend after you know the current
user’s email. It returns a short-lived token bound to the workspace, web
tracking key, normalized email, and expiry.
Never call this endpoint from browser code or expose the secret API key used to
authorize it. A publishable tracking key alone may append anonymous activity,
but cannot attach events to a subscriber or trigger automation.
If the email is not yet a contact in your workspace, minting creates one so the
identified events have somewhere to land - otherwise they would be accepted and
then silently dropped. The contact is created active with no list memberships
and without triggering any automations; enroll it through your usual flows when
you want more than event attribution. If the email cannot be added as a contact
(for example a suppressed or undeliverable address), the request fails with a
400 and no token is minted.
Requires
Pass the returned token to the browser and identify the same email:
commerce:write, automations:trigger, and subscribers:write (minting can create the contact).
Request
Identify the key by eitherkeyId or publicKey. The publishable key is the
value in your snippet and in the dashboard, so it is usually the one your
backend already has.
string
Publishable key value (
seq_pk_...) of an active web tracking key. Provide
this or keyId.string
Internal ID of an active web tracking key. Provide this or
publicKey.string
required
Email of the user authenticated by your backend. It is normalized to
lowercase.
number
Token lifetime from 1 minute through 30 days. Defaults to 24 hours. Mint a
fresh token when the user signs in or reaches checkout; request a longer
lifetime only when re-minting is genuinely impossible.
Response
Mint Web Tracking Identity