Referencia de la API

Llamadas

Registro de llamadas, cada una con su línea de tiempo.

GET /v1/calls

The call log of my organization

Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior

Every call of the organization, real and simulated, newest first. Any signed-in member reads it. Filters: `since` (inclusive) and `until` (exclusive) on the start time, `assistant_id`, `campaign_id`, `outcome` (`answered`, `busy`, `no_answer`, `voicemail`, `failed`, `dnc`), `end_reason`, `direction` and `q`, a text matched against the last digits of the phone number, the start of the call id and, for a campaign call, a value of its contact's file that the reports show as it is (a DNI, a name; part of it, ignoring case; never a phone number or e-mail address the reports redact), `sentiment` (`positive`, `neutral`, `negative`) and `criterion` (the id of a success criterion) with `criterion_result` (`success`, `failure`, `unknown`) from the post-call analysis. Each item has the assistant (id, name when it still exists, version), the immutable `assistant_version_id` when known, the campaign, the outcome, the end reason, the cost estimate, `sentiment` (null when not analyzed) and `phone_last4`, never the full number. `simulated` marks a campaign attempt without a worker call record. Pass `next_cursor` as `cursor` to read the next page; `limit` is at most 200 (default 100). 401 when the token is missing, expired or invalid; 422 for an invalid filter, cursor or limit; 503 when the call log is not available.

Parámetros

NombreEnTipoRequeridoDescripción
sincequerystring (date-time) | null
untilquerystring (date-time) | null
assistant_idquerystring (uuid) | null
campaign_idquerystring (uuid) | null
outcomequerystring | null
end_reasonquerystring | null
directionquerystring | null
qquerystring | null
sentimentquery"positive" | "neutral" | "negative" | nullThe sentiment of the post-call analysis.
criterionquerystring | nullId of a success criterion of the assistant; the call was analyzed.
criterion_resultquery"success" | "failure" | "unknown" | nullHow `criterion` was judged. Needs `criterion`.
limitqueryinteger
cursorquerystring | null

Respuestas

  • 200 Successful Response · CallPage
    NombreTipoRequeridoDescripción
    itemsCallSummary[]sí
    items[].assistantAssistantRef | nullsí
    items[].assistant.idstring (uuid)sí
    items[].assistant.namestring | nullsíNull when the assistant no longer exists.
    items[].assistant.versioninteger | nullsíThe version number when known.
    items[].assistant_version_idstring (uuid) | nullThe immutable snapshot when known. Null for drafts.
    items[].called_last4string | nullInbound calls: the end of the eco number that was dialed (`phone_last4` is the caller). Null for outbound calls, where `phone_last4` is the number called. Never the full number.
    items[].campaignCampaignRef | nullsí
    items[].campaign.idstring (uuid)sí
    items[].campaign.namestring | nullsí
    items[].cost_usdnumber | nullsíEstimate: the sum of the usage lines when every one has a price, else the total the call reported; null when neither exists.
    items[].directionstringsí (inbound, outbound)
    items[].draftbooleanThe call ran the assistant's unpublished draft (a Talk session or a test call of the draft). A draft has no version number: `assistant.version` is then only the last published number (1 when there is none) and must not be shown as the version the call ran.
    items[].duration_secondsnumber | nullsí
    items[].end_reasonstring | nullsíWhy a call ended. The first six are the `call.ended` reasons; the rest only come from the simulated dialer, whose calls never connect. (completed, caller_hangup, transferred, voicemail, time_limit, error, no_answer, busy, dnc)
    items[].idstring (uuid)sí
    items[].outcomestringsí (answered, busy, no_answer, voicemail, failed, dnc)
    items[].phone_last4string | nullsíNever the full number.
    items[].sentiment"positive" | "neutral" | "negative" | nullFrom the post-call analysis; null when the call was not analyzed. (positive, neutral, negative)
    items[].silence_phase"initial" | "in_conversation" | nullWhen a silence policy ended the call, the phase in which it timed out. (initial, in_conversation)
    items[].simulatedbooleansíA campaign attempt without a worker call record.
    items[].started_atstring (date-time)sí
    items[].testbooleanA test call: the assistant dialed a member's phone to be tried. It belongs to no campaign and is left out of the metrics.
    next_cursorstring | nullsí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse
  • 422 A filter, the cursor or the limit is invalid. · ErrorResponse
  • 503 The call log is not available yet. · ErrorResponse
  • default Default Response · ErrorResponse

