On this page
Get a trial transcript
Read one trial’s assertion trace and, while retained, the transcript used for its verdict.
Operation ID: test_runs.trial.
Request
GET /api/v1/test-runs/{test_run_id}/cases/{case_id}/trials/{trial}
- TypeScript SDK:
client.test_runs.trial(path arguments usepath). - MCP tool:
sdk_client_callwithoperationId: "test_runs.trial"(path arguments useinput.path). Legacy alias:test_runs_trial. Connect to your authenticated/mcpendpoint with an API key for the same environment. - Minimum API key role: viewer.
- Idempotency: No idempotency header required.
Read resource IDs from earlier responses and use a key for the same environment.
Request example
Set each path variable to an ID returned by an earlier API request.
Set CUMULUS_BASE_URL to your workspace API URL and CUMULUS_API_KEY to a key for that environment. Example values are synthetic.
cURL
curl --fail-with-body -sS "${CUMULUS_BASE_URL%/}/api/v1/test-runs/${TEST_RUN_ID}/cases/${CASE_ID}/trials/${TRIAL}" \
-H "Authorization: Bearer $CUMULUS_API_KEY"
TypeScript
import { Cumulus } from "@cumulus/sdk";
const baseUrl = process.env.CUMULUS_BASE_URL;
const apiKey = process.env.CUMULUS_API_KEY;
if (!baseUrl || !apiKey) throw new Error("Set CUMULUS_BASE_URL and CUMULUS_API_KEY");
const client = new Cumulus({ baseUrl, apiKey });
const response = await client.test_runs.trial({
"path": {
"test_run_id": "<test_run_id>",
"case_id": "<case_id>",
"trial": 1
}
});
Input schema
Path, query and header parameters
test_run_id
path parameter · Required.
Type: string (uuid). pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
case_id
path parameter · Required.
Type: string. minLength: 1. maxLength: 64. pattern: ^[a-z0-9][a-z0-9_-]*$.
trial
path parameter · Required.
Type: integer. At least 1. At most 30.
suite_id
query parameter · Optional.
Type: string (uuid). pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
JSON request body
This operation has no JSON request body.
Complete OpenAPI schema
{
"parameters": [
{
"name": "test_run_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
}
},
{
"name": "case_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9][a-z0-9_-]*$"
}
},
{
"name": "trial",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 30
}
},
{
"name": "suite_id",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
}
}
],
"requestBody": null
}
Responses
HTTP 200
Get one trial: its assertion trace and, while retained, the transcript it was judged on
application/json
| Field | Type or values | Required | Description and limits |
|---|---|---|---|
test_run_id | string (uuid) | Required | Identifier of the test run whose progress or results you are reading. pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
suite_id | string (uuid) | Required | Identifier of the test suite. pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
case_id | string | Required | minLength: 1. maxLength: 64. pattern: ^[a-z0-9][a-z0-9_-]*$. |
name | string | Required | minLength: 1. maxLength: 200. |
result | object | Required | — |
result.case_id | string | Required | minLength: 1. maxLength: 64. pattern: ^[a-z0-9][a-z0-9_-]*$. |
result.trial | integer | Required | Greater than 0. At most 9007199254740991. |
result.attempt | integer | Required | Greater than 0. At most 9007199254740991. |
result.run_id | string (uuid) or null | Required | Run identifier returned when the run was admitted. pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
result.state | "pending" · "running" · "evaluating" · "settled" · "cancelled" | Required | — |
result.verdict | "passed" · "failed" · "errored" or null | Required | — |
result.reason | string or null | Required | pattern: ^[a-z][a-z0-9_.:-]{0,127}$. |
result.assertions | array of object | Required | maxItems: 25. |
result.assertions[].assertion_id | string | Required | minLength: 1. maxLength: 64. pattern: ^[A-Za-z0-9][A-Za-z0-9_.-]*$. |
result.assertions[].type | string | Required | minLength: 1. maxLength: 64. |
result.assertions[].verdict | "passed" · "failed" · "not_applicable" · "insufficient_data" · "errored" | Required | — |
result.assertions[].measured | object | Required | — |
result.assertions[].measured.* | string or number or boolean or null | Optional | Additional keys are allowed. |
result.assertions[].evidence | object | Required | — |
result.assertions[].evidence.turns | array of integer | Required | maxItems: 50. |
result.assertions[].evidence.node_ids | array of string | Required | maxItems: 50. |
result.assertions[].evidence.effect_ids | array of string (uuid) | Required | maxItems: 20. |
result.assertions[].judge | object or null | Required | — |
result.assertions[].judge.score | number | Required in a non-null parent | At least 0. At most 1. |
result.assertions[].judge.rejudged | boolean | Required in a non-null parent | — |
result.assertions[].judge.criteria | array of object | Required in a non-null parent | maxItems: 12. |
result.assertions[].judge.criteria[].id | string | Required in a non-null parent | minLength: 1. maxLength: 64. |
result.assertions[].judge.criteria[].verdict | "pass" · "fail" · "na" | Required in a non-null parent | — |
result.assertions[].judge.criteria[].score | integer or null | Required in a non-null parent | At least 1. At most 5. |
result.assertions[].judge.criteria[].evidence_turns | array of integer | Required in a non-null parent | maxItems: 20. |
result.assertions[].judge.criteria[].rationale | string or null | Required in a non-null parent | maxLength: 300. |
result.assertions[].reason | string or null | Required | pattern: ^[a-z][a-z0-9_.:-]{0,127}$. |
result.guard | object | Required | — |
result.guard.compliance_blocks | object | Required | — |
result.guard.compliance_blocks.* | integer | Optional | Additional keys are allowed. |
result.guard.rpc_unconfirmed | integer | Required | At least 0. At most 9007199254740991. |
result.guard.atomic_half_said | integer | Required | At least 0. At most 9007199254740991. |
result.content_state | "retained" · "expired" | Required | — |
case | object or null | Required | — |
case.run | object | Required in a non-null parent | — |
case.run.owner_id | string | Required in a non-null parent | minLength: 1. |
case.run.environment | string | Required in a non-null parent | minLength: 1. |
case.run.tenant_id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
case.run.run_id | string (uuid) | Required in a non-null parent | Run identifier returned when the run was admitted. pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
case.run.agent_id | string | Required in a non-null parent | Agent identifier in the environment selected by your API key. minLength: 1. maxLength: 256. pattern: ^[A-Za-z0-9][A-Za-z0-9_.:-]*$. |
case.run.publication | object | Required in a non-null parent | — |
case.run.publication.agent_id | string | Required in a non-null parent | Agent identifier in the environment selected by your API key. minLength: 1. maxLength: 256. pattern: ^[A-Za-z0-9][A-Za-z0-9_.:-]*$. |
case.run.publication.version | integer | Required in a non-null parent | At least 0. At most 2147483647. |
case.run.publication.digest | string | Required in a non-null parent | pattern: ^sha256:[a-f0-9]{64}$. |
case.run.plan_schema_version | integer | Required in a non-null parent | Greater than 0. At most 9007199254740991. |
case.run.channel | "cloud" · "phone" · "web" | Required in a non-null parent | — |
case.run.mode | "task" · "chat" · "background" · "outbound" · "inbound" | Required in a non-null parent | — |
case.run.state | "admitted" · "running" · "ending" · "completed" · "failed" · "cancelled" · "rejected" · "expired" | Required in a non-null parent | — |
case.run.phone_state | "admitted" · "preparing" · "awaiting_sip" · "dialing" · "ringing" · "active" · "terminating" · "ended" · "rejected" · "expired" · "setup_failed" or null | Required in a non-null parent | — |
case.run.outcome | object or null | Required in a non-null parent | — |
| case.run.outcome · combined section 1 | object | — | Fields for this schema branch. |
case.run.outcome.transport | "completed" · "busy" · "no_answer" · "rejected" · "cancelled" · "provider_failure" · "admission_expired" · "not_applicable" | Required in a non-null parent | — |
case.run.outcome.execution | "completed" · "failed" · "cancelled" · "not_started" · "unknown" | Required in a non-null parent | — |
case.run.outcome.contact | "human" · "voicemail" · "ivr" · "unknown" · "not_applicable" | Required in a non-null parent | — |
case.run.outcome.business | object | Required in a non-null parent | — |
| case.run.outcome.business · variant 1 | object | — | Fields for this schema branch. |
case.run.outcome.business.status | "known" | Required in a non-null parent | — |
case.run.outcome.business.value | string | Required in a non-null parent | minLength: 1. maxLength: 256. |
| case.run.outcome.business · variant 2 | object | — | Fields for this schema branch. |
case.run.outcome.business.status | "unknown" | Required in a non-null parent | — |
case.run.outcome.reason | string | Required in a non-null parent | minLength: 1. maxLength: 128. |
case.run.outcome.result | object or null | Required in a non-null parent | — |
| case.run.outcome.result · combined section 1 | object | — | Fields for this schema branch. |
case.run.outcome.result.artifact_id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
case.run.outcome.result.sha256 | string | Required in a non-null parent | pattern: ^[a-f0-9]{64}$. |
case.run.outcome.result.byte_size | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
case.run.outcome.result.media_type | string | Required in a non-null parent | minLength: 1. maxLength: 128. |
case.run.outcome.result.expires_at | string (date-time) or null | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$. |
case.run.disposition | string or null | Required in a non-null parent | — |
case.run.trigger | object | Required in a non-null parent | — |
| case.run.trigger · variant 1 | object | — | Fields for this schema branch. |
case.run.trigger.kind | "sip" | Required in a non-null parent | — |
case.run.trigger.number_id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
case.run.trigger.call_id_sha256 | string | Required in a non-null parent | pattern: ^[a-f0-9]{64}$. |
| case.run.trigger · variant 2 | object | — | Fields for this schema branch. |
case.run.trigger.kind | "api" | Required in a non-null parent | — |
case.run.trigger.idempotency_key_sha256 | string | Required in a non-null parent | pattern: ^[a-f0-9]{64}$. |
| case.run.trigger · variant 3 | object | — | Fields for this schema branch. |
case.run.trigger.kind | "schedule" | Required in a non-null parent | — |
case.run.trigger.trigger_id | string | Required in a non-null parent | minLength: 1. maxLength: 128. |
case.run.trigger.scheduled_for | string (date-time) | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$. |
| case.run.trigger · variant 4 | object | — | Fields for this schema branch. |
case.run.trigger.kind | "event" | Required in a non-null parent | — |
case.run.trigger.trigger_id | string | Required in a non-null parent | minLength: 1. maxLength: 128. |
case.run.trigger.source_event_id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
| case.run.trigger · variant 5 | object | — | Fields for this schema branch. |
case.run.trigger.kind | "callback" | Required in a non-null parent | — |
case.run.trigger.source_run_id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
case.run.trigger.effect_id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
| case.run.trigger · variant 6 | object | — | Fields for this schema branch. |
case.run.trigger.kind | "evaluation" | Required in a non-null parent | — |
case.run.trigger.comparison_id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
| case.run.trigger · variant 7 | object | — | Fields for this schema branch. |
case.run.trigger.kind | "test" | Required in a non-null parent | — |
case.run.trigger.test_run_id | string (uuid) | Required in a non-null parent | Identifier of the test run whose progress or results you are reading. pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
case.run.trigger.suite_id | string (uuid) | Required in a non-null parent | Identifier of the test suite. pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
case.run.trigger.case_id | string | Required in a non-null parent | minLength: 1. maxLength: 64. pattern: ^[a-z0-9][a-z0-9_-]*$. |
case.run.trigger.trial | integer | Required in a non-null parent | Greater than 0. At most 9007199254740991. |
case.run.principal | object | Required in a non-null parent | — |
| case.run.principal · variant 1 | object | — | Fields for this schema branch. |
case.run.principal.owner_id | string | Required in a non-null parent | minLength: 1. |
case.run.principal.environment | string | Required in a non-null parent | minLength: 1. |
case.run.principal.kind | "user" | Required in a non-null parent | — |
case.run.principal.id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
| case.run.principal · variant 2 | object | — | Fields for this schema branch. |
case.run.principal.owner_id | string | Required in a non-null parent | minLength: 1. |
case.run.principal.environment | string | Required in a non-null parent | minLength: 1. |
case.run.principal.kind | "api_key" | Required in a non-null parent | — |
case.run.principal.id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
| case.run.principal · variant 3 | object | — | Fields for this schema branch. |
case.run.principal.owner_id | string | Required in a non-null parent | minLength: 1. |
case.run.principal.environment | string | Required in a non-null parent | minLength: 1. |
case.run.principal.kind | "system" | Required in a non-null parent | — |
case.run.principal.id | string | Required in a non-null parent | minLength: 1. maxLength: 256. |
case.run.attempt_count | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
case.run.created_at | string (date-time) | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$. |
case.run.started_at | string (date-time) or null | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$. |
case.run.ended_at | string (date-time) or null | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z))$. |
case.run.version | integer | Required in a non-null parent | At least 0. At most 2147483647. |
case.run.to | string or null | Required in a non-null parent | minLength: 1. maxLength: 64. |
case.run.from | string or null | Required in a non-null parent | minLength: 1. maxLength: 64. |
case.run.duration_ms | integer or null | Required in a non-null parent | At least 0. At most 9007199254740991. |
case.run.metadata | object | Required in a non-null parent | — |
case.run.metadata.* | string | Optional | Additional keys are allowed. |
case.run.test | boolean | Required in a non-null parent | — |
case.run.provider_keys | object | Optional | — |
case.run.provider_keys.* | object | Optional | Additional keys are allowed. |
case.language | "en" · "es" | Required in a non-null parent | — |
case.turns | array of object | Required in a non-null parent | maxItems: 2000. |
case.turns[].index | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
case.turns[].role | "user" · "agent" | Required in a non-null parent | — |
case.turns[].text | string | Required in a non-null parent | maxLength: 32000. |
case.turns[].node_id | string or null | Required in a non-null parent | minLength: 1. maxLength: 128. |
case.turns[].at_ms | integer or null | Required in a non-null parent | At least 0. At most 9007199254740991. |
case.path | array of object | Required in a non-null parent | maxItems: 2000. |
case.path[].node_id | string | Required in a non-null parent | minLength: 1. maxLength: 128. |
case.path[].turn | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
case.path[].via | "prompt_edge" · "automatic" · "action_result" · "start" · "global" · "flex_task" | Required in a non-null parent | — |
case.tool_calls | array of object | Required in a non-null parent | maxItems: 500. |
case.tool_calls[].effect_id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
case.tool_calls[].action_id | string | Required in a non-null parent | minLength: 1. maxLength: 128. |
case.tool_calls[].node_id | string or null | Required in a non-null parent | minLength: 1. maxLength: 128. |
case.tool_calls[].turn | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
case.tool_calls[].args | any JSON value | Optional | — |
case.tool_calls[].answered_by | object or "source_receipt" or "unmocked" or "default" | Required in a non-null parent | — |
| case.tool_calls[].answered_by · variant 1 | object | — | Fields for this schema branch. |
case.tool_calls[].answered_by.mock | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
| case.tool_calls[].answered_by · variant 2 | "source_receipt" | — | Fields for this schema branch. |
| case.tool_calls[].answered_by · variant 3 | "unmocked" | — | Fields for this schema branch. |
| case.tool_calls[].answered_by · variant 4 | "default" | — | Fields for this schema branch. |
case.tool_calls[].state | "succeeded" · "failed" | Required in a non-null parent | — |
case.tool_calls[].error_code | string or null | Required in a non-null parent | maxLength: 128. |
case.transfer | object or null | Required in a non-null parent | — |
case.transfer.node_id | string | Required in a non-null parent | minLength: 1. maxLength: 128. |
case.transfer.turn | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
case.ended | object | Required in a non-null parent | — |
case.ended.reason | string | Required in a non-null parent | pattern: ^[a-z][a-z0-9_.:-]{0,127}$. |
case.ended.class | "completed" · "transferred" · "caller_hangup" · "max_turns" · "timeout" · "failed" · "cancelled" · "inactivity" | Required in a non-null parent | — |
case.ended.disposition | string or null | Required in a non-null parent | maxLength: 128. |
case.ended.infrastructure | boolean | Required in a non-null parent | — |
case.variables | object | Required in a non-null parent | — |
case.variables.* | string | Optional | Additional keys are allowed. |
case.guard_events | array of object | Required in a non-null parent | maxItems: 2000. |
| case.guard_events[] · variant 1 | object | — | Fields for this schema branch. |
case.guard_events[].type | "compliance_block" | Required in a non-null parent | — |
case.guard_events[].turn | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
case.guard_events[].rule | string | Required in a non-null parent | pattern: ^[a-z][a-z0-9_.:-]{0,127}$. |
case.guard_events[].clause_hash | string | Required in a non-null parent | minLength: 1. maxLength: 256. |
| case.guard_events[] · variant 2 | object | — | Fields for this schema branch. |
case.guard_events[].type | "rpc_unconfirmed" | Required in a non-null parent | — |
case.guard_events[].turn | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
| case.guard_events[] · variant 3 | object | — | Fields for this schema branch. |
case.guard_events[].type | "atomic_unit" | Required in a non-null parent | — |
case.guard_events[].turn | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
case.guard_events[].unit_id | string | Required in a non-null parent | minLength: 1. maxLength: 256. |
case.guard_events[].delivered | boolean | Required in a non-null parent | — |
case.caller_trace | object or null | Required in a non-null parent | — |
case.caller_trace.clock | "participant" | Required in a non-null parent | — |
case.caller_trace.outcome | "completed" · "failed" · "timeout" | Optional | — |
case.caller_trace.truncated | boolean | Optional | — |
case.caller_trace.lines | array of object | Required in a non-null parent | maxItems: 200. |
case.caller_trace.lines[].step | integer or null | Required in a non-null parent | At least -9007199254740991. At most 9007199254740991. |
case.caller_trace.lines[].start | number | Required in a non-null parent | — |
case.caller_trace.lines[].end | number | Required in a non-null parent | — |
case.caller_trace.lines[].pauses | array of object | Required in a non-null parent | maxItems: 10. |
case.caller_trace.lines[].pauses[].start | number | Required in a non-null parent | — |
case.caller_trace.lines[].pauses[].end | number | Required in a non-null parent | — |
case.caller_trace.lines[].kind | "line" · "interjection" · "backchannel" · "beep" · "keypad" | Required in a non-null parent | — |
case.caller_trace.agent_audio | array of array of number | Required in a non-null parent | maxItems: 2000. |
case.caller_trace.joined_at_unix_ms | integer or null | Optional | Default: null. At least 0. At most 9007199254740991. |
case.redaction | object or null | Required in a non-null parent | — |
case.redaction.policy_version | string | Required in a non-null parent | minLength: 1. |
case.cost_usd | number or null | Required in a non-null parent | At least 0. |
Error responses
| HTTP | Description |
|---|---|
| 4XX | Typed error (ApiError) |
| 5XX | Typed error (ApiError) |
Errors use the shared error envelope. Inspect error.code, retryable, outcome and details before retrying.
Complete OpenAPI schema
{
"200": {
"description": "Get one trial: its assertion trace and, while retained, the transcript it was judged on",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestRunsTrialResponse200"
}
}
}
},
"4XX": {
"description": "Typed error (ApiError)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"5XX": {
"description": "Typed error (ApiError)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}
Referenced schemas
Expand the complete OpenAPI definitions for integrations that generate their own clients.
Complete OpenAPI schema
{
"components": {
"schemas": {
"TestRunsTrialResponse200": {
"type": "object",
"properties": {
"test_run_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"suite_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"case_id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9][a-z0-9_-]*$"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"result": {
"$ref": "#/components/schemas/TrialResult"
},
"case": {
"nullable": true,
"type": "object",
"properties": {
"run": {
"$ref": "#/components/schemas/Run"
},
"language": {
"type": "string",
"enum": [
"en",
"es"
]
},
"turns": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"role": {
"type": "string",
"enum": [
"user",
"agent"
]
},
"text": {
"type": "string",
"maxLength": 32000
},
"node_id": {
"nullable": true,
"type": "string",
"minLength": 1,
"maxLength": 128
},
"at_ms": {
"nullable": true,
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"index",
"role",
"text",
"node_id",
"at_ms"
],
"additionalProperties": false
}
},
"path": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "object",
"properties": {
"node_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"turn": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"via": {
"type": "string",
"enum": [
"prompt_edge",
"automatic",
"action_result",
"start",
"global",
"flex_task"
]
}
},
"required": [
"node_id",
"turn",
"via"
],
"additionalProperties": false
}
},
"tool_calls": {
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"effect_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"action_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"node_id": {
"nullable": true,
"type": "string",
"minLength": 1,
"maxLength": 128
},
"turn": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"args": {},
"answered_by": {
"anyOf": [
{
"type": "object",
"properties": {
"mock": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"mock"
],
"additionalProperties": false
},
{
"type": "string",
"enum": [
"source_receipt"
]
},
{
"type": "string",
"enum": [
"unmocked"
]
},
{
"type": "string",
"enum": [
"default"
]
}
]
},
"state": {
"type": "string",
"enum": [
"succeeded",
"failed"
]
},
"error_code": {
"nullable": true,
"type": "string",
"maxLength": 128
}
},
"required": [
"effect_id",
"action_id",
"node_id",
"turn",
"answered_by",
"state",
"error_code"
],
"additionalProperties": false
}
},
"transfer": {
"nullable": true,
"type": "object",
"properties": {
"node_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"turn": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"node_id",
"turn"
],
"additionalProperties": false
},
"ended": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"pattern": "^[a-z][a-z0-9_.:-]{0,127}$"
},
"class": {
"type": "string",
"enum": [
"completed",
"transferred",
"caller_hangup",
"max_turns",
"timeout",
"failed",
"cancelled",
"inactivity"
]
},
"disposition": {
"nullable": true,
"type": "string",
"maxLength": 128
},
"infrastructure": {
"type": "boolean"
}
},
"required": [
"reason",
"class",
"disposition",
"infrastructure"
],
"additionalProperties": false
},
"variables": {
"type": "object",
"additionalProperties": {
"type": "string",
"maxLength": 4096
}
},
"guard_events": {
"maxItems": 2000,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"compliance_block"
]
},
"turn": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"rule": {
"type": "string",
"pattern": "^[a-z][a-z0-9_.:-]{0,127}$"
},
"clause_hash": {
"type": "string",
"minLength": 1,
"maxLength": 256
}
},
"required": [
"type",
"turn",
"rule",
"clause_hash"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"rpc_unconfirmed"
]
},
"turn": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"type",
"turn"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"atomic_unit"
]
},
"turn": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"unit_id": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"delivered": {
"type": "boolean"
}
},
"required": [
"type",
"turn",
"unit_id",
"delivered"
],
"additionalProperties": false
}
]
}
},
"caller_trace": {
"nullable": true,
"type": "object",
"properties": {
"clock": {
"type": "string",
"enum": [
"participant"
]
},
"outcome": {
"type": "string",
"enum": [
"completed",
"failed",
"timeout"
]
},
"truncated": {
"type": "boolean"
},
"lines": {
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"step": {
"nullable": true,
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"start": {
"type": "number"
},
"end": {
"type": "number"
},
"pauses": {
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "number"
},
"end": {
"type": "number"
}
},
"required": [
"start",
"end"
],
"additionalProperties": false
}
},
"kind": {
"type": "string",
"enum": [
"line",
"interjection",
"backchannel",
"beep",
"keypad"
]
}
},
"required": [
"step",
"start",
"end",
"pauses",
"kind"
],
"additionalProperties": false
}
},
"agent_audio": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "array",
"items": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
}
]
},
"minItems": 2,
"maxItems": 2
}
},
"joined_at_unix_ms": {
"default": null,
"nullable": true,
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"clock",
"lines",
"agent_audio"
],
"additionalProperties": false
},
"redaction": {
"nullable": true,
"type": "object",
"properties": {
"policy_version": {
"type": "string",
"minLength": 1
}
},
"required": [
"policy_version"
],
"additionalProperties": false
},
"cost_usd": {
"nullable": true,
"type": "number",
"minimum": 0
}
},
"required": [
"run",
"language",
"turns",
"path",
"tool_calls",
"transfer",
"ended",
"variables",
"guard_events",
"caller_trace",
"redaction",
"cost_usd"
],
"additionalProperties": false
}
},
"required": [
"test_run_id",
"suite_id",
"case_id",
"name",
"result",
"case"
],
"additionalProperties": false
},
"TrialResult": {
"type": "object",
"properties": {
"case_id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9][a-z0-9_-]*$"
},
"trial": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 9007199254740991
},
"attempt": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 9007199254740991
},
"run_id": {
"nullable": true,
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"state": {
"type": "string",
"enum": [
"pending",
"running",
"evaluating",
"settled",
"cancelled"
]
},
"verdict": {
"nullable": true,
"type": "string",
"enum": [
"passed",
"failed",
"errored"
]
},
"reason": {
"nullable": true,
"type": "string",
"pattern": "^[a-z][a-z0-9_.:-]{0,127}$"
},
"assertions": {
"maxItems": 25,
"type": "array",
"items": {
"type": "object",
"properties": {
"assertion_id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]*$"
},
"type": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"verdict": {
"type": "string",
"enum": [
"passed",
"failed",
"not_applicable",
"insufficient_data",
"errored"
]
},
"measured": {
"type": "object",
"additionalProperties": {
"nullable": true,
"anyOf": [
{
"type": "string",
"maxLength": 256
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
},
"evidence": {
"type": "object",
"properties": {
"turns": {
"maxItems": 50,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"node_ids": {
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"effect_ids": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
}
}
},
"required": [
"turns",
"node_ids",
"effect_ids"
],
"additionalProperties": false
},
"judge": {
"nullable": true,
"type": "object",
"properties": {
"score": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"rejudged": {
"type": "boolean"
},
"criteria": {
"maxItems": 12,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"verdict": {
"type": "string",
"enum": [
"pass",
"fail",
"na"
]
},
"score": {
"nullable": true,
"type": "integer",
"minimum": 1,
"maximum": 5
},
"evidence_turns": {
"maxItems": 20,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"rationale": {
"nullable": true,
"type": "string",
"maxLength": 300
}
},
"required": [
"id",
"verdict",
"score",
"evidence_turns",
"rationale"
],
"additionalProperties": false
}
}
},
"required": [
"score",
"rejudged",
"criteria"
],
"additionalProperties": false
},
"reason": {
"nullable": true,
"type": "string",
"pattern": "^[a-z][a-z0-9_.:-]{0,127}$"
}
},
"required": [
"assertion_id",
"type",
"verdict",
"measured",
"evidence",
"judge",
"reason"
],
"additionalProperties": false
}
},
"guard": {
"type": "object",
"properties": {
"compliance_blocks": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"rpc_unconfirmed": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"atomic_half_said": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"compliance_blocks",
"rpc_unconfirmed",
"atomic_half_said"
],
"additionalProperties": false
},
"content_state": {
"type": "string",
"enum": [
"retained",
"expired"
]
}
},
"required": [
"case_id",
"trial",
"attempt",
"run_id",
"state",
"verdict",
"reason",
"assertions",
"guard",
"content_state"
],
"additionalProperties": false
},
"Run": {
"type": "object",
"properties": {
"owner_id": {
"type": "string",
"minLength": 1
},
"environment": {
"type": "string",
"minLength": 1
},
"tenant_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"run_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"agent_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
},
"publication": {
"$ref": "#/components/schemas/PublicationRef"
},
"plan_schema_version": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 9007199254740991
},
"channel": {
"type": "string",
"enum": [
"cloud",
"phone",
"web"
]
},
"mode": {
"type": "string",
"enum": [
"task",
"chat",
"background",
"outbound",
"inbound"
]
},
"state": {
"type": "string",
"enum": [
"admitted",
"running",
"ending",
"completed",
"failed",
"cancelled",
"rejected",
"expired"
]
},
"phone_state": {
"nullable": true,
"type": "string",
"enum": [
"admitted",
"preparing",
"awaiting_sip",
"dialing",
"ringing",
"active",
"terminating",
"ended",
"rejected",
"expired",
"setup_failed"
]
},
"outcome": {
"nullable": true,
"allOf": [
{
"$ref": "#/components/schemas/RunOutcome"
}
]
},
"disposition": {
"nullable": true,
"type": "string"
},
"trigger": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"sip"
]
},
"number_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"call_id_sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
"required": [
"kind",
"number_id",
"call_id_sha256"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"api"
]
},
"idempotency_key_sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
"required": [
"kind",
"idempotency_key_sha256"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"schedule"
]
},
"trigger_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"scheduled_for": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"kind",
"trigger_id",
"scheduled_for"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"event"
]
},
"trigger_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"source_event_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
}
},
"required": [
"kind",
"trigger_id",
"source_event_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"callback"
]
},
"source_run_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"effect_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
}
},
"required": [
"kind",
"source_run_id",
"effect_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"evaluation"
]
},
"comparison_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
}
},
"required": [
"kind",
"comparison_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"test"
]
},
"test_run_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"suite_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"case_id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9][a-z0-9_-]*$"
},
"trial": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"test_run_id",
"suite_id",
"case_id",
"trial"
],
"additionalProperties": false
}
]
},
"principal": {
"$ref": "#/components/schemas/PrincipalRef"
},
"attempt_count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"started_at": {
"nullable": true,
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"ended_at": {
"nullable": true,
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"version": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647
},
"to": {
"nullable": true,
"type": "string",
"minLength": 1,
"maxLength": 64
},
"from": {
"nullable": true,
"type": "string",
"minLength": 1,
"maxLength": 64
},
"duration_ms": {
"nullable": true,
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"test": {
"type": "boolean"
},
"provider_keys": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"enum": [
"platform"
]
}
},
"required": [
"source"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"enum": [
"tenant"
]
},
"last4": {
"type": "string",
"minLength": 1,
"maxLength": 4
},
"fingerprint": {
"type": "string",
"pattern": "^sha256:[a-f0-9]{12}$"
}
},
"required": [
"source",
"last4",
"fingerprint"
],
"additionalProperties": false
}
]
}
}
},
"required": [
"owner_id",
"environment",
"tenant_id",
"run_id",
"agent_id",
"publication",
"plan_schema_version",
"channel",
"mode",
"state",
"phone_state",
"outcome",
"disposition",
"trigger",
"principal",
"attempt_count",
"created_at",
"started_at",
"ended_at",
"version",
"to",
"from",
"duration_ms",
"metadata",
"test"
],
"additionalProperties": false
},
"PublicationRef": {
"type": "object",
"properties": {
"agent_id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
},
"version": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647
},
"digest": {
"type": "string",
"pattern": "^sha256:[a-f0-9]{64}$"
}
},
"required": [
"agent_id",
"version",
"digest"
],
"additionalProperties": false
},
"RunOutcome": {
"type": "object",
"properties": {
"transport": {
"type": "string",
"enum": [
"completed",
"busy",
"no_answer",
"rejected",
"cancelled",
"provider_failure",
"admission_expired",
"not_applicable"
]
},
"execution": {
"type": "string",
"enum": [
"completed",
"failed",
"cancelled",
"not_started",
"unknown"
]
},
"contact": {
"type": "string",
"enum": [
"human",
"voicemail",
"ivr",
"unknown",
"not_applicable"
]
},
"business": {
"oneOf": [
{
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"known"
]
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 256
}
},
"required": [
"status",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"unknown"
]
}
},
"required": [
"status"
],
"additionalProperties": false
}
]
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"result": {
"nullable": true,
"allOf": [
{
"$ref": "#/components/schemas/ContentRef"
}
]
}
},
"required": [
"transport",
"execution",
"contact",
"business",
"reason",
"result"
],
"additionalProperties": false
},
"ContentRef": {
"type": "object",
"properties": {
"artifact_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"byte_size": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"media_type": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"expires_at": {
"nullable": true,
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"artifact_id",
"sha256",
"byte_size",
"media_type",
"expires_at"
],
"additionalProperties": false
},
"PrincipalRef": {
"oneOf": [
{
"type": "object",
"properties": {
"owner_id": {
"type": "string",
"minLength": 1
},
"environment": {
"type": "string",
"minLength": 1
},
"kind": {
"type": "string",
"enum": [
"user"
]
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
}
},
"required": [
"owner_id",
"environment",
"kind",
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"owner_id": {
"type": "string",
"minLength": 1
},
"environment": {
"type": "string",
"minLength": 1
},
"kind": {
"type": "string",
"enum": [
"api_key"
]
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
}
},
"required": [
"owner_id",
"environment",
"kind",
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"owner_id": {
"type": "string",
"minLength": 1
},
"environment": {
"type": "string",
"minLength": 1
},
"kind": {
"type": "string",
"enum": [
"system"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 256
}
},
"required": [
"owner_id",
"environment",
"kind",
"id"
],
"additionalProperties": false
}
]
},
"ApiError": {
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"unauthenticated",
"forbidden",
"not_found",
"conflict",
"invalid_request",
"idempotency_conflict",
"policy_denied",
"capability_unavailable",
"provider_unavailable",
"knowledge_unavailable",
"publication_invalid",
"run_not_active",
"rate_limited",
"outcome_unknown",
"internal"
]
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"outcome": {
"type": "string",
"enum": [
"none",
"unknown"
]
},
"details": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"code",
"message",
"retryable",
"outcome"
],
"additionalProperties": false
}
},
"required": [
"error"
],
"additionalProperties": false
}
}
}
}
Errors and recovery
See API error handling and Troubleshooting.