Skip to content
WebRTC

POSThttps://core-api.heysadie.ai/webrtc-call/connect

phoneNumber firstMessage token url room success error code message details field metadata timestamp version path

Create WebRTC session

Try it in the API Explorer

Example request

Terminal
curl -X POST "https://core-api.heysadie.ai/webrtc-call/connect" \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumber": "string"
  }'

Authentication

Authenticate with an API key in the Authorization header using the ApiKey scheme — see Authentication for how keys work and where to get them.

Authorizationstringrequired

API key in the ApiKey scheme: ApiKey YOUR_API_KEY. Tenant keys authorize their own tenant; organization keys can act on any tenant in the organization.

X-Tenant-Idstring (uuid)optional

Required when authenticating with an organization key — selects the tenant the request acts on. Omit with tenant keys.

Request

Body application/json · required

phoneNumberstringrequired

E.164-formatted phone number owned by the calling tenant (8–16 chars, e.g. +15555550123).

firstMessagestringoptional

Optional greeting the agent speaks at the start of this WebRTC call, overriding the assistant's saved first message. Omit (or send empty) to use the saved greeting.

Responses

200
tokenstringrequired

Short-lived (10 min) LiveKit access token. Pass to the browser SDK to join the dispatched room.

urlstringrequired

LiveKit project URL the browser SDK should connect to (e.g. wss://<project>.livekit.cloud).

roomstringrequired

Server-generated room name (`webrtc-<uuid>`) the agent has been dispatched into.

400
successbooleanrequired
errorobjectoptional
Show 3 child properties
codeenumrequired
Allowed values:"VALIDATION_ERROR"
messagestringrequired
detailsobject[]optional
Show 2 item properties
fieldstringrequired
messagestringrequired
metadataobjectoptional
Show 3 child properties
timestampstringrequired
versionstringrequired
pathstringoptional
401
successbooleanrequired
errorobjectoptional
Show 2 child properties
codeenumrequired
Allowed values:"UNAUTHORIZED"
messagestringrequired
metadataobjectoptional
Show 3 child properties
timestampstringrequired
versionstringrequired
pathstringoptional
403
successbooleanrequired
errorobjectoptional
Show 2 child properties
codeenumrequired
Allowed values:"FORBIDDEN"
messagestringrequired
metadataobjectoptional
Show 3 child properties
timestampstringrequired
versionstringrequired
pathstringoptional
404
errorenumrequired
Allowed values:"not_found"
500
successbooleanrequired
errorobjectoptional
Show 2 child properties
codeenumrequired
Allowed values:"INTERNAL_SERVER_ERROR"
messagestringrequired
metadataobjectoptional
Show 3 child properties
timestampstringrequired
versionstringrequired
pathstringoptional