VocalDocscontracts 1.65.0

Compare a Call with another Call or with its baseline

GET /v1/calls/{call_id}/compare

PropertyValue
Operationcompare_calls
GroupCall trace and analytics
Scopecalls:read
Route classread
IdempotencyNo Idempotency-Key
AuditNot audited: A metadata read; a comparison carries numbers and ids only.
Released in1.57.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Aligns this finalized Call with with, another finalized Call of the Organization, Turn by Turn, and answers each pair's stage, Provider, Policy and cost deltas (1.57.0); with=baseline compares each Turn with the trailing 7-day percentiles of the Call's Agent version, from the rollups. A Call of another Organization, or one not yet finalized, is not found. align=state was refused with 422 capability_not_available and the detail align_state_not_available in 1.57.0; from 1.58.0 (roadmap slice 2.12) it pairs the Turns of two Calls by the speaker state each ran in, and only with=baseline&align=state is refused that way, because the rollups keep no state. The cost deltas need usage:read and are null without it.

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/call_.../compare?with=call_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY"

Parameters

NameInTypeRequiredDescription
call_idpathCallIdyesThe id of a Call: call_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
withqueryCallId or "baseline"yesAnother finalized Call of the Organization, or baseline for the trailing 7-day percentiles of this Call's Agent version.
alignqueryCompareAlignno

Responses

StatusContent typeShapeError codes
200application/jsonCallComparison
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden
404application/jsonErrorEnvelopenot_found
422application/jsonErrorEnvelopecapability_not_available
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is CallComparison.

FieldTypeRequiredDescription
alignCompareAlignyes
baselineCompareBaseline or nullyesThe baseline; null against a Call.
call_idCallIdyes
object"call_comparison"yes
other_call_idCallId or nullyesThe other Call; null against the baseline.
turnsarray of ComparedTurnyes