Skip to content

Issue a one-time WebSocket auth token

POST
/api/canvas/{deal_id}/ws-token
curl --request POST \
--url https://example.com/api/canvas/example/ws-token \
--header 'Authorization: Bearer <token>'

Exchanges a valid JWT for a short-lived (60s) one-time token suitable for use in the WebSocket URL query string. The token is consumed on first use and cannot be reused.

deal_id
required
Deal Id
string

Successful Response

Media type application/json
WsTokenResponse

Short-lived token for WebSocket authentication.

object
ws_token
required
Ws Token
string
expires_in_seconds
required
Expires In Seconds
integer
Example generated
{
"ws_token": "example",
"expires_in_seconds": 1
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}