curl -X POST https://api.open.cx/connect/threads/order_84421/tokens \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "participant_id": "cus_991" }'
{
"token": "cntk_eyJhbGciOiJIUzI1NiJ9...",
"expires_at": "2026-07-31T14:05:00Z"
}
Connect
Create a participant token
Mint a short-lived scoped token for one participant to power the drop-in thread component or a headless WebSocket — their lanes and language only.
POST
/
connect
/
threads
/
{thread_id}
/
tokens
curl -X POST https://api.open.cx/connect/threads/order_84421/tokens \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "participant_id": "cus_991" }'
{
"token": "cntk_eyJhbGciOiJIUzI1NiJ9...",
"expires_at": "2026-07-31T14:05:00Z"
}
Mint a client token for one participant. Pass it to the
<ConnectThread> component or use it to open the thread WebSocket for a custom UI. The token grants exactly that participant’s view: their lanes, their language, read/send only while the thread accepts messages.
Tokens expire after 24 hours by default — mint them server-side when your app opens the order screen, not at order creation.
Path
string
required
Thread ID (
th_…) or your reference.Request
string
required
Participant ID (
prt_…) or their external_id.number
default:"86400"
Token lifetime, max 7 days.
Response
string
The scoped participant token.
string
ISO 8601 expiry.
curl -X POST https://api.open.cx/connect/threads/order_84421/tokens \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "participant_id": "cus_991" }'
{
"token": "cntk_eyJhbGciOiJIUzI1NiJ9...",
"expires_at": "2026-07-31T14:05:00Z"
}
Was this page helpful?