GET /v1/calls/{call_id}

One call with its timeline

Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior

Any signed-in member. The fields of the list item plus `timeline` (the stored events in order: the call start, the answer, answering machine detection, each turn, tool calls, transfers, tree transitions and decisions, the end), `latencies` per turn, `tree_path`, `cost` (usage and the estimate; `components` is empty when the cost was reported as one total), and the result: `structured_output` and `guardrail_violations`, redacted like the `call.result` event. Only what is stored is shown: events carry no text and the assistant's tool arguments and the caller's data are not kept. `transcript` is what was said (`role`, `text`, `started_at_ms`, `ended_at_ms`, `interrupted`, `step`), read from the private transcripts bucket, with `transcript_info` (language, whether the call was cut, expiry); both are null when there is none, it expired (90 days by default) or transcripts are not configured. `recording` is the audio recording (`status`, `duration_seconds`, `bytes`, `expires_at`; never a link, see `GET /v1/calls/{call_id}/recording`); null when the call was not recorded, it expired (90 days by default) or recordings are not configured. `analysis` is the post-call analysis: `summary`, one result with `rationale` per success criterion and the `sentiment`; null when the assistant has none. Reading a call that has a transcript is audited as `transcript.view` (ids only); a viewer sees the transcript here, while exporting it is `downloadCallTranscript`, editors only. A simulated call has none of these. 401 when the token is missing, expired or invalid; 404 when the call is not in the caller's organization; 503 when the call log is not available.

Parámetros

NombreEnTipoRequeridoDescripción
call_idpathstring (uuid)sí

