Skip to main content
GET
Export calls as CSV
The call log as a file, filtered exactly the way List Calls is filtered. It carries the same fields as the dashboard’s Export CSV, in the same order, so a report built here and a file downloaded from the screen line up column for column. Every line under the headings is one call — there is no Total line among them, so a column sum or a pivot over the file is right as it stands. They are not byte for byte alike: this file is written for a program — fixed English headings, the API’s own values — and the dashboard’s for a person, in the reader’s language. Every difference is listed under The dashboard’s file; read the dashboard’s file by position, or map its headings, rather than matching them by name against this one. Required scope: calls:read. The file names a call’s lead only for a key that also holds leads:read: without it Lead name is empty on every row, as GET /calls reads such a key’s lead as {id} — filtering by lead_id does not bring the name back. Personal data. Lead name is not the only column that names people. Summary is what the caller said, retold, and often carries their name; the Extracted: columns hold what the call collected (a name, an email, an address); From and To are phone numbers. Holding calls:read without leads:read empties Lead name only, not these. Treat the file as personal data, as you would the calls themselves. It exists so that handing a client a month of calls stops being a join. Before it, every report meant paging GET /calls, calling GET /billing/consumption for the money and GET /dispositions for the labels, then joining the three locally — once per client, every month.

Columns

Lead name, Summary and the Extracted: columns hold text that callers, lead forms and the extraction model wrote. A value there that opens with =, +, - or @ (or a tab) is written with a leading apostrophe — '=HYPERLINK(…) — so a spreadsheet shows it rather than running it as a formula; strip one leading ' from those columns if you read the file as data. A phone number or a plain number (+972 52-577-5376, -3) is written as it is, and From / To are never changed. The first twenty-one columns always come in this order; columns are only ever added after them. The file opens with a UTF-8 byte-order mark, which is what makes a spreadsheet read Hebrew agent and disposition names as Hebrew.

Totals and the file’s name

What the calls in the file cost together is the X-Total-Cost-USD response header — dollars and cents over the rows whose cost is recorded, the same sum a column total over Cost (USD) gives — and X-Total-Rows is how many calls the file holds. Neither is a line in the file. (The file used to end with a Total line inside the data, so a column sum counted the month twice and a pivot showed a blank-agent group worth the whole month.) Content-Disposition names the file for what it holds: the filters, then the window — calls-agent-9b29b0c9-no_answer-2026-09-01_2026-09-30.csv, where the agent (and an outcome filter) is the first eight characters of its id, because names are not unique. A file filtered by carrier_account_id carries it the same way: calls-carrier-7c1e4a2b-2026-09-20_2026-09-26.csv, and one filtered by provider says which: calls-provider-external-2026-09-01_2026-09-30.csv. A window sent with only from runs to now and is named to today (calls-2026-09-01_2026-10-01.csv); one with only to is calls-until-2026-09-30.csv. With no filters and no window it is calls.csv. All three headers are exposed to browser clients, so fetch() reads them as well as curl. An agent_id this workspace does not have is 404 AGENT_NOT_FOUND (it was CALL_AGENT_UNKNOWN), exactly as on List Calls — never a file of headings that reads as this client spent $0.

The dashboard’s file

Export CSV on Call Logs writes the same fields in the same order, with one column more. What differs, heading by heading: Cost (USD), From / To, Call ID, Lead name, Summary and the Extracted: text and numbers are written the same way in both, formula guard included.

The row limit, and paging a larger export

One export carries at most 10000 calls. A window holding more is refused with 400 CALLS_EXPORT_TOO_LARGE, naming the count — it is never truncated, because a file cut short carries totals that are wrong and nothing in it says so. Page a larger export by splitting the window with from and to. A call’s start time never changes, so consecutive windows never skip one: Give each window the first day of the next month as its to, rather than guessing a last day — not every month has 31, and a date its month does not have (2026-09-31) is refused with 400 CALLS_QUERY_INVALID:
A date-only to covers that whole day (UTC) — to=2026-08-31 ends at 2026-08-31T23:59:59.999999Z — so from=2026-08-01&to=2026-08-31 then from=2026-09-01&to=2026-09-30 are two whole months that neither overlap nor leave a gap. A date-only to used to stop at midnight at the start of its day and drop that day’s calls. to is inclusive, so windows written with times meet rather than abut: a call that started at exactly that boundary midnight is written into both neighbouring files. Nothing is skipped, but the two files overlap by that one instant — when you concatenate them, drop the rows whose Started is exactly the boundary from one of the two, and expect the per-file X-Total-Cost-USD values to count such a call twice if you simply add them up. (Ending a window a second earlier trades this for the opposite risk: a call started in that second would be in neither file.) X-Total-Rows on the response carries the number of calls in the file, so you can check what you received without counting it. The file is the calls that existed the moment you asked for it. A call that starts while it is streaming belongs to your next export — it is never written into this one half-way, which is what would make X-Total-Cost-USD and X-Total-Rows disagree with the rows in the file. limit, offset, cursor and updated_since are refused here rather than ignored, with 400 CALLS_QUERY_INVALID: an export is one whole window of call starts, not a page of it and not what changed since it last ran. A file answered for updated_since would carry the whole from/to window while reading as everything that changed — the one shape this endpoint exists to refuse. To read pages, or the calls that have changed, use List Calls.

