Read the Outcome of a Call
GET /v1/calls/{call_id}/outcomes
| Property | Value |
|---|---|
| Operation | get_call_outcome |
| Group | Outcomes and analyses |
| Scope | calls:read |
Scopes of include values | values needs transcripts:read |
| Route class | read |
| Idempotency | No Idempotency-Key |
| Audit | An audited content read outcome.read, when the request names an include value |
| Released in | 1.56.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Answers the Call's Outcome (1.56.0, FR-calls-16): its status and every field of its schema with its method, confidence and, with calls:read, the value of each phi: false field whose type is not free text; include=values adds every other value, needs transcripts:read and is an audited content read. While an outcomes analysis retries a failed extraction the status is pending. A Call whose Agent version has no Outcome schema, or that is not finalized, has none: 404 not_found.
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_.../outcomes" \
-H "Authorization: Bearer $VOCAL_API_KEY"const response = await fetch(`${process.env.VOCAL_API}/v1/calls/call_.../outcomes`, {
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
},
});
console.log(response.status, await response.text());import os
import requests
response = requests.get(
f"{os.environ['VOCAL_API']}/v1/calls/call_.../outcomes",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
call_id | path | CallId | yes | The id of a Call: call_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log. |
include | query | array of OutcomeInclude | no | Content classes to add, comma-separated: values answers every value, needs transcripts:read and makes the read an audited content read (1.56.0). |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | Outcome | |
400 | application/json | ErrorEnvelope | invalid_request |
401 | application/json | ErrorEnvelope | unauthenticated |
403 | application/json | ErrorEnvelope | forbidden |
404 | application/json | ErrorEnvelope | not_found |
429 | application/json | ErrorEnvelope | rate_limited |
500 | application/json | ErrorEnvelope | internal_error |
Fields of the 200 answer
The shape is Outcome.
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | AgentId | yes | |
agent_version | integer | yes | |
call_id | CallId | yes | |
environment | Environment | yes | |
extracted_at | Timestamp or null | yes | Null while pending. |
extraction_ms | integer or null | yes | How long the extraction took, a measurement; null for a skipped Outcome. |
fields | map of OutcomeValue | yes | Every field of the schema by name, in the schema's order. |
id | OutcomeId | yes | |
object | "outcome" | yes | |
retried | boolean | yes | True when an outcomes analysis retried a failed in-Session extraction over the stored, redacted transcript; a field whose source was redacted stays absent. |
rollup | OutcomeRollupResult or null | yes | The rollup field; null when the schema names none. |
schema_sha256 | string | yes | The SHA-256 of the canonical Outcome schema that was filled. |
scrubbed_at | Timestamp or null | yes | When the retention scrub nulled the values; null before. |
status | OutcomeStatus | yes |