Skip to content
Get started

Export calls history

client.call.export(CallExportParams { filters, offset, include_metadata, include_structured_output_fields } body, RequestOptionsoptions?): CallExportResponse { csv, filename, next_offset }
POST/call/export

Export a list of call attempts as a CSV file. Large exports are split into several files of at most 4MB each: when the response carries a non-null next_offset, call the endpoint again with that value as offset to get the next file.

ParametersExpand Collapse
body: CallExportParams { filters, offset, include_metadata, include_structured_output_fields }
filters: Filters
assignee_ids: Array<string>
assistant_ids: Array<string>
campaign_ids: Array<string>
directions: Array<"inbound" | "outbound">
One of the following:
"inbound"
"outbound"
from_phone_numbers: Array<string>
outcomes: Array<"not_interested" | "interested" | "completed" | 2 more>
One of the following:
"not_interested"
"interested"
"completed"
"requested_callback_later"
"none"
page: number
minimum1
maximum9007199254740991
page_size: number
minimum1
maximum50000
results: Array<"IVR" | "voicemail" | "human" | 3 more>
One of the following:
"IVR"
"voicemail"
"human"
"unknown"
"ios-screening-filter"
"none"
statuses: Array<"initializing" | "queued_for_calling" | "calling" | 7 more>
One of the following:
"initializing"
"queued_for_calling"
"calling"
"post_processing"
"not_launched"
"scheduled"
"paused"
"completed"
"cancelled"
"errored"
call_ids?: Array<string>
query?: string
sort_by?: string
sort_direction?: "asc" | "desc"
One of the following:
"asc"
"desc"
to_phone_number?: string
offset: number

Number of already-exported rows to skip, within the filters’ page/page_size window. Pass the next_offset value from the previous response to fetch the next file of a split export.

minimum0
maximum9007199254740991
include_metadata?: boolean

Whether to include the metadata in the CSV file. These are the fields you (optionally) attached when placing the call.

include_structured_output_fields?: boolean

Whether to include the structured output fields in the CSV file. These are generated by our AI agent during call analysis phase.

ReturnsExpand Collapse
CallExportResponse { csv, filename, next_offset }
csv: string
filename: string
next_offset: number | null

Non-null when the export was split because this file reached the 4MB cap: pass it as offset in a follow-up call to get the next file. Null when this file completes the export.

minimum-9007199254740991
maximum9007199254740991

Export calls history

import Revox from '@revoxai/sdk';

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

const response = await client.call.export({
  filters: {
    assignee_ids: ['string'],
    assistant_ids: ['string'],
    campaign_ids: ['string'],
    directions: ['inbound'],
    from_phone_numbers: ['string'],
    outcomes: ['not_interested'],
    page: 1,
    page_size: 1,
    results: ['IVR'],
    statuses: ['initializing'],
  },
  offset: 0,
});

console.log(response.csv);
{
  "csv": "csv",
  "filename": "filename",
  "next_offset": -9007199254740991
}
Returns Examples
{
  "csv": "csv",
  "filename": "filename",
  "next_offset": -9007199254740991
}