POST
/
widget
/
authenticate-user
curl --request POST \
  --url https://api.open.cx/widget/authenticate-user \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "jhon@example.com",
  "name": "John Doe",
  "avatar_url": "https://example.com/avatar.png",
  "phone": "+1234567890",
  "language": "en",
  "customData": {
    "customKey": "customValue"
  },
  "chat_context": "<string>",
  "http_action_overrides": {
    "query_params": {},
    "path_params": {},
    "headers": {}
  }
}'
{
  "token": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
email
string
required

The email of the user to authenticate

Example:

"jhon@example.com"

name
string

The name of the user to authenticate

Example:

"John Doe"

avatar_url
string | null

The URL of the user's avatar

Example:

"https://example.com/avatar.png"

phone
string

contact's phone number including the conutry code

Example:

"+1234567890"

language
enum<string>

The user's language

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
customData
object

Custom data

Example:
{ "customKey": "customValue" }
chat_context
string

Optional context to be given to the AI agent when responding to this user.

http_action_overrides
object

HTTP parameter overrides to be used when executing actions for this user. Overrides org-level parameters, but is overridden by parameters passed when sending a message.

Response

201
application/json
token
string
required

The JWT token to use for further requests