Skip to main content
POST
/
connect
/
token
Create end-user-scoped connect session token (called by customer backend)
curl --request POST \
  --url http://localhost:5001/api/v1/connect/token \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "endUserId": "user-123",
  "endUserDisplayName": "Jane Doe",
  "endUserEmail": "jane@example.com"
}
'
{
  "data": {
    "token": "ct_a1b2c3d4e5f6...",
    "expiresAt": "2026-03-11T12:10:00.000Z"
  }
}

Authorizations

Authorization
string
header
required

Enter your API key with the Bearer prefix — e.g. Bearer sk_live_xxx (production) or Bearer sk_test_xxx (sandbox)

Body

application/json
endUserId
string
required

Required. Your internal ID for this end user. Used to scope connections and create/upsert the end_users record. Must be unique per user in your system.

Example:

"user-123"

endUserDisplayName
string

Optional display name shown in the Connect widget header.

Example:

"Jane Doe"

endUserEmail
string

Optional email address for the end user.

Example:

"jane@example.com"

Response

Connect token created successfully. Pass the token to RouteMCPConnect.open({ token }) in the browser.

data
object
required