curl --request GET \
--url https://api.goyappr.com/calls \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/calls"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/calls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.goyappr.com/calls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goyappr.com/calls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.goyappr.com/calls")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/calls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
},
"from": "<string>",
"to": "<string>",
"direction": "<string>",
"status": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"recording_started_at": "2023-11-07T05:31:56Z",
"duration_seconds": 123,
"cost_cents": 123,
"cost_status": "charged",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"source": "test",
"provider": "external",
"carrier_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": "telnyx",
"status": "untested"
},
"carrier_call_id": "v3:u5OA0mKfWkqg2Gfyv1c0g8ukRZ3n1R6f2sKnH4Qj1i1aX8Pz9g",
"shared_link_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sip_endpoint_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ended_by": "caller",
"disconnect_reason": "<string>",
"transferred_at": "2023-11-07T05:31:56Z",
"transfer_target": "<string>",
"metadata": {},
"recording_url": "<string>",
"tool_calls_count": 123,
"flow_steps_count": 123,
"ab_variant": "a",
"flow_tool_fires_count": 123,
"disposition": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"color": "#22c55e",
"position": 123,
"is_protected": true,
"created_at": "2023-11-07T05:31:56Z"
},
"lead": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone_number": "+972501234567",
"name": "<string>",
"email": "jsmith@example.com",
"source": "api",
"tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"color": "<string>",
"sort_order": 123,
"created_at": "2023-11-07T05:31:56Z"
}
],
"long_term_context": "<string>",
"extracted": {},
"extracted_precision": {},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"failure": {
"code": "no_answer",
"reason": "<string>",
"stage": "dialing",
"at": "2023-11-07T05:31:56Z"
},
"analysis": {
"status": "pending",
"reason": "call_in_progress",
"completed_at": "2023-11-07T05:31:56Z"
},
"personal_data_withheld": true
}
],
"pagination": {
"total": 123,
"limit": 123,
"offset": 123,
"has_more": true,
"next_cursor": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}List Calls
Requires calls:read, or calls:metrics: a calls:metrics key (without calls:read)
reads each call as metrics - ids, agent, direction, status, moments, duration, cost,
disposition, ended_by, failure and analysis - with from, to, metadata
and transfer_target null, lead as {id}, recording_url left out
and personal_data_withheld: true. It may not filter by caller, callee, search or
lead_id (403 INSUFFICIENT_SCOPE).
curl --request GET \
--url https://api.goyappr.com/calls \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/calls"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.goyappr.com/calls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.goyappr.com/calls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.goyappr.com/calls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.goyappr.com/calls")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/calls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
},
"from": "<string>",
"to": "<string>",
"direction": "<string>",
"status": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"recording_started_at": "2023-11-07T05:31:56Z",
"duration_seconds": 123,
"cost_cents": 123,
"cost_status": "charged",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"source": "test",
"provider": "external",
"carrier_account": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": "telnyx",
"status": "untested"
},
"carrier_call_id": "v3:u5OA0mKfWkqg2Gfyv1c0g8ukRZ3n1R6f2sKnH4Qj1i1aX8Pz9g",
"shared_link_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sip_endpoint_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ended_by": "caller",
"disconnect_reason": "<string>",
"transferred_at": "2023-11-07T05:31:56Z",
"transfer_target": "<string>",
"metadata": {},
"recording_url": "<string>",
"tool_calls_count": 123,
"flow_steps_count": 123,
"ab_variant": "a",
"flow_tool_fires_count": 123,
"disposition": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"color": "#22c55e",
"position": 123,
"is_protected": true,
"created_at": "2023-11-07T05:31:56Z"
},
"lead": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone_number": "+972501234567",
"name": "<string>",
"email": "jsmith@example.com",
"source": "api",
"tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"color": "<string>",
"sort_order": 123,
"created_at": "2023-11-07T05:31:56Z"
}
],
"long_term_context": "<string>",
"extracted": {},
"extracted_precision": {},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"failure": {
"code": "no_answer",
"reason": "<string>",
"stage": "dialing",
"at": "2023-11-07T05:31:56Z"
},
"analysis": {
"status": "pending",
"reason": "call_in_progress",
"completed_at": "2023-11-07T05:31:56Z"
},
"personal_data_withheld": true
}
],
"pagination": {
"total": 123,
"limit": 123,
"offset": 123,
"has_more": true,
"next_cursor": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}calls:read.
This is the end of every journey: you placed a call with
POST /calls, ran a
campaign, or let a number take an inbound
call, and this is where the outcome, the recording and the matched lead come
back.
curl "$YAPPR_API_URL/calls?agent_id=$AGENT_ID&status=completed&limit=20" \
--header "Authorization: Bearer $YAPPR_API_KEY"
| Query parameter | Meaning |
|---|---|
limit | 1–100, default 20. |
offset | Default 0. Page while pagination.has_more is true. Send this or cursor, not both. |
cursor | Continue exactly where the last page stopped — pagination.next_cursor, opaque. See Paging. |
agent_id | Only calls this agent took or placed, by the id GET /agents returns. Anything that is not an id is 400 CALLS_QUERY_INVALID; an id that is not an agent in this workspace is 404 AGENT_NOT_FOUND (it was CALL_AGENT_UNKNOWN), never an empty page. |
status | Exact match, one of pending_connection, ringing, in_progress, completed, failed, no_answer, transferred, dnc_blocked. Anything else is 400 CALLS_QUERY_INVALID naming the list. |
direction | inbound, outbound or web_call. Anything else is 400 CALLS_QUERY_INVALID. |
callee | Destination number. Exact match, not a prefix. A number written with its country code (+…, a bare + included — it no longer has to be sent as %2B — or 00…) is matched in E.164, with or without spaces and dashes, and an Israeli number finds the same calls however it is written: +972501234567, 972501234567 or 0501234567. Other digits (an extension, a short caller ID, a number without its country code) are matched exactly as sent. |
caller | Source number, read the same way as callee. |
ab_variant | a or b — which side of a number’s A/B test took the call. Calls on a number with no split carry no variant and are excluded by this filter. Anything else is 400 INVALID_AB_VARIANT. |
disposition | The outcome’s label, exactly as GET /dispositions returns it — ?disposition=Interested. A label no disposition carries is 404 CALL_DISPOSITION_UNKNOWN, never an empty page. |
disposition_id | The same filter by id. Send this or disposition, not both. An id no disposition in this workspace carries is 404 CALL_DISPOSITION_UNKNOWN too, never an empty page. |
source | Where the call came from: test, shared_link, api, phone_inbound or phone_outbound. Anything else is 400 CALLS_QUERY_INVALID naming the list. |
search | What the dashboard’s Call Logs search box takes. The start of a call id — 8 or more of its characters, dashes where an id has them, so the 8 the dashboard shows are enough — finds the calls whose id starts with it. A phone number finds the calls with it at either end, read the way callee and caller read it. Anything else is part of an agent’s or a lead’s name, case-insensitive (a lead deleted since does not count). A lead’s name is searched only for a key with leads:read, the scope that reads it; for any other key a name matches agents alone. Digits that could be both, like 0501234567, are searched both ways. Under 2 or over 100 characters, or a name more than 300 agents and leads share (agents alone, without leads:read), is 400 CALLS_QUERY_INVALID — send more of the name, or agent_id / lead_id. |
lead_id | Only calls with this lead, by the id GET /leads returns. It is the one way to find a browser call attached to a lead: such a call has no number at either end, so searching by the lead’s phone finds nothing. Anything that is not an id is 400 CALLS_QUERY_INVALID; a lead that is not in this workspace, or was deleted, is 404 NOT_FOUND, never an empty page. |
provider | Only calls on this carrier, as each row’s provider says: external (your own Telnyx account: signed for a carrier account, or placed from one of its numbers), telnyx (a number bought from Yappr, or a SIP endpoint) or none (a browser call, whose provider is null). No scope beyond calls:read. Anything else is 400 CALLS_QUERY_INVALID. |
carrier_account_id | Only calls on this carrier account — your own Telnyx account: every call it signed for, placed from or answered on one of its numbers, outbound and inbound alike. Needs carrier_accounts:read, like carrier_account on each row (403 INSUFFICIENT_SCOPE without it). Anything that is not an id is 400 CALLS_QUERY_INVALID; an account that is not in this workspace is 404 CARRIER_ACCOUNT_NOT_FOUND, never an empty page. |
from / to | ISO 8601 timestamps, inclusive, on created_at: a date (2026-09-01), or a date and time with Z or an offset (2026-09-01T00:00:00Z, 2026-09-01T09:00:00+03:00). Any other shape — 2026, Sep 1, 2026/09/01 — and a date that does not exist — 2026-09-31, the month-end a report script guesses — is 400 CALLS_QUERY_INVALID, not a 500 and not a rolled-forward window. So is a from after to, which used to answer an empty page. 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 is all of August — it used to stop at midnight at the start of August 31 and leave that day out. Send a positive offset’s + as %2B (…T09:00:00%2B03:00): a query string reads a bare + as a space. |
updated_since | ISO 8601, validated the same way, inclusive, on updated_at — every call that has changed since then, whenever it was created. This is the filter an incremental sync wants; from/to are not. Any moment this API prints (…+00:00, an updated_at, a revoked_at) can be sent as it is: a + the query string turned into a space is read as the + it was, on from and to too. |
400 CALLS_QUERY_INVALID: a filter this list
cannot apply is refused rather than dropped, because a dropped filter comes
back as the whole workspace’s calls with an unchanged pagination.total.
A filter this list does know, sent with nothing in it — ?agent_id= — is
refused the same way and for the same reason. Leave the parameter out rather
than sending it empty.
Filters combine with AND. Counting prior attempts to one contact today is one
request: ?agent_id=…&callee=+9725…&from=<midnight> and read
pagination.total.
Response
{
"data": [
{
"id": "a47cf8bd-0811-44bd-b1eb-ec9a2f71925c",
"agent_id": "ea76e25f-e3d1-4ca0-a17f-c1935cfb8281",
"agent": { "id": "ea76e25f-e3d1-4ca0-a17f-c1935cfb8281", "name": "Front desk", "archived_at": null },
"from": "+972551234567",
"to": "+972501234567",
"direction": "outbound",
"source": "phone_outbound",
"provider": "external",
"carrier_account": { "id": "5b0e2c1a-…", "name": "Main Telnyx account", "provider": "telnyx", "status": "active" },
"carrier_call_id": "v3:u5OA0mKfWkqg2Gfyv1c0g8ukRZ3n1R6f2sKnH4Qj1i1aX8Pz9g",
"status": "completed",
"started_at": "2026-09-20T20:33:16.107020+00:00",
"ended_at": "2026-09-20T20:33:48.196015+00:00",
"recording_started_at": "2026-09-20T20:33:17.054000+00:00",
"duration_seconds": 32,
"cost_cents": 11,
"cost_status": "charged",
"ended_by": "caller",
"disconnect_reason": "Completed",
"transferred_at": null,
"transfer_target": null,
"metadata": { "crm_id": "C-1042" },
"created_at": "2026-09-20T20:33:16.107020+00:00",
"updated_at": "2026-09-20T20:34:31.402000+00:00",
"analysis": { "status": "done", "reason": null, "completed_at": "2026-09-20T20:34:31.402000+00:00" },
"tool_calls_count": 0,
"flow_steps_count": 4,
"flow_tool_fires_count": 1,
"recording_url": "https://api.goyappr.com/calls/a47cf8bd-.../recording?exp=1790208000&sig=…",
"disposition": { "id": "…", "label": "Booked", "color": "#22c55e" },
"lead": { "id": "…", "phone_number": "+972501234567", "name": "Lior Adler", "tags": [] }
}
],
"pagination": { "total": 820, "limit": 20, "offset": 0, "has_more": true, "next_cursor": "MjAyNi0w…" }
}
Fields that are absent rather than null
recording_url, disposition, lead, shared_link_id, sip_endpoint_id,
failure and ab_variant are omitted from a
row that has none, rather than sent as null. Read them with a presence check,
not a null check. disposition and lead are full objects, so a list of calls
never needs a follow-up request to label the outcome or identify the contact.
lead is the full object for a key that also holds leads:read; without it
the row carries { "id" } only — the rest is what
Get Lead needs that scope for.
fromandtoare empty strings on a browser call — aweb_callhas no phone leg on either side.- A call that arrived on a SIP endpoint
is
source: phone_inboundwithto: nulland carriessip_endpoint_id. A SIP address endpoint’s address is its credential, so this API does not return it; what a call on a username-and-password trunk dialled (a number or an extension) shows in the dashboard’s call log instead. Itsfromis whatever your phone system sent as the caller, which may not be a phone number, andnullwhen the caller ID was only a username-and-password trunk’s own username. metadatais the object you attached — onPOST /calls, phone or web — exactly as Get call returns it, so a sync can match its own ids from the list without one request per call. Internal bookkeeping (retry counters, carrier ids, error text and when it was recorded, the browser session) is removed. Some keys the platform adds do stay, and this is not an exhaustive list:ab_variantandab_variant_fallbackwhen a split picked the agent,share_link_idon a call from a share link,agent_idon a test call started from the dashboard,queued,queue_idandqueue_wait_secondson a call that waited for a free line, andworkflow_request_idon a call started from a call request, and, on a call that spoke,timezone,timezone_sourceandtimezone_unconfirmed(the zone the agent’s clock ran in; see Get call). Atimezonekey you attach yourself is never replaced. Name your own keys so they cannot collide with these.agentis the agent behindagent_id—{id, name, archived_at}, read with the call, so an archived agent’s name is still in the list (GET /agents/{id}answers 404 for it).archived_atis null while the agent is not archived. Every key gets these three members; Get call embeds the whole agent for a key withagents:read.nullon a call with no agent.ended_byis who hung up:caller,agent,system,operator,unknownwhen the carrier did not say, ornullwhen nothing recorded it — a call still running, or one no producer attributed, which many older calls are. It is written once and never overwritten by a later, vaguer answer. The dashboard shows it as Ended by on the call details and in its Export CSV;GET /calls/exportwrites it in itsEnded bycolumn.disconnect_reasonis a display label, not a branch key. Branch onstatusandended_by; showdisconnect_reasonto a person.duration_secondsis the connected duration, read as Get call reads it:nullwhile a call is still in progress and on every call that was never answered (nobody picked up, or no browser connected, and no answer was recorded), a whole number on every call that was — including a connected call whose voice server recorded no answer, which is counted from the earliest evidence that it connected, as Get call’sanswered_atreads it.ended_atis never beforestarted_at. It never exceeds the agent’smax_call_duration_secsplus 60 seconds (4 hours with no cap, or after a transfer to a person), and neither does the charge.recording_urlis a signed URL that opens in a browser or audio player with no further authentication. It appears once the recording is stored, which is shortly after the call ends — a completed call fetched immediately may not carry one yet. It is left out for a call whose recording can no longer be fetched, so a link you are handed opens. It lasts 7 to 8 days and can be revoked; read the call again for a current one (how links work).sourceis where the call came from, and is the answer to “what did my own testing cost, versus the link I sent out”.testis a rehearsal you started yourself — the agent’s Test tab, or a test phone call from the dashboard.shared_linkis a call someone made through a shared link, and those rows also carryshared_link_id, so spend can be attributed to the link you handed out.apiis a browser session this API minted.phone_inboundandphone_outboundare the two phone legs — real calls only: a test call you dial from the dashboard readstestand is counted there, not here, which is the separation the filter exists for. A call recorded before any of this was written readsunknown, which is the one value?source=will not accept: asking for it would be asking for whatever was never written down.provideris whose carrier the phone side ran on:external— your own Telnyx account, which billed you for the phone minutes, socost_centsis Yappr’s charge beside that bill;telnyx— a number bought from Yappr or a SIP endpoint, the wordGET /phone-numbersuses for such a number;nullon a browser call.carrier_account(id,name,provider,status) is the account anexternalcall ran on, andnullon every other call and for a key withoutcarrier_accounts:read.carrier_call_id, on anexternalcall only, is the id Telnyx gave the call on your account, to find it in your Telnyx records (nullfor a key withoutcarrier_accounts:read). Get call has the detail.cost_centsis what this one call consumed, in credits, and is the same number Get call returns.cost_statussays whether it is final:charged(the charge),not_charged(0— the call failed, was not answered, was blocked, or completed with no connected time) orpending(null— still running, or the charge is not recorded yet). Onlypendingrows are worth coming back for, and none stayspendingmore than 24 hours after its call ended: a charge not recorded by then is not coming, and the row reads0/not_chargedfrom then on. That one change is read off the clock rather than written to the row, so it does not moveupdated_at— re-read thependingrows you hold rather than waiting forupdated_sinceto return them. A month’s spend is this list summed, not one request per call; workspace-level aggregates live inGET /billing/consumption.failuresays why a call did not complete: a stablecodeto branch on, onereasonsentence to show a person, thestageit reached (dialing,connectingorconversation) andat. It is the same object Get call returns, and it is absent on a call that completed.disconnect_reasononly repeats the status on a failure;failure.codeis the cause.updated_atis when the row last changed, and is what an incremental sync must window on. Almost everything worth coming back for settles after the call row is created —status,ended_at,duration_seconds,cost_cents, the matchedlead, thedispositionand the wholeanalysisobject — so a sync windowed oncreated_atreads each call exactly once, at its youngest and emptiest, and never learns that any of it landed. Every change toanalysismoves it too, including a pass that never landed: thatfailed/analysis_unavailableis written onto the call within five minutes of the ten-minute mark, not only read off the clock. So do revoking the call’s recording links (a newrecording_url) and deleting its lead (leadbecomesnull). A change to the lead itself — its name, email or tags — moves the lead’s ownupdated_at, not the call’s. Calls recorded before this field existed carry the last moment they can be proved to have changed. Get call answers with the same field, so a loop that pages this list and then follows a call by id keeps the timestamp it windows on.analysissays where the call’s post-call pass stands —pending,done,skippedorfailed, with areasonfor which case it is. It is on every row, so a sync can page this list and act on each call without a second request per call: rows readingdonehave whatever the pass produced waiting on Get call, rows readingpendingare worth coming back for, andskippedrows never will be. It is the same object Get call returns, and that page carries the reason table and how long to wait.recording_started_atis when the call’s recording began, as Get call reads it: the transcript’sstartandendare milliseconds from here.nullon a browser call, on a call whose recording is not saved yet, and on older calls recorded before the field was added.- The list does not carry the call’s
transcript; read that from Get call. summaryandanswered_atare not on list rows: read them from Get call.
Paging
Two ways, and they are not interchangeable.offset is the default and is fine for a person looking at a page of
results. It counts from the top of a list that moves while you read it: this
workspace’s pagination.total went from 935 to 937 between two requests, and
every row that arrived in between pushed one row off page 1 and onto page 2,
where it was read a second time.
cursor is the one to build a job on. pagination.next_cursor is the last
row of the page you just read, so the next page continues from exactly there
whatever has been written since. Follow it until has_more is false:
cursor=""
while :; do
url="https://api.goyappr.com/calls?limit=100"
# Only send `cursor` once you have one: a filter sent empty is refused, so
# `cursor=` would 400 on the first page.
[ -n "$cursor" ] && url="$url&cursor=$cursor"
page=$(curl -s "$url" -H "Authorization: Bearer $YAPPR_API_KEY")
echo "$page" | jq -c '.data[]'
[ "$(echo "$page" | jq -r '.pagination.has_more')" = "true" ] || break
cursor=$(echo "$page" | jq -r '.pagination.next_cursor')
done
next_cursor is on every page, including the first one you asked for with no
paging parameter at all, so switching costs nothing. Sending cursor and
offset together is 400 CALLS_QUERY_INVALID, and a cursor this endpoint did
not issue — built by hand, edited, or taken from
GET /deliveries — is
400 CALLS_CURSOR_INVALID rather than a silent first page: cursors are signed,
so only one this endpoint cut decodes. A cursor also carries the filters of the
page that returned it: send it with exactly those filters (limit may change).
With other filters — a different updated_since, or none — it is
400 CALLS_CURSOR_INVALID too, saying so, instead of silently continuing a
different list. While
you are paging by cursor, pagination.total counts the calls still ahead of
you rather than the size of the whole list.
Keeping a copy in step
updated_at is stamped when a change starts being written, and the change is
readable only once the write finishes — and your clock is not ours. So a window
that starts exactly where the last one ended can skip a change for good: it
becomes visible after you have read past the moment it carries. Overlap the
windows and de-duplicate instead:
- Record the time before the run starts.
- Ask for
updated_since= the last run’s recorded time minus five minutes, and page it bycursorto exhaustion. - Upsert each call by
id, keeping whichever copy has the newerupdated_at. The overlap hands you some calls twice; that is the point of it. - Store the time from step 1 for the next run.
started=$(date -u +%s)
since=$(jq -rn --argjson t "$last_run" '($t - 300) | todate') # 5 minutes of overlap
# …page ?updated_since=$since&cursor=… to exhaustion, upserting by id and
# keeping the copy with the newer updated_at…
last_run=$started
updated_at falls inside that run’s window. Five minutes
covers a slow write and ordinary clock drift; widen it if the machine running
the sync does not keep its clock in step.
A call in flight
A call that is still running is listed withstatus: "in_progress" and no
ended_at. Poll Get call for one call rather than
re-listing the page.
A browser session you minted with POST /calls
{"type":"web"} is listed from the moment the mint answers, under the
call_id it returned, with status: "pending_connection" — minted, nobody
connected yet. It turns ringing when the browser connects, and if nobody does
it settles no_answer with failure.code: "session_expired" and
ended_by: "system" as soon as its token has expired unused: this list,
GET /calls/{id} and the export settle it when they read it after
expires_at, before they count, so ?status=pending_connection never lists
one whose token is gone. Unread, it settles at the next five-minute sweep. A
token a browser spent on a connection that never came up settles a minute
after expires_at.
POST /calls/{id}/end ends one at once.
Errors
| HTTP | Body | When |
|---|---|---|
400 | {"error":"ab_variant must be 'a' or 'b'","code":"INVALID_AB_VARIANT"} | The filter carried anything else. |
400 | {"error":"Remove outcome. Calls can be filtered by …","code":"CALLS_QUERY_INVALID"} | A query parameter this list does not apply. |
400 | {"error":"agent_id was sent with no value. …","code":"CALLS_QUERY_INVALID"} | A known filter was sent empty, which would have returned every call. |
400 | {"error":"agent_id must be the id of an agent, as GET /agents returns it.","code":"CALLS_QUERY_INVALID"} | agent_id is not an id. |
400 | {"error":"That cursor was not issued by this endpoint. …","code":"CALLS_CURSOR_INVALID"} | The cursor is not one this endpoint handed out. |
400 | {"error":"Send cursor or offset, not both. …","code":"CALLS_QUERY_INVALID"} | Both paging parameters arrived; one of them would have been applied silently. |
400 | {"error":"limit must be a whole number. \"abc\" is not one.","code":"CALLS_QUERY_INVALID"} | limit or offset is not a whole number, or limit is 0. |
400 | {"error":"offset 90 is past the end of this list: 87 calls match. …","code":"CALLS_QUERY_INVALID"} | The offset starts beyond the last call these filters match. An offset equal to pagination.total answers an empty page; one beyond it is this refusal. It used to be a 500. |
400 | {"error":"to must be an ISO 8601 timestamp, for example 2026-09-01T00:00:00Z. \"2026-09-31T23:59:59Z\" is not a real date.","code":"CALLS_QUERY_INVALID"} | from, to or updated_since is not an ISO 8601 timestamp, or names a day its month does not have. |
404 | {"error":"agent_id 6f1a9b3e-… is not an agent in this workspace. …","code":"AGENT_NOT_FOUND"} | The agent_id is not one of this workspace’s agents. It was CALL_AGENT_UNKNOWN: every route answers a missing agent with one code. |
404 | {"error":"\"Interested\" is not a disposition in this workspace. …","code":"CALL_DISPOSITION_UNKNOWN"} | The disposition label or disposition_id is not one of this workspace’s dispositions. |
403 | {"error":"This key does not hold …","code":"INSUFFICIENT_SCOPE"} | The key does not hold calls:read. |
500 | {"error":"Failed to list calls"} | The read failed. Retry; nothing was changed. |
503 | {"error":"Listing these calls took too long, so the read stopped before finishing. …","code":"CALLS_LIST_TIMEOUT"} | The list could not be read inside its own budget of about 15 seconds. Nothing was changed. Send the same request again after the Retry-After seconds (5), or narrow it with from and to or a smaller limit. It used to be a bare 503 from the platform after 25 seconds. |
Server-Timing header — auth, filters, page,
settle, enrich and total, each in milliseconds — so a slow read says where its time went.
Read it when you report one to support; do not build on the step names.Authorizations
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
Continue exactly where the last page stopped. Opaque; take it from pagination.next_cursor, which every page carries. This list grows while it is being read, so an offset silently repeats or skips rows and a cursor does not. A cursor this endpoint did not issue - one built by hand, edited, or taken from GET /deliveries - is 400 CALLS_CURSOR_INVALID rather than a silent first page: cursors are signed. While paging by cursor, pagination.total counts the calls still ahead.
Only calls this agent took or placed, by the id GET /agents returns. Anything that is not an id is 400 CALLS_QUERY_INVALID naming the parameter, rather than reaching the uuid column unchecked, and an id that is not an agent in this workspace is 404 AGENT_NOT_FOUND (it was CALL_AGENT_UNKNOWN) rather than an empty page that reads as "no calls".
Filter by call status. pending_connection is a browser session minted with POST /calls {type: web} that nobody has connected to yet. Anything outside the list is 400 CALLS_QUERY_INVALID naming the statuses calls really have, rather than reaching the enum column unchecked.
pending_connection, ringing, in_progress, completed, failed, no_answer, transferred, dnc_blocked Filter by callee (destination) phone number, matched in E.164 when written with its country code (a bare + included); an Israeli number written +972…, 972… or 05… finds the same calls, and other digits (an extension, a number without its country code) are matched exactly as sent. Useful for counting prior attempts to a specific lead — e.g. retry-throttle logic: ?agent_id=X&callee=+972Y&from=TODAY then read data.length directly.
Only calls that came from here. test is a rehearsal you started yourself (the agent's Test tab, or a test phone call from the dashboard); shared_link is a call made through a shared link; api is a browser session this API minted; phone_inbound and phone_outbound are the two phone legs, real calls only - a test call dialled from the dashboard is returned by source=test and not by source=phone_outbound. Anything else is 400 CALLS_QUERY_INVALID. A call recorded before its origin was written reads "unknown" and cannot be filtered for.
test, shared_link, api, phone_inbound, phone_outbound Only calls on this carrier account - your own Telnyx account, as GET /carrier-accounts returns it: every call it signed for, placed from or answered on one of its numbers, outbound and inbound alike (a refused dial included). Needs carrier_accounts:read, like the carrier_account on each call - 403 INSUFFICIENT_SCOPE without it. Anything that is not an id is 400 CALLS_QUERY_INVALID; an account that is not in this workspace is 404 CARRIER_ACCOUNT_NOT_FOUND rather than an empty page.
Only calls on this carrier, as each call's provider says: external - your own Telnyx account (signed for a carrier account, or placed from one of its numbers); telnyx - a number bought from Yappr, or a SIP endpoint; none - a browser call, which has no phone side (provider null). Needs no scope beyond calls:read, like provider itself. Anything else is 400 CALLS_QUERY_INVALID.
external, telnyx, none What the dashboard's Call Logs search box takes, in one parameter. The start of a call id - 8 or more of its hex characters, with dashes where an id has them, so the 8 the dashboard shows are enough - finds the calls whose id starts with it. A phone number finds the calls with it at either end, read the way callee and caller read it. Anything else is part of an agent's or a lead's name, case-insensitive; a lead deleted since does not count. A lead's name is searched only for a key with leads:read, the scope that reads it; for any other key a name matches agents alone. Digits that could be both (0501234567) are searched both ways. A name more than 300 agents and leads share (agents alone, without leads:read) is 400 CALLS_QUERY_INVALID, as is a search under 2 or over 100 characters.
2 - 100Only calls with this lead, by the id GET /leads returns - the one way to find a browser call attached to a lead, which has no number at either end. Anything that is not an id is 400 CALLS_QUERY_INVALID; a lead that is not in this workspace, or was deleted, is 404 NOT_FOUND rather than an empty page.
Return calls created on or after this ISO 8601 timestamp - a date, or a date and time with Z or an offset. Any other shape (2026, Sep 1, 2026/09/01) and a day its month does not have - 2026-09-31, the month-end a report script guesses - is 400 CALLS_QUERY_INVALID rather than a failed read or a window silently rolled forward to October 1. URL-encode a positive offset's + as %2B: a query string reads a bare + as a space, and the refusal says so when that is what happened.
Every call that has CHANGED at or after this timestamp, whatever its created_at. This is the filter an incremental sync wants: status, ended_at, duration_seconds, cost_cents, the matched lead, the disposition and the whole analysis object all settle after the row is created - an analysis that never landed included, which is written onto the call as failed / analysis_unavailable within five minutes of the ten-minute mark (for a workflow agent's call, once no retry is still due) - so a sync windowed on created_at reads each call once, at its youngest and emptiest, and never learns that any of it landed. Record the time before a run starts, ask the next run from a few minutes before it, and upsert by id keeping the newer updated_at: a change is stamped when its write starts and readable only once it finishes, so windows that merely touch can skip one.