Skip to main content
POST
Authenticate a widget user by your own user id
Call this endpoint from your backend with an API key that has the widget:write scope. It returns the same verified token as Authenticate contact. Pass that token to the widget through user.token.
  • Matching: the contact is found by external_id alone. Email and phone are optional details on the contact: they can change, and several contacts can share them.
  • First call: a new contact is created with the external_id and the details you send, even when another contact already has the same email or phone.
  • Later calls: the contact with that external_id is updated with the details you send, such as a new email or phone.
  • Other ways in: email, phone, and messaging channels, and Authenticate contact, keep identifying people by email or phone. They never match a contact that has an external_id, so a message from the same address belongs to a separate contact.
  • Validation: external_id is required, can’t be blank, and is at most 255 characters.
The other fields match Authenticate contact, including http_action_overrides for your AI actions and mcp_access for personal connections. external_id identifies the contact. It is different from the widget’s user.externalId option, which only scopes session history in the browser.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
external_id
string
required

The user's stable id in your system. The contact is matched by this id alone, so email and phone can change or be shared with other contacts.

Required string length: 1 - 255
email
string<email>
Pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
mcp_access
object
name
string
avatar_url
string | null
phone
string
language
enum<string>
Available options:
en,
fr,
de,
nl,
pl,
pt,
es,
it,
ru,
ja,
ko,
zh,
ar,
tr,
sv,
da,
no,
fi,
el,
cs,
hu,
th,
vi,
id,
he,
hi,
uk,
ro,
bg,
hr,
sk,
sl,
sr,
et,
lv,
lt,
is,
ga,
ms,
tl,
fa,
bn,
ta,
te,
ur,
sw,
zu,
af,
sq,
hy,
az,
eu,
be,
bs,
ca,
cy,
ku,
ckb,
kmr
customData
object
chat_context
string
http_action_overrides
object

Response

Default Response

token
string
required

The JWT token to use for further requests

contact
object
required