Respuestas

  • 200 Successful Response · CallDetailResponse
    NombreTipoRequeridoDescripción
    analysisCallAnalysisResponse | nullThe post-call analysis (summary, the verdict and rationale of each success criterion, sentiment); null when the assistant has none or it is not ready.
    analysis.analyzed_atstring (date-time)sí
    analysis.criteriaCriterionResultResponse[]sí
    analysis.criteria[].idstringsí
    analysis.criteria[].namestringsí
    analysis.criteria[].rationalestringsí
    analysis.criteria[].result"success" | "failure" | "unknown"sí`success`, `failure` or `unknown`. (success, failure, unknown)
    analysis.modelstringsí
    analysis.sentiment"positive" | "neutral" | "negative" | nullsí (positive, neutral, negative)
    analysis.summarystring | nullsíRedacted like the transcript.
    assistantAssistantRef | nullsí
    assistant.idstring (uuid)sí
    assistant.namestring | nullsíNull when the assistant no longer exists.
    assistant.versioninteger | nullsíThe version number when known.
    assistant_version_idstring (uuid) | nullThe immutable snapshot when known. Null for drafts.
    called_last4string | nullInbound calls: the end of the eco number that was dialed (`phone_last4` is the caller). Null for outbound calls, where `phone_last4` is the number called. Never the full number.
    campaignCampaignRef | nullsí
    campaign.idstring (uuid)sí
    campaign.namestring | nullsí
    captured_dataCapturedFieldResponse[]Tree mode: the values the conversation tree captured during the call, with the step and moment of each (redacted like the `call.result` event). Empty for a prompt assistant or when nothing was captured. It is reported apart from `structured_output`, which is what the result extraction produced.
    captured_data[].captured_atstring (date-time)sí
    captured_data[].namestringsí
    captured_data[].stepstringsí
    captured_data[].valuestringsí
    costCallCostResponse | nullsí
    cost.componentsCostComponentResponse[]síThe cost per component (llm, realtime, stt, tts, embeddings, telephony); a component with a model that has no price is left out. Empty when the call has no usage and the cost was reported as one total.
    cost.components[].componentstringsí
    cost.components[].cost_usdnumbersí
    cost.llm_input_tokensintegersí
    cost.llm_output_tokensintegersí
    cost.total_usdnumber | nullsí
    cost.tts_charactersintegersí
    cost.unpriced_turnsintegersí
    cost.usageCallUsageLineResponse[]síWhat the call consumed, per source, component, provider and model, with the estimated cost of each (null when the model has no price).
    cost.usage[].componentstringsí
    cost.usage[].cost_usdnumber | nullsíNull when the model has no price.
    cost.usage[].modelstringsí
    cost.usage[].providerstringsí
    cost.usage[].quantitiesUsageQuantitiessí
    cost.usage[].sourcestringsí
    cost_usdnumber | nullsíEstimate: the sum of the usage lines when every one has a price, else the total the call reported; null when neither exists.
    directionstringsí (inbound, outbound)
    draftbooleanThe call ran the assistant's unpublished draft (a Talk session or a test call of the draft). A draft has no version number: `assistant.version` is then only the last published number (1 when there is none) and must not be shown as the version the call ran.
    duration_secondsnumber | nullsí
    end_reasonstring | nullsíWhy a call ended. The first six are the `call.ended` reasons; the rest only come from the simulated dialer, whose calls never connect. (completed, caller_hangup, transferred, voicemail, time_limit, error, no_answer, busy, dnc)
    guardrail_violationsobject[]sí
    idstring (uuid)sí
    latenciesTurnLatencyResponse[]sí
    latencies[].audio_input_tokensinteger | nullRealtime turns: the audio part of the input tokens.
    latencies[].audio_output_tokensinteger | null
    latencies[].e2e_msnumber | nullsí
    latencies[].eou_delay_msnumber | nullsí
    latencies[].estimated_cost_usdnumber | nullEstimated cost of the turn; null when a stage has no price.
    latencies[].expressive_tags_removedinteger | nullTags the model wrote that the profile or the TTS does not allow, removed before the TTS. Null when the assistant has no voice profile.
    latencies[].expressive_tags_sentinteger | nullVoice profile tags the model wrote that reached the TTS (pipeline). Null when the assistant has no voice profile.
    latencies[].interruptedbooleansí
    latencies[].llm_cached_tokensinteger | nullCached input tokens, already inside the input tokens.
    latencies[].llm_input_tokensinteger | nullInput tokens of the turn.
    latencies[].llm_output_tokensinteger | null
    latencies[].llm_provider_ttft_msnumber | nullFirst token as the model client saw it; `llm_ttft_ms` is at the node.
    latencies[].llm_rtt_msnumber | nullESTIMATE: TCP round trip to the LLM provider endpoint.
    latencies[].llm_ttfs_msnumber | nullModel start to the first sentence reaching the TTS (pipeline).
    latencies[].llm_ttft_msnumber | nullsí
    latencies[].media_rtt_msnumber | nullESTIMATE: round trip between the worker and the LiveKit server, sampled during the call. The leg between LiveKit and the caller is not measured.
    latencies[].playback_msnumber | nullFirst audio forwarded to the output reporting it started.
    latencies[].stt_audio_secondsnumber | nullSeconds of audio sent to the STT (pipeline).
    latencies[].stt_msnumber | nullsí
    latencies[].stt_rtt_msnumber | nullESTIMATE: TCP round trip to the STT provider endpoint.
    latencies[].text_input_tokensinteger | null
    latencies[].text_output_tokensinteger | null
    latencies[].tts_audio_secondsnumber | nullSeconds of audio the TTS produced (pipeline).
    latencies[].tts_charactersinteger | null
    latencies[].tts_rtt_msnumber | nullESTIMATE: TCP round trip to the TTS provider endpoint.
    latencies[].tts_ttfb_msnumber | nullsí
    latencies[].turn_indexintegersí
    latencies[].user_callback_msnumber | nullTime of the agent's own hook between the turn and the model call.
    latency_breakdownLatencyBreakdownResponsesí
    latency_breakdown.media_rtt_msnumber | nullsíESTIMATE: median worker to LiveKit round trip of the call.
    latency_breakdown.summaryComponentStatsResponse[]síMean, p50 and p95 of each component over the turns of the call.
    latency_breakdown.summary[].countintegersíTurns that have the component.
    latency_breakdown.summary[].key"stt" | "endpointing" | "user_callback" | "llm_ttft" | "llm_first_sentence" | "tts_ttfb" | "playback" | "unexplained" | stringsíA stage key, or `total`. (stt, endpointing, user_callback, llm_ttft, llm_first_sentence, tts_ttfb, playback, unexplained)
    latency_breakdown.summary[].mean_msnumbersí
    latency_breakdown.summary[].network_mean_msnumber | nullESTIMATE: mean network part over the turns that have one.
    latency_breakdown.summary[].p50_msnumbersí
    latency_breakdown.summary[].p95_msnumbersí
    latency_breakdown.turnsTurnBreakdownResponse[]sí
    latency_breakdown.turns[].interruptedbooleansí
    latency_breakdown.turns[].media_rtt_msnumber | nullsí
    latency_breakdown.turns[].overlap_msnumbersíHow much the stages add up to more than `total_ms` because they overlapped (preemptive generation); 0 otherwise.
    latency_breakdown.turns[].segmentsLatencySegmentResponse[]sí
    latency_breakdown.turns[].total_msnumber | nullsíThe latency the caller waited as the worker measured it (`e2e_ms`).
    latency_breakdown.turns[].turn_indexintegersí
    outcomestringsí (answered, busy, no_answer, voicemail, failed, dnc)
    phone_last4string | nullsíNever the full number.
    recordingRecordingInfo | nullThe audio recording of the call; null when the call was not recorded, it expired or recordings are not configured. The audio itself is read with `GET /v1/calls/{call_id}/recording`.
    recording.bytesinteger | nullsí
    recording.duration_secondsnumber | nullsí
    recording.expires_atstring (date-time)sí
    recording.failure_reasonstring | nullsíA short machine reason when `status` is `failed`.
    recording.start_offset_msinteger | nullAudio file start relative to call start, if known.
    recording.statusstringsí (recording, ready, failed)
    result_outcomestring | nullsí`valid`, `guardrail_violation`, `schema_invalid` or `not_extracted`.
    sentiment"positive" | "neutral" | "negative" | nullFrom the post-call analysis; null when the call was not analyzed. (positive, neutral, negative)
    silence_phase"initial" | "in_conversation" | nullWhen a silence policy ended the call, the phase in which it timed out. (initial, in_conversation)
    simulatedbooleansíA campaign attempt without a worker call record.
    started_atstring (date-time)sí
    structured_outputobject | nullsíRedacted like the `call.result` event; null when none.
    testbooleanA test call: the assistant dialed a member's phone to be tried. It belongs to no campaign and is left out of the metrics.
    timelineTimelineEntryResponse[]sí
    timeline[].atstring (date-time)sí
    timeline[].capturedstring[]síNames of captured fields, never values.
    timeline[].decisionstring | null
    timeline[].duration_msnumber | null
    timeline[].e2e_msnumber | null
    timeline[].from_stepstring | null
    timeline[].interruptedboolean | null
    timeline[].kindstringsí`started`, `answered`, `amd`, `turn`, `tool`, `transfer`, `flow_transition`, `flow_decision`, `guardrail_triggered`, `speech_ignored`, `speech_background_speaker` or `ended`; other call events keep their own name.
    timeline[].latency_msnumber | null
    timeline[].reasonstring | null
    timeline[].resultstring | null
    timeline[].sequenceintegersí
    timeline[].statusstring | null
    timeline[].stepstring | null
    timeline[].to_stepstring | null
    timeline[].tool_namestring | null
    timeline[].turn_indexinteger | null
    transcriptstring[] | nullsíDeprecated: use `transcript_turns`. One `role: text` line per spoken turn (tool calls are left out), for clients written before transcripts were stored. Null when there is none, it expired or transcripts are not configured.
    transcript_infoTranscriptInfo | nullNull exactly when `transcript_turns` is null.
    transcript_info.expires_atstring (date-time)sí
    transcript_info.languagestring | nullsí
    transcript_info.omitted_turnsintegersí
    transcript_info.sourcestringsí (call, talk)
    transcript_info.truncatedbooleansíTrue when the call was longer than what is stored.
    transcript_turnsTranscriptTurnResponse[] | nullWhat was said, in order, with roles and times; null when there is none, it expired or transcripts are not configured.
    transcript_turns[].ended_at_msintegersí
    transcript_turns[].interruptedboolean | null
    transcript_turns[].rolestringsí (assistant, user, tool)
    transcript_turns[].started_at_msintegersíFrom the start of the call.
    transcript_turns[].stepstring | nullConversation tree step, when there is one.
    transcript_turns[].textstringsí
    tree_pathstring[]síSteps of the conversation tree, in order.
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse
  • 404 No such call in the caller's tenant. · ErrorResponse
  • 503 The call log is not available yet. · ErrorResponse
  • default Default Response · ErrorResponse

