Skip to content
Get started

Get calls

client.call.list(CallListParams { page, page_size, statuses } query, RequestOptionsoptions?): CallListResponse { calls }
GET/call

Retrieve a paginated list of call attempts. Each entry includes the call status, phone number, assistant used, transcript, and timestamps. Use the page and page_size query parameters to navigate through results.

ParametersExpand Collapse
query: CallListParams { page, page_size, statuses }
page: number

The page number you want to get. Starting at 0.

minimum1
maximum9007199254740991
page_size: number

The number of calls to return per page.

minimum1
maximum9007199254740991
statuses?: Array<"initializing" | "queued_for_calling" | "calling" | 4 more>
One of the following:
"initializing"
"queued_for_calling"
"calling"
"scheduled"
"completed"
"cancelled"
"errored"
ReturnsExpand Collapse
CallListResponse { calls }
calls: Array<Call>
id: string

The ID of the call attempt.

answered_at: unknown

The time the call was answered.

dial_error: "number_non_attributed" | "too_many_calls" | "busy" | 5 more | null

The SIP error that occurred.

One of the following:
"number_non_attributed"
"too_many_calls"
"busy"
"temporarily_unavailable"
"no_answer"
"no_international_permission"
"precondition_failed"
"non_classified_error"
ended_at: unknown

The time the call ended.

phone_number: string

The phone number that was called. Formatted in E.164 format. Example: +1234567890

recording_url: string | null

The URL of the audio recording of the call.

result: "IVR" | "voicemail" | "human" | 2 more | null
One of the following:
"IVR"
"voicemail"
"human"
"unknown"
"ios-screening-filter"
started_at: unknown

The time the call started.

status: "queued" | "ringing" | "ongoing" | 2 more

The status of the call attempt.

One of the following:
"queued"
"ringing"
"ongoing"
"completed"
"error"
end_reason?: string | null

Reason for ending the call when ended_by is 'agent'. E.g. 'tool_end_call', 'voicemail', 'transfer', 'ivr_no_navigate'.

ended_by?: "agent" | "user" | "system" | null

Who ended the call: 'agent' (AI agent), 'user' (caller/callee hung up), or 'system' (e.g. max duration limit).

One of the following:
"agent"
"user"
"system"
structured_output?: Record<string, unknown> | null

The data extracted from the call, using the structured output config from the parent call object.

transcript?: Array<Transcript> | null

The transcript of the call.

content: string
role: "user" | "assistant" | "tool"
One of the following:
"user"
"assistant"
"tool"
tool_arguments?: Record<string, unknown> | string
One of the following:
Record<string, unknown>
string
tool_is_error?: boolean
tool_name?: string

Get calls

import Revox from '@revoxai/sdk';

const client = new Revox({
  apiKey: process.env['REVOX_API_KEY'], // This is the default and can be omitted
});

const calls = await client.call.list({ page: 1, page_size: 1 });

console.log(calls.calls);
{
  "calls": [
    {
      "id": "id",
      "answered_at": {},
      "dial_error": "number_non_attributed",
      "ended_at": {},
      "phone_number": "phone_number",
      "recording_url": "recording_url",
      "result": "IVR",
      "started_at": {},
      "status": "queued",
      "end_reason": "end_reason",
      "ended_by": "agent",
      "structured_output": {
        "foo": "bar"
      },
      "transcript": [
        {
          "content": "content",
          "role": "user",
          "tool_arguments": {
            "foo": "bar"
          },
          "tool_is_error": true,
          "tool_name": "tool_name"
        }
      ]
    }
  ]
}
Returns Examples
{
  "calls": [
    {
      "id": "id",
      "answered_at": {},
      "dial_error": "number_non_attributed",
      "ended_at": {},
      "phone_number": "phone_number",
      "recording_url": "recording_url",
      "result": "IVR",
      "started_at": {},
      "status": "queued",
      "end_reason": "end_reason",
      "ended_by": "agent",
      "structured_output": {
        "foo": "bar"
      },
      "transcript": [
        {
          "content": "content",
          "role": "user",
          "tool_arguments": {
            "foo": "bar"
          },
          "tool_is_error": true,
          "tool_name": "tool_name"
        }
      ]
    }
  ]
}