Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

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

Path Parameters

agentId
string<uuid>
required

Body

application/json
allowedOrigins
string[]
required

The origins the token may be spent from, exactly as the browser sends them: https only (http on localhost for development), no paths or wildcards.

Required array length: 1 - 10 elements
Required string length: 1 - 255
Example:
ttlSeconds
integer

How long the token can be spent for, in seconds. Default 120.

Required range: 30 <= x <= 600
Example:

120

modality
enum<string>
default:call

What the token opens: call for a voice session, chat for a text chat. A token opens only that kind. Default call.

Available options:
call,
chat
Example:

"chat"

Response

The client token.

data
object
required