GET /v1/calls/{call_id}/recording

A short-lived link to the audio of a call

Solo para usuarios con sesión iniciada (sin API key) · Rol: editor o superior

An `editor` or above. Returns a presigned URL (valid 5 minutes by default) the browser plays or downloads straight from the private recordings bucket; nothing is proxied. `download=true` signs it as an attachment. Audited as `recording.read` before the URL is made (ids only, never the URL). 401 when the token is missing, expired or invalid; 403 for a `viewer`; 404 when the call has no ready recording in the caller's organization; 429 above the export rate; 503 when recordings are not available.

Parámetros

NombreEnTipoRequeridoDescripción
call_idpathstring (uuid)sí
downloadqueryboolean

Respuestas

  • 200 Successful Response · RecordingLinkResponse
    NombreTipoRequeridoDescripción
    content_typestringsíThe media type of the audio.
    expires_atstring (date-time)sí
    urlstringsíA presigned GET URL; never store it.
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 The member's role is too low. · ErrorResponse
  • 404 No ready recording for that call (not recorded, still uploading, failed, expired or deleted). · ErrorResponse
  • 429 Links are requested too often. · ErrorResponse
  • 503 Recordings are not available. · ErrorResponse
  • default Default Response · ErrorResponse

DELETE /v1/calls/{call_id}/recording