Refusals

Every filter is refused the way List Calls refuses it, so a query that works there works here — except for its paging (limit, offset, cursor) and its changed-since window (updated_since), which a file cannot answer. A filter this export does not have, a filter sent with no value, a status or direction outside its set, a from / to that is not a real ISO 8601 timestamp, and a from after to are 400 CALLS_QUERY_INVALID; an ab_variant that is not a or b is 400 INVALID_AB_VARIANT. carrier_account_id needs carrier_accounts:read (403 INSUFFICIENT_SCOPE), and an account that is not in this workspace is 404 CARRIER_ACCOUNT_NOT_FOUND, as on List Calls. provider is external, telnyx or none (400 CALLS_QUERY_INVALID otherwise), and needs no other scope. search and lead_id work and refuse exactly as on List Calls: a lead that is not in this workspace is 404 NOT_FOUND, never a file that reads as no calls with this lead, and a name in search matches leads only for a key with leads:read (agents alone for any other key). None of them is ignored — an ignored filter would answer a file that reads as no call matched.

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).

Query Parameters

agent_id
string<uuid>

Only this agent's calls. An id that is not an agent in this workspace is 404 AGENT_NOT_FOUND, as on GET /calls.

status
enum<string>

pending_connection is a browser session minted with POST /calls that no browser has connected to yet. Anything outside the list is 400 CALLS_QUERY_INVALID.

Available options:
pending_connection,
ringing,
in_progress,
completed,
failed,
no_answer,
transferred,
dnc_blocked
direction
enum<string>
Available options:
inbound,
outbound,
web_call
callee
string

Destination number in E.164.

caller
string

Source number in E.164.

ab_variant
enum<string>

Which side of a number's A/B split took the call. Anything but a or b is 400 INVALID_AB_VARIANT, exactly as on GET /calls — never an empty file that reads as "no call ran that variant".

Available options:
a,
b
disposition
string

Only calls that ended with this outcome, by its label exactly as GET /dispositions returns it. A label this workspace does not have is 404 CALL_DISPOSITION_UNKNOWN rather than an empty file.

disposition_id
string<uuid>

The same outcome filter by id. Send this or disposition, not both.

source
enum<string>
Available options:
test,
shared_link,
api,
phone_inbound,
phone_outbound
carrier_account_id
string<uuid>

Only calls on this carrier account (signed for, placed from or answered on one of its numbers), exactly as on GET /calls: needs carrier_accounts:read (403 INSUFFICIENT_SCOPE), and an account that is not in this workspace is 404 CARRIER_ACCOUNT_NOT_FOUND rather than an empty file. The file's name carries it: calls-carrier-7c1e4a2b-….csv, the first eight characters of the id.

provider
enum<string>

Only calls on this carrier, exactly as on GET /calls: external, telnyx or none (a browser call). The file's name carries it: calls-provider-external-….csv.

Available options:
external,
telnyx,
none

The same search as GET /calls - the start of a call id (8 or more characters), a phone number at either end, or part of an agent's or a lead's name. A lead's name is searched only for a key with leads:read; for any other key a name matches agents alone.

Required string length: 2 - 100
lead_id
string<uuid>

Only calls with this lead. A lead that is not in this workspace is 404 NOT_FOUND rather than an empty file.

from
string<date-time>

Calls created on or after this timestamp. A value that is not a real date — including a month-end its month does not have, like 2026-09-31 — is 400 CALLS_QUERY_INVALID.

to
string<date-time>

Calls created on or before this timestamp, inclusive. Refused the same way from is. A date-only value covers that whole day (UTC), up to 23:59:59.999999.

Response

The file. Content-Disposition names it for its filters and its window (calls-agent-9b29b0c9-no_answer-2026-09-01_2026-09-30.csv; the agent and an outcome filter by the first eight characters of their id), X-Total-Rows carries the number of calls in it and X-Total-Cost-USD what they cost together. Every line under the headings is a call.

The response is of type string.