POST /calls/search
Search call history
A page of calls, newest first, for a time window you specify.
| Scope | reports:read |
| Role permission | Call reports |
| Cost | Free |
It searches; it changes nothing. It uses POST, which usually means
"create or update," but this one only reads — so if a response gets lost,
you can safely send it again. We use POST because the search is too
detailed to fit in a web address, and web addresses get recorded in
server logs along the way; the request body keeps it both workable and
private.
You must give a start and an end — the beginning and end of the
time range to search, each as a Unix timestamp (seconds since January 1,
1970) and no more than 366 days apart (about a year). There is no default
on purpose: if these could be left out, a program that forgot them might
get back a single day of calls and present it as the whole month.
Paged. Up to limit calls per response — 50 by default, 500 at most —
with offset to walk further in and total in the response to size the
full set. Newest first unless you set sort.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
start | integer | yes | Start of the window, unix seconds. Required. |
end | integer | yes | End of the window, unix seconds. Required, must be after start, and at most 366 days later. |
timeZone | string | no | IANA zone, e.g. America/New_York. Decides where a day boundary falls for the day-of-week and day-of-month filters. Defaults to UTC, which shifts every daily figure — send it. |
limit | integer | no | Page size. Defaults to 50, capped at 500. |
offset | integer | no | Rows to skip. |
direction | inbound | outbound | no | Omit for both. |
filters | object | no | Every field is optional. Excludes are applied after includes. |
filters.numbers | string[] | no | Match these account numbers. |
filters.numbersExclude | string[] | no | Exclude these account numbers. |
filters.extensions | string[] | no | Match these extensions. |
filters.extensionsExclude | string[] | no | Exclude these extensions. |
filters.queues | string[] | no | Match calls that went through these queues. |
filters.queuesExclude | string[] | no | Exclude calls that went through these queues. |
filters.huntgroups | string[] | no | Match calls that went through these hunt groups. |
filters.huntgroupsExclude | string[] | no | Exclude calls that went through these hunt groups. |
filters.users | string[] | no | Match calls involving these users, by user id. |
filters.directions | inbound | outbound[] | no | Match these call directions. |
filters.statuses | answered | missed | voicemail[] | no | The words, not the numeric codes. |
filters.search | string | no | Matches caller and called names and numbers. |
filters.duration | object | no | Either end may be omitted for an open bound. Durations are seconds; timeOfDay takes HH:MM. |
filters.duration.start | string | no | The low end of the range. Omit for an open bound. |
filters.duration.end | string | no | The high end of the range. Omit for an open bound. |
filters.talkTime | object | no | Either end may be omitted for an open bound. Durations are seconds; timeOfDay takes HH:MM. |
filters.talkTime.start | string | no | The low end of the range. Omit for an open bound. |
filters.talkTime.end | string | no | The high end of the range. Omit for an open bound. |
filters.waitTime | object | no | Either end may be omitted for an open bound. Durations are seconds; timeOfDay takes HH:MM. |
filters.waitTime.start | string | no | The low end of the range. Omit for an open bound. |
filters.waitTime.end | string | no | The high end of the range. Omit for an open bound. |
filters.timeOfDay | object | no | Either end may be omitted for an open bound. Durations are seconds; timeOfDay takes HH:MM. |
filters.timeOfDay.start | string | no | The low end of the range. Omit for an open bound. |
filters.timeOfDay.end | string | no | The high end of the range. Omit for an open bound. |
filters.callPurpose | string[] | no | Per-account vocabulary, not a fixed enum. A value your account does not use matches nothing — that is not an error, and not a typo we can catch for you. |
filters.callSentiment | string[] | no | Per-account vocabulary, as callPurpose. |
sort | object | no | How to order the results. |
sort.field | string | no | A response field name, e.g. startTime. |
sort.direction | asc | desc | no | Sort order. Defaults to desc. |
Everything in a time window:
{
"start": 1754006400,
"end": 1754092800,
"timeZone": "America/New_York",
"limit": 50
}
Inbound calls nobody answered:
{
"start": 1754006400,
"end": 1754092800,
"timeZone": "America/New_York",
"direction": "inbound",
"filters": {
"statuses": [
"missed"
]
}
}
One queue, filtered on the AI purpose field:
{
"start": 1754006400,
"end": 1754092800,
"filters": {
"queues": [
"501"
],
"callPurpose": [
"billing"
]
},
"sort": {
"field": "startTime",
"direction": "desc"
}
}
Responses
200
A page of matching calls.
| Field | Type | Description |
|---|---|---|
calls | object[] | The calls on this page. |
calls[].id | string | The call id — the same value in call webhooks and the recordings endpoints. Keep it a string: it looks like a decimal number and is not one, and parsing it as a float destroys the low digits. |
calls[].direction | inbound | outbound | Whether the call came in (inbound) or went out (outbound). |
calls[].status | answered | missed | voicemail | unknown | The word rather than the switch's integer. |
calls[].statusCode | integer | The raw code, because status flattens a distinction some clients need: -1 missed, 0 voicemail, 1 answered, and anything above 1 means answered by that many people — a call that rang a group and was picked up after a transfer. All of those report answered. |
calls[].callerType | string | external, user, queue, huntgroup. Read this before assuming a number field holds a phone number — on an internal leg it is an extension. |
calls[].callerName | string | The caller's name, when known. |
calls[].callerNumber | string | The caller's number. On an internal leg this is an extension — check callerType first. |
calls[].calledType | string | What was called — external, user, queue, or huntgroup, same vocabulary as callerType. |
calls[].calledName | string | The called party's name, when known. |
calls[].calledNumber | string | The called party's number. On an internal leg this is an extension — check calledType first. |
calls[].dialledNumber | string | What was actually dialled — for an inbound call, your DID. |
calls[].callerIdInternal | string | The caller ID shown on internal (on-switch) legs. |
calls[].callerIdExternal | string | The caller ID shown on external (off-switch) legs. |
calls[].startTime | string (RFC 3339) | RFC 3339 UTC. |
calls[].endTime | string (RFC 3339) | Omitted for a call with no recorded end. |
calls[].durationSeconds | integer | Includes ringing. |
calls[].talkTimeSeconds | integer | Connected time only. On a missed call this is 0 and durationSeconds is how long it rang. |
calls[].transferred | integer | A count, not a boolean — a call can be transferred more than once. |
calls[].abandoned | boolean | The caller hung up before anyone answered. This is what separates "we missed it" from "they gave up" — reporting on missed calls without it blames agents for calls nobody could have taken. |
calls[].recorded | boolean | Audio was captured. Fetch it with GET /calls/{callid}/recordings — this stays true for a call whose recording was since deleted, so it means "was recorded", not "can be played". |
calls[].calledBack | string | The id of the call that returned this one, when an abandoned call was called back. |
calls[].repeated | integer | Earlier calls from the same caller within the window. |
total | integer | How many calls match the filter across all pages — what a "1–50 of 812" control needs. Not the size of this page. |
limit | integer | The page size actually applied, after defaulting and capping. Send limit: 10000 and this comes back 500, so a short page is explained rather than mysterious. |
offset | integer | How many matching calls were skipped before this page — the offset you sent, echoed back. |
{
"data": {
"total": 812,
"limit": 50,
"offset": 0,
"calls": [
{
"id": "1754489201.884213",
"direction": "inbound",
"status": "answered",
"statusCode": 1,
"callerType": "external",
"callerName": "ACME ROOFING",
"callerNumber": "13475550123",
"calledType": "user",
"calledName": "Dana Spencer",
"calledNumber": "204",
"dialledNumber": "12125550188",
"startTime": "2026-08-11T13:20:01Z",
"endTime": "2026-08-11T13:24:00Z",
"durationSeconds": 239,
"talkTimeSeconds": 220,
"transferred": 0,
"abandoned": false,
"recorded": true
}
]
}
}
Errors
| Status | Meaning |
|---|---|
400 | invalid_request — a missing or malformed field, an unknown enum value, or an unknown field in the body. Nothing was charged. |
401 | unauthenticated — no credential, or one that is invalid, revoked or expired. The WWW-Authenticate header names the scope the endpoint wanted. |
403 | Two different failures share this status; the type field tells them apart — insufficient_scope (the credential lacks the scope) or permission_denied (the scope is fine, but the user's role lacks the permission). |
500 | internal_error — something failed on our side, not with your request. Safe to retry. |
See Errors for the full catalog and what to do about each.
Example
curl -X POST 'https://api.account.telebroad.com/api/public/v1/calls/search' \
-H "Authorization: Bearer $TB_KEY" \
-H 'Content-Type: application/json' \
-d '{"start":1754006400,"end":1754092800,"timeZone":"America/New_York","limit":50}'