Delete the audio recording of a call

Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior

An `admin` or above. Removes the object from the bucket and its pointer; the call stays. Audited as `recording.delete` (ids only) before anything is removed. 204 on success; 401 when the token is missing, expired or invalid; 403 below `admin`; 404 when the call has no recording; 503 when recordings are not available.

Parámetros

NombreEnTipoRequeridoDescripción
call_idpathstring (uuid)sí

Respuestas

  • 204 Successful Response
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 The member's role is too low. · ErrorResponse
  • 404 No ready recording for that call (not recorded, still uploading, failed, expired or deleted). · ErrorResponse
  • 503 Recordings are not available. · ErrorResponse
  • default Default Response · ErrorResponse

GET /v1/calls/{call_id}/transcript

Download the transcript of a call

Solo para usuarios con sesión iniciada (sin API key) · Rol: editor o superior

An `editor` or above: viewing the transcript inside `getCall` is audited as `transcript.view` and open to any member, exporting the file is not. `format=txt` (default) is plain text, one line per turn (`[mm:ss] Role: text`); `format=json` is the stored document (`schema_version`, `call_id`, `source`, `language`, `truncated`, `omitted_turns` and `turns`). Sent as an attachment. Audited as `transcript.read` before the first byte; the text is never logged. 401 when the token is missing, expired or invalid; 403 for a `viewer`; 404 when the call has no transcript in the caller's organization; 429 above the export rate; 503 when transcripts are not available.

Parámetros

NombreEnTipoRequeridoDescripción
call_idpathstring (uuid)sí
formatquery"txt" | "json"

Respuestas

  • 200 The transcript file.
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 The member's role is too low. · ErrorResponse
  • 404 No transcript for that call (never stored, expired or deleted). · ErrorResponse
  • 429 Downloads are too frequent. · ErrorResponse
  • 503 Transcripts are not available. · ErrorResponse
  • default Default Response · ErrorResponse

DELETE /v1/calls/{call_id}/transcript

Delete the transcript of a call

Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior

An `admin` or above. Removes the object from the bucket and its pointer; the call and its timeline stay. Audited as `transcript.delete` (ids only) before anything is removed. 204 on success; 401 when the token is missing, expired or invalid; 403 below `admin`; 404 when the call has no transcript; 503 when transcripts are not available.

Parámetros

NombreEnTipoRequeridoDescripción
call_idpathstring (uuid)sí

Respuestas

  • 204 Successful Response
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 The member's role is too low. · ErrorResponse
  • 404 No transcript for that call (never stored, expired or deleted). · ErrorResponse
  • 503 Transcripts are not available. · ErrorResponse
  • default Default Response · ErrorResponse