Skip to main content
POST
/
api
/
v1
/
relay
/
register
Register Relay Instance
curl --request POST \
  --url https://api.example.com/api/v1/relay/register \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_session_id": "<string>",
  "client_kind": "web"
}
'
{
  "user_session_id": "<string>",
  "relay_token": "<string>",
  "relay_token_expires_in": 123,
  "relay_ws_path": "<string>",
  "relay_heartbeat_interval_sec": 123
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Request to register a new relay client for a user session.

user_session_id
string
required

Identifier of the user session the relay client will operate within.

client_kind
enum<string> | null
default:web

Identifies the caller type (cli, web, mobile, or voice).

Available options:
cli,
web,
mobile,
voice

Response

Successful Response

Response containing relay connection credentials after registration.

user_session_id
string
required

Identifier of the user session scoped to this relay token.

relay_token
string
required

Short-lived relay token for websocket authentication.

relay_token_expires_in
integer
required

Seconds until the relay token expires.

relay_ws_path
string
required

WebSocket path for the relay endpoint.

relay_heartbeat_interval_sec
integer
required

Heartbeat interval clients should respect.