Skip to main content
POST
Error

Body

application/json
publishable_key
string
required

uk_pk_live_… or uk_pk_test_….

anonymous_id
string

Required unless external_id is present.

locale
string

The language this person reads, as a BCP 47 tag (pt-BR, en). Sent when your page knows it — navigator.language is the usual source. Omitting it is not a claim: the environment's default_locale answers instead, and a tag this platform does not render falls through the same way. Never overwrites what is already on a contact this call did not create.

Example:

"en"

name
string
attribution
object

First touch, captured on the visitor at first load and preserved through a merge. All fields optional; empty means unknown.

external_id
string

Your own user id for this person. Proven by hash; without one the session is minted unverified.

email
string<email>

Stored as an attribute. Never an identity edge on this route.

hash
string

hex(HMAC-SHA256(identity_secret, external_id)). Computed on the developer's server, never in the browser.

Response

The contact already existed.

contact
object

One of the developer's own users — anonymous or identified.

token
string

Contact session token, uk_ct_….

expires_at
string<date-time>
environment
enum<string>

The publishable key's environment.

Available options:
live,
test
verified
boolean

True only when a valid HMAC hash proved the external_id.

flags
object

The feature flags evaluated for this contact at the mint, keyed by flag key — the first read the page would otherwise make. Present when the environment has flags.