VocalDocscontracts 1.65.0

List the Calls of the key's environment

GET /v1/calls

PropertyValue
Operationlist_calls
GroupCalls
Scopecalls:read
Route classread
IdempotencyNo Idempotency-Key
AuditNot audited: A metadata read; no Call content is returned.
Released in1.0.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Newest first, with keyset pagination. From 1.21.0 the list filters by status, Phone number, direction and a creation range besides the Agent (FR-calls-9); filters combine, and a cursor is valid only with the filters it was issued under. The answer carries no total count.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the calls:read scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl "$VOCAL_API/v1/calls" \
  -H "Authorization: Bearer $VOCAL_API_KEY"

Parameters

NameInTypeRequiredDescription
limitqueryintegernoThe page size, 1 to 100.
cursorquerystringnoThe opaque next_cursor of the previous page; it binds the filters it was issued under.
agent_idqueryAgentIdnoOnly the Calls of this Agent (1.10.0).
statusqueryCallStatusnoOnly the Calls in this status (1.21.0).
phone_number_idqueryPhoneNumberIdnoOnly the phone Calls on this Phone number (1.21.0): the number an inbound Call reached, or the number an outbound Call dialled from. A web Call has no Phone number, so it never matches.
directionqueryCallDirectionnoOnly the inbound Calls or only the outbound Calls (1.21.0).
purposequeryCallPurposenoOnly the Calls of this purpose (1.58.0): evaluation, the Calls of evaluation suite runs and conversation test runs; conversation, every other Call. Absent: every Call.
created_afterqueryRequestTimestampnoOnly the Calls created at or after this instant (1.21.0); the start of the range is inclusive.
created_beforequeryRequestTimestampnoOnly the Calls created before this instant (1.21.0); the end of the range is exclusive.
contact_idqueryContactIdnoOnly the Calls of this Contact (1.61.0).

Responses

StatusContent typeShapeError codes
200application/jsonCallList
400application/jsonErrorEnvelopeinvalid_request, invalid_cursor
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is CallList.

FieldTypeRequiredDescription
dataarray of CallyesThe Calls of this page, newest first.
has_morebooleanyesTrue when a further page exists.
next_cursorstring or nullyesThe cursor of the next page, or null on the last page.
object"list"yes