List calls
GET
/v1/calls
const url = 'https://your-machine.your-tailnet.ts.net/v1/calls?state=queued&direction=outgoing&limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://your-machine.your-tailnet.ts.net/v1/calls?state=queued&direction=outgoing&limit=50' \ --header 'Authorization: Bearer <token>'Newest first. To page, pass the previous response’s nextBefore as before.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”deviceId
string
state
string
direction
string
before
string format: date-time
Only calls created before this time (ISO 8601).
limit
integer
Responses
Section titled “Responses”A page of calls.
Media typeapplication/json
object
calls
required
Array<object>
object
id
required
string
deviceId
required
string
remoteNumber
required
string
direction
required
string
state
required
string
nativeCallId
string
webhookUrl
string format: uri
metadata
object
key
additional properties
any
stream
Your agent’s WebSocket. The gateway connects to it when the call is answered.
object
url
required
ws:// or wss://.
string
format
raw: 16 kHz s16le binary frames. twilio: Twilio Media Streams JSON with 8 kHz mu-law,
compatible with Twilio integrations such as Pipecat’s.
string
parameters
Sent to your agent in the start message (Twilio customParameters).
object
key
additional properties
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
answeredAt
string format: date-time
endedAt
string format: date-time
nextBefore
required
Pass as before for the next page; null on the last page.
string | null format: date-time
Example
{ "calls": [ { "remoteNumber": "+919876543210", "direction": "outgoing", "state": "queued", "stream": { "url": "wss://agent.example.com/ws", "format": "raw" } } ]}The request didn’t validate.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
issues
Validation details
Array
Example
{ "error": { "code": "VALIDATION_ERROR", "message": "invalid request", "issues": [] }}Missing or invalid API key.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
issues
Validation details
Array
Example
{ "error": { "code": "UNAUTHORIZED", "message": "invalid API key or session" }}