{"openapi":"3.2.0","info":{"title":"Kejue Inference API","version":"2026-11-09","description":"Automation-first access to Kejue Voice and Inference for API clients, CLIs, and agents. Every error uses a stable machine-readable envelope. This allowlisted contract excludes browser-session, provider-callback, and operator routes."},"servers":[{"url":"https://api.kejue.co/v1","description":"Kejue production"},{"url":"{host}/v1","description":"On-prem","variables":{"host":{"default":"http://localhost:8081"}}}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Models and voices"},{"name":"Text to speech"},{"name":"Speech to text"},{"name":"File uploads"},{"name":"Transcription jobs"},{"name":"Realtime sessions"},{"name":"API keys"},{"name":"Usage and limits"}],"x-sonus-eval-lifecycle-example":{"description":"Complete automation workflow for defining a suite, adding a scenario, starting a dry-run eval, polling it to a terminal state, and inspecting one sanitized call. Every POST uses one stable Idempotency-Key per logical intent. Copy ETags exactly when editing or archiving suites and scenarios. Live external tools are isolated on create_live_eval_run and require the additional eval-runs:execute-live-tools scope.","steps":[{"operation_id":"create_eval_suite","request":{"method":"POST","path":"/v1/eval-suites","headers":{"Idempotency-Key":"eval-suite-support-regression-v1"},"body":{"slug":"support_regression","name":"Support regression","description":"Core escalation and refund scenarios.","definition":{"schema_version":1}}},"response":{"status":201,"headers":{"Location":"/v1/eval-suites/11111111-1111-4111-8111-111111111111","ETag":"\"eval-suite-11111111-1111-4111-8111-111111111111-v1\""}}},{"operation_id":"create_eval_scenario","request":{"method":"POST","path":"/v1/eval-suites/11111111-1111-4111-8111-111111111111/scenarios","headers":{"Idempotency-Key":"eval-scenario-angry-refund-v1"},"body":{"slug":"angry_refund","label":"Angry refund request","persona_text":"The caller is frustrated but cooperative.","scenario_text":"Request a refund, then ask for a supervisor if denied.","assertions":{"escalation_offered":true}}},"response":{"status":201,"headers":{"Location":"/v1/eval-suites/11111111-1111-4111-8111-111111111111/scenarios/22222222-2222-4222-8222-222222222222","ETag":"\"eval-scenario-22222222-2222-4222-8222-222222222222-v1\""}}},{"operation_id":"create_eval_run","request":{"method":"POST","path":"/v1/eval-runs","headers":{"Idempotency-Key":"eval-run-support-regression-agent-v17"},"body":{"agent_id":"33333333-3333-4333-8333-333333333333","agent_version_id":"44444444-4444-4444-8444-444444444444","suite_id":"11111111-1111-4111-8111-111111111111","mode":"text","concurrency":4,"tool_policy":"dry_run","runtime_profile":{}}},"response":{"status":202,"headers":{"Location":"/v1/eval-runs/55555555-5555-4555-8555-555555555555","Retry-After":"2"},"body":{"id":"55555555-5555-4555-8555-555555555555","effective_concurrency":4,"total":1}}},{"operation_id":"get_eval_run","request":{"method":"GET","path":"/v1/eval-runs/55555555-5555-4555-8555-555555555555"},"response":{"status":200,"body":{"id":"55555555-5555-4555-8555-555555555555","status":"done","tool_policy":"dry_run","completed":1,"total":1}}},{"operation_id":"get_eval_call","request":{"method":"GET","path":"/v1/eval-calls/66666666-6666-4666-8666-666666666666"},"response":{"status":200,"body":{"id":"66666666-6666-4666-8666-666666666666","timed_out":false,"error":null,"error_code":null}}}]},"x-kejue-eval-lifecycle-example":{"description":"Complete automation workflow for defining a suite, adding a scenario, starting a dry-run eval, polling it to a terminal state, and inspecting one sanitized call. Every POST uses one stable Idempotency-Key per logical intent. Copy ETags exactly when editing or archiving suites and scenarios. Live external tools are isolated on create_live_eval_run and require the additional eval-runs:execute-live-tools scope.","steps":[{"operation_id":"create_eval_suite","request":{"method":"POST","path":"/v1/eval-suites","headers":{"Idempotency-Key":"eval-suite-support-regression-v1"},"body":{"slug":"support_regression","name":"Support regression","description":"Core escalation and refund scenarios.","definition":{"schema_version":1}}},"response":{"status":201,"headers":{"Location":"/v1/eval-suites/11111111-1111-4111-8111-111111111111","ETag":"\"eval-suite-11111111-1111-4111-8111-111111111111-v1\""}}},{"operation_id":"create_eval_scenario","request":{"method":"POST","path":"/v1/eval-suites/11111111-1111-4111-8111-111111111111/scenarios","headers":{"Idempotency-Key":"eval-scenario-angry-refund-v1"},"body":{"slug":"angry_refund","label":"Angry refund request","persona_text":"The caller is frustrated but cooperative.","scenario_text":"Request a refund, then ask for a supervisor if denied.","assertions":{"escalation_offered":true}}},"response":{"status":201,"headers":{"Location":"/v1/eval-suites/11111111-1111-4111-8111-111111111111/scenarios/22222222-2222-4222-8222-222222222222","ETag":"\"eval-scenario-22222222-2222-4222-8222-222222222222-v1\""}}},{"operation_id":"create_eval_run","request":{"method":"POST","path":"/v1/eval-runs","headers":{"Idempotency-Key":"eval-run-support-regression-agent-v17"},"body":{"agent_id":"33333333-3333-4333-8333-333333333333","agent_version_id":"44444444-4444-4444-8444-444444444444","suite_id":"11111111-1111-4111-8111-111111111111","mode":"text","concurrency":4,"tool_policy":"dry_run","runtime_profile":{}}},"response":{"status":202,"headers":{"Location":"/v1/eval-runs/55555555-5555-4555-8555-555555555555","Retry-After":"2"},"body":{"id":"55555555-5555-4555-8555-555555555555","effective_concurrency":4,"total":1}}},{"operation_id":"get_eval_run","request":{"method":"GET","path":"/v1/eval-runs/55555555-5555-4555-8555-555555555555"},"response":{"status":200,"body":{"id":"55555555-5555-4555-8555-555555555555","status":"done","tool_policy":"dry_run","completed":1,"total":1}}},{"operation_id":"get_eval_call","request":{"method":"GET","path":"/v1/eval-calls/66666666-6666-4666-8666-666666666666"},"response":{"status":200,"body":{"id":"66666666-6666-4666-8666-666666666666","timed_out":false,"error":null,"error_code":null}}}]},"x-sonus-agent-lifecycle-example":{"description":"Complete conditional-write sequence for one automation client. ETags are opaque; the r1 representation-version and cap-00 capability segments are illustrative and can change independently of the persisted revision. Reuse an Idempotency-Key only to replay the identical logical request.","steps":[{"operation_id":"create_agent","request":{"method":"POST","path":"/v1/agents","headers":{"Authorization":"Bearer <api-key>","Content-Type":"application/json","Idempotency-Key":"agent-create-billing-20260720"},"body":{"slug":"billing_assistant","name":"Billing Assistant","mode":"prompt","prompt":"Help {{lead_name}} with billing. Correlation ID is {{system.call_id}}."}},"response":{"status":201,"headers":{"Location":"/v1/agents/11111111-1111-4111-8111-111111111111","ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v1\""},"body":{"id":"11111111-1111-4111-8111-111111111111","slug":"billing_assistant","name":"Billing Assistant","mode":"prompt","draft_version_id":"22222222-2222-4222-8222-222222222222","revision":1,"updated_at":"2026-07-20T09:00:00Z"}}},{"operation_id":"update_agent_draft","request":{"method":"PATCH","path":"/v1/agents/11111111-1111-4111-8111-111111111111/draft","headers":{"Content-Type":"application/json","If-Match":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v1\""},"body":{"prompt":"Resolve {{vars.account_id}} safely for caller {{system.caller_phone}}.","pipeline_topology":"two_stage_speechlm"}},"response":{"status":200,"headers":{"ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v2\""},"body":{"id":"22222222-2222-4222-8222-222222222222","agent_id":"11111111-1111-4111-8111-111111111111","updated":true,"revision":2,"updated_at":"2026-07-20T09:08:00Z","draft":{"id":"22222222-2222-4222-8222-222222222222","is_draft":true,"prompt":"Resolve {{vars.account_id}} safely for caller {{system.caller_phone}}.","pipeline_topology":"two_stage_speechlm","pipeline_mode":"speech_model","endpointing_mode":"auto","created_at":"2026-07-20T09:00:00Z"}}}},{"operation_id":"get_agent_version_after_call","request":{"method":"GET","path":"/v1/agent-versions/22222222-2222-4222-8222-222222222222/after-call"},"response":{"status":200,"headers":{"ETag":"\"after-call-22222222-2222-4222-8222-222222222222-v0\""},"body":{"id":null,"agent_version_id":"22222222-2222-4222-8222-222222222222","summary_enabled":true,"summary_prompt":null,"extraction_object_ids":[],"webhook_config_ids":[],"version":0,"created_at":null,"updated_at":null}}},{"operation_id":"update_agent_version_after_call","request":{"method":"PATCH","path":"/v1/agent-versions/22222222-2222-4222-8222-222222222222/after-call","headers":{"Content-Type":"application/json","If-Match":"\"after-call-22222222-2222-4222-8222-222222222222-v0\""},"body":{"summary_enabled":true,"extraction_object_ids":["44444444-4444-4444-8444-444444444444"],"webhook_config_ids":["55555555-5555-4555-8555-555555555555"]}},"response":{"status":200,"headers":{"ETag":"\"after-call-22222222-2222-4222-8222-222222222222-v1\"","Sonus-Agent-ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v3\"","Kejue-Agent-ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v3\""},"body":{"id":"66666666-6666-4666-8666-666666666666","agent_version_id":"22222222-2222-4222-8222-222222222222","summary_enabled":true,"summary_prompt":null,"extraction_object_ids":["44444444-4444-4444-8444-444444444444"],"webhook_config_ids":["55555555-5555-4555-8555-555555555555"],"version":1,"created_at":"2026-07-20T09:10:00Z","updated_at":"2026-07-20T09:10:00Z"}}},{"operation_id":"promote_agent_draft_to_staging","request":{"method":"POST","path":"/v1/agents/11111111-1111-4111-8111-111111111111/promote-staging","headers":{"Content-Type":"application/json","Idempotency-Key":"agent-promote-billing-v1-20260720","If-Match":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v3\""},"body":{"name":"Initial production candidate"}},"response":{"status":201,"headers":{"Location":"/v1/agent-versions/33333333-3333-4333-8333-333333333333","ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v4\""},"body":{"id":"33333333-3333-4333-8333-333333333333","agent_id":"11111111-1111-4111-8111-111111111111","staging_version_id":"33333333-3333-4333-8333-333333333333","version":1,"revision":4,"updated_at":"2026-07-20T09:15:00Z"}}},{"operation_id":"deploy_agent_to_production","request":{"method":"POST","path":"/v1/agents/11111111-1111-4111-8111-111111111111/deploy","headers":{"Idempotency-Key":"agent-deploy-billing-v1-20260720","If-Match":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v4\""},"body":null},"response":{"status":200,"headers":{"ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v5\""},"body":{"agent_id":"11111111-1111-4111-8111-111111111111","production_version_id":"33333333-3333-4333-8333-333333333333","updated":true,"revision":5,"updated_at":"2026-07-20T09:25:00Z"}}},{"operation_id":"set_agent_staging_version","context":"A later version 2 is now staged/produced and the aggregate is revision 7; selecting immutable version 1 prepares a rollback without mutating history.","request":{"method":"PUT","path":"/v1/agents/11111111-1111-4111-8111-111111111111/staging","headers":{"Content-Type":"application/json","If-Match":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v7\""},"body":{"version_id":"33333333-3333-4333-8333-333333333333"}},"response":{"status":200,"headers":{"ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v8\""},"body":{"agent_id":"11111111-1111-4111-8111-111111111111","staging_version_id":"33333333-3333-4333-8333-333333333333","updated":true,"revision":8,"updated_at":"2026-07-20T10:00:00Z"}},"next":"Call deploy_agent_to_production with a new Idempotency-Key and the returned v8 ETag to move production to the rollback snapshot."}]},"x-kejue-agent-lifecycle-example":{"description":"Complete conditional-write sequence for one automation client. ETags are opaque; the r1 representation-version and cap-00 capability segments are illustrative and can change independently of the persisted revision. Reuse an Idempotency-Key only to replay the identical logical request.","steps":[{"operation_id":"create_agent","request":{"method":"POST","path":"/v1/agents","headers":{"Authorization":"Bearer <api-key>","Content-Type":"application/json","Idempotency-Key":"agent-create-billing-20260720"},"body":{"slug":"billing_assistant","name":"Billing Assistant","mode":"prompt","prompt":"Help {{lead_name}} with billing. Correlation ID is {{system.call_id}}."}},"response":{"status":201,"headers":{"Location":"/v1/agents/11111111-1111-4111-8111-111111111111","ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v1\""},"body":{"id":"11111111-1111-4111-8111-111111111111","slug":"billing_assistant","name":"Billing Assistant","mode":"prompt","draft_version_id":"22222222-2222-4222-8222-222222222222","revision":1,"updated_at":"2026-07-20T09:00:00Z"}}},{"operation_id":"update_agent_draft","request":{"method":"PATCH","path":"/v1/agents/11111111-1111-4111-8111-111111111111/draft","headers":{"Content-Type":"application/json","If-Match":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v1\""},"body":{"prompt":"Resolve {{vars.account_id}} safely for caller {{system.caller_phone}}.","pipeline_topology":"two_stage_speechlm"}},"response":{"status":200,"headers":{"ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v2\""},"body":{"id":"22222222-2222-4222-8222-222222222222","agent_id":"11111111-1111-4111-8111-111111111111","updated":true,"revision":2,"updated_at":"2026-07-20T09:08:00Z","draft":{"id":"22222222-2222-4222-8222-222222222222","is_draft":true,"prompt":"Resolve {{vars.account_id}} safely for caller {{system.caller_phone}}.","pipeline_topology":"two_stage_speechlm","pipeline_mode":"speech_model","endpointing_mode":"auto","created_at":"2026-07-20T09:00:00Z"}}}},{"operation_id":"get_agent_version_after_call","request":{"method":"GET","path":"/v1/agent-versions/22222222-2222-4222-8222-222222222222/after-call"},"response":{"status":200,"headers":{"ETag":"\"after-call-22222222-2222-4222-8222-222222222222-v0\""},"body":{"id":null,"agent_version_id":"22222222-2222-4222-8222-222222222222","summary_enabled":true,"summary_prompt":null,"extraction_object_ids":[],"webhook_config_ids":[],"version":0,"created_at":null,"updated_at":null}}},{"operation_id":"update_agent_version_after_call","request":{"method":"PATCH","path":"/v1/agent-versions/22222222-2222-4222-8222-222222222222/after-call","headers":{"Content-Type":"application/json","If-Match":"\"after-call-22222222-2222-4222-8222-222222222222-v0\""},"body":{"summary_enabled":true,"extraction_object_ids":["44444444-4444-4444-8444-444444444444"],"webhook_config_ids":["55555555-5555-4555-8555-555555555555"]}},"response":{"status":200,"headers":{"ETag":"\"after-call-22222222-2222-4222-8222-222222222222-v1\"","Sonus-Agent-ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v3\"","Kejue-Agent-ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v3\""},"body":{"id":"66666666-6666-4666-8666-666666666666","agent_version_id":"22222222-2222-4222-8222-222222222222","summary_enabled":true,"summary_prompt":null,"extraction_object_ids":["44444444-4444-4444-8444-444444444444"],"webhook_config_ids":["55555555-5555-4555-8555-555555555555"],"version":1,"created_at":"2026-07-20T09:10:00Z","updated_at":"2026-07-20T09:10:00Z"}}},{"operation_id":"promote_agent_draft_to_staging","request":{"method":"POST","path":"/v1/agents/11111111-1111-4111-8111-111111111111/promote-staging","headers":{"Content-Type":"application/json","Idempotency-Key":"agent-promote-billing-v1-20260720","If-Match":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v3\""},"body":{"name":"Initial production candidate"}},"response":{"status":201,"headers":{"Location":"/v1/agent-versions/33333333-3333-4333-8333-333333333333","ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v4\""},"body":{"id":"33333333-3333-4333-8333-333333333333","agent_id":"11111111-1111-4111-8111-111111111111","staging_version_id":"33333333-3333-4333-8333-333333333333","version":1,"revision":4,"updated_at":"2026-07-20T09:15:00Z"}}},{"operation_id":"deploy_agent_to_production","request":{"method":"POST","path":"/v1/agents/11111111-1111-4111-8111-111111111111/deploy","headers":{"Idempotency-Key":"agent-deploy-billing-v1-20260720","If-Match":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v4\""},"body":null},"response":{"status":200,"headers":{"ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v5\""},"body":{"agent_id":"11111111-1111-4111-8111-111111111111","production_version_id":"33333333-3333-4333-8333-333333333333","updated":true,"revision":5,"updated_at":"2026-07-20T09:25:00Z"}}},{"operation_id":"set_agent_staging_version","context":"A later version 2 is now staged/produced and the aggregate is revision 7; selecting immutable version 1 prepares a rollback without mutating history.","request":{"method":"PUT","path":"/v1/agents/11111111-1111-4111-8111-111111111111/staging","headers":{"Content-Type":"application/json","If-Match":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v7\""},"body":{"version_id":"33333333-3333-4333-8333-333333333333"}},"response":{"status":200,"headers":{"ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v8\""},"body":{"agent_id":"11111111-1111-4111-8111-111111111111","staging_version_id":"33333333-3333-4333-8333-333333333333","updated":true,"revision":8,"updated_at":"2026-07-20T10:00:00Z"}},"next":"Call deploy_agent_to_production with a new Idempotency-Key and the returned v8 ETag to move production to the rollback snapshot."}]},"x-sonus-agent-recovery-examples":{"invalid_path":{"status":400,"response":{"error":{"code":"invalid_path_parameter","message":"path parameter \"id\" must be a UUID","request_id":"req_agent_400_path","details":{"parameter":"id","value":"not-a-uuid","expected":"uuid"}}},"recovery":"Use the canonical UUID returned by create/list/get. Do not substitute an agent slug for an id or an agent id for an agent-version id."},"invalid_cursor":{"status":400,"response":{"error":{"code":"invalid_query_parameter","message":"cursor is malformed or was not issued by this endpoint","request_id":"req_agent_400_cursor","details":{"parameter":"cursor","reason":"invalid_cursor"}}},"recovery":"Discard the cursor and restart the same traversal without cursor. Only reuse next_cursor with the exact endpoint, agent, sort, and filter shape that issued it."},"malformed_request":{"status":400,"response":{"error":{"code":"invalid_json","message":"request body is not valid JSON","request_id":"req_agent_400"}},"recovery":"Correct JSON syntax and Content-Type, then retry. Reuse the same Idempotency-Key only when the corrected request represents the same logical intent; otherwise choose a new key."},"slug_conflict":{"status":409,"response":{"error":{"code":"slug_taken","message":"an agent with this slug already exists","request_id":"req_agent_409","details":{"field":"slug","value":"billing_assistant"}}},"recovery":"Choose a different stable slug or GET /agents?q=billing_assistant and operate on the existing aggregate. Do not retry the unchanged create body."},"stale_aggregate":{"status":412,"response_headers":{"ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v6\""},"response":{"error":{"code":"precondition_failed","message":"resource has changed","request_id":"req_agent_412"}},"recovery":"GET the aggregate, reconcile the intended patch against its current representation, and retry with the response ETag. Never blindly substitute the 412 tag when the intervening change may conflict with the intent."},"stale_after_call":{"status":412,"response_headers":{"ETag":"\"after-call-22222222-2222-4222-8222-222222222222-v2\""},"response":{"error":{"code":"precondition_failed","message":"resource has changed","request_id":"req_agent_after_call_412"}},"recovery":"GET the same after-call resource, reconcile its fields, and retry with that primary ETag. Do not use Sonus-Agent-ETag as the after-call If-Match; retain Sonus-Agent-ETag only for the next parent-agent lifecycle mutation."},"invalid_template":{"status":422,"response":{"error":{"code":"validation_failed","message":"request failed validation","request_id":"req_agent_422_template","details":{"fields":[{"path":"behavior.system_tools.transfer_cold[0].destination","code":"template_scope_required","message":"this field requires an explicit slots, vars, or system scope"}]}}},"recovery":"Replace a bare transfer alias such as {{phone}} with a defined scoped reference such as {{slots.phone}}, then rerun estimate-baseline before saving."},"baseline_over_budget":{"status":422,"response":{"error":{"code":"agent_baseline_too_large","message":"agent baseline exceeds the configured headroom budget","request_id":"req_agent_422_budget","details":{"baseline_tokens":27120,"max_model_len":24576,"model_context_limit":32768,"headroom_budget":24576,"system_tokens":13000,"tools_tokens":14120}}},"recovery":"Remove or shorten prompt instructions and unneeded assigned tools until estimate-baseline reports baseline_tokens <= max_model_len, then save with the latest aggregate ETag."},"remove_unsupported_query_parameters":{"status":400,"response":{"error":{"code":"unknown_query_parameter","message":"one or more query parameters are not supported","request_id":"req_agent_400_query","details":{"parameters":["limit"],"allowed_parameters":[]}}},"recovery":"Remove every parameter listed in details.parameters. Catalog reads such as GET /background-noises take no query parameters and return the full list in one response."}},"x-kejue-agent-recovery-examples":{"invalid_path":{"status":400,"response":{"error":{"code":"invalid_path_parameter","message":"path parameter \"id\" must be a UUID","request_id":"req_agent_400_path","details":{"parameter":"id","value":"not-a-uuid","expected":"uuid"}}},"recovery":"Use the canonical UUID returned by create/list/get. Do not substitute an agent slug for an id or an agent id for an agent-version id."},"invalid_cursor":{"status":400,"response":{"error":{"code":"invalid_query_parameter","message":"cursor is malformed or was not issued by this endpoint","request_id":"req_agent_400_cursor","details":{"parameter":"cursor","reason":"invalid_cursor"}}},"recovery":"Discard the cursor and restart the same traversal without cursor. Only reuse next_cursor with the exact endpoint, agent, sort, and filter shape that issued it."},"malformed_request":{"status":400,"response":{"error":{"code":"invalid_json","message":"request body is not valid JSON","request_id":"req_agent_400"}},"recovery":"Correct JSON syntax and Content-Type, then retry. Reuse the same Idempotency-Key only when the corrected request represents the same logical intent; otherwise choose a new key."},"slug_conflict":{"status":409,"response":{"error":{"code":"slug_taken","message":"an agent with this slug already exists","request_id":"req_agent_409","details":{"field":"slug","value":"billing_assistant"}}},"recovery":"Choose a different stable slug or GET /agents?q=billing_assistant and operate on the existing aggregate. Do not retry the unchanged create body."},"stale_aggregate":{"status":412,"response_headers":{"ETag":"\"agent-11111111-1111-4111-8111-111111111111-r1-cap-00-v6\""},"response":{"error":{"code":"precondition_failed","message":"resource has changed","request_id":"req_agent_412"}},"recovery":"GET the aggregate, reconcile the intended patch against its current representation, and retry with the response ETag. Never blindly substitute the 412 tag when the intervening change may conflict with the intent."},"stale_after_call":{"status":412,"response_headers":{"ETag":"\"after-call-22222222-2222-4222-8222-222222222222-v2\""},"response":{"error":{"code":"precondition_failed","message":"resource has changed","request_id":"req_agent_after_call_412"}},"recovery":"GET the same after-call resource, reconcile its fields, and retry with that primary ETag. Do not use Sonus-Agent-ETag as the after-call If-Match; retain Sonus-Agent-ETag only for the next parent-agent lifecycle mutation."},"invalid_template":{"status":422,"response":{"error":{"code":"validation_failed","message":"request failed validation","request_id":"req_agent_422_template","details":{"fields":[{"path":"behavior.system_tools.transfer_cold[0].destination","code":"template_scope_required","message":"this field requires an explicit slots, vars, or system scope"}]}}},"recovery":"Replace a bare transfer alias such as {{phone}} with a defined scoped reference such as {{slots.phone}}, then rerun estimate-baseline before saving."},"baseline_over_budget":{"status":422,"response":{"error":{"code":"agent_baseline_too_large","message":"agent baseline exceeds the configured headroom budget","request_id":"req_agent_422_budget","details":{"baseline_tokens":27120,"max_model_len":24576,"model_context_limit":32768,"headroom_budget":24576,"system_tokens":13000,"tools_tokens":14120}}},"recovery":"Remove or shorten prompt instructions and unneeded assigned tools until estimate-baseline reports baseline_tokens <= max_model_len, then save with the latest aggregate ETag."},"remove_unsupported_query_parameters":{"status":400,"response":{"error":{"code":"unknown_query_parameter","message":"one or more query parameters are not supported","request_id":"req_agent_400_query","details":{"parameters":["limit"],"allowed_parameters":[]}}},"recovery":"Remove every parameter listed in details.parameters. Catalog reads such as GET /background-noises take no query parameters and return the full list in one response."}},"x-sonus-guardrail-recovery-examples":{"discard_invalid_cursor_and_restart_the_same_filtered_traversal":{"status":400,"response":{"error":{"code":"invalid_query_parameter","message":"cursor is malformed or was not issued by this endpoint","request_id":"req_guardrail_cursor_400","details":{"parameter":"cursor","reason":"invalid_cursor"}}},"recovery":"Discard the cursor and restart without cursor. Preserve q, created_from, created_to, and archived while traversing; a cursor issued for any other filter set or endpoint is intentionally rejected."},"correct_all_validation_fields_or_choose_a_different_slug":{"cases":{"validation":{"status":422,"response":{"error":{"code":"validation_failed","message":"request failed validation","request_id":"req_guardrail_create_422","details":{"fields":[{"path":"definition.guardrails[0].instruction","code":"required","message":"instruction is required"}]}}}},"slug_conflict":{"status":409,"response":{"error":{"code":"slug_taken","message":"a guardrail set with this slug already exists in this workspace","request_id":"req_guardrail_create_409","details":{"field":"slug","value":"payment_safety"}}}}},"recovery":"Correct every details.fields entry before retrying a 422. For slug_taken, choose a different immutable slug or list with q=payment_safety and operate on the existing set. Reuse the Idempotency-Key only for the same logical intent."},"patch_the_complete_definition_when_configuration_errors_is_present":{"status":200,"condition":"The detail response contains configuration_errors.","recovery":"Treat the returned normalized definition as a safe repair starting point, review every configuration_errors entry, then PATCH a complete corrected definition with the response ETag. Invalid omitted rules are not assumed to execute. A malformed or missing root/guardrails container, a stored definition above the 1,048,576-byte encoded limit, or an oversized normalized safe view can make the returned definition empty; do not infer that any stored rule still executes. When the errors report only an aggregate runtime-budget breach, every individually valid rule remains in definition; shorten or remove rules until every reported aggregate limit is met."},"reconcile_412_or_reduce_the_reported_agent_runtime_budget":{"cases":{"stale_etag":{"status":412,"response_headers":{"ETag":"\"guardrail-set-11111111-1111-4111-8111-111111111111-r1-v4\""},"response":{"error":{"code":"precondition_failed","message":"the resource changed since the supplied If-Match value was issued","request_id":"req_guardrail_patch_412","details":{"header":"If-Match","current_etag":"\"guardrail-set-11111111-1111-4111-8111-111111111111-r1-v4\""}}}},"assigned_agent_budget":{"status":422,"response":{"error":{"code":"validation_failed","message":"request failed validation","request_id":"req_guardrail_patch_422","details":{"fields":[{"path":"definition","code":"assigned_agent_guardrail_instruction_budget_exceeded","message":"definition would exceed the guardrail runtime budget for agent \"billing_assistant\" production version: assigned LLM guardrail instructions contain 40001 characters; the per-agent limit is 40000"}]}}}}},"recovery":"For 412, GET and reconcile before retrying with the fresh ETag. For 422, use each field message to identify the active agent/stage, then reduce this definition or detach another set without exceeding any runtime aggregate."},"detach_every_reported_active_agent_version_then_retry":{"status":409,"response":{"error":{"code":"guardrail_set_in_use","message":"guardrail set cannot be archived while active agent versions reference it","request_id":"req_guardrail_archive_409","details":{"dependencies":[{"kind":"agent_version","agent_id":"33333333-3333-4333-8333-333333333333","agent_slug":"billing_assistant","agent_name":"Billing Assistant","agent_version_id":"44444444-4444-4444-8444-444444444444","agent_version":null,"deployment_stage":"draft","reference":"behavior.guardrails.guardrail_set_ids"}],"dependency_count":1}}},"recovery":"Remove the UUID from the listed draft. When staging or production is listed, promote/deploy replacement versions that do not reference it. Re-GET the set and retry DELETE with the fresh ETag only after every listed active pointer moved."}},"x-kejue-guardrail-recovery-examples":{"discard_invalid_cursor_and_restart_the_same_filtered_traversal":{"status":400,"response":{"error":{"code":"invalid_query_parameter","message":"cursor is malformed or was not issued by this endpoint","request_id":"req_guardrail_cursor_400","details":{"parameter":"cursor","reason":"invalid_cursor"}}},"recovery":"Discard the cursor and restart without cursor. Preserve q, created_from, created_to, and archived while traversing; a cursor issued for any other filter set or endpoint is intentionally rejected."},"correct_all_validation_fields_or_choose_a_different_slug":{"cases":{"validation":{"status":422,"response":{"error":{"code":"validation_failed","message":"request failed validation","request_id":"req_guardrail_create_422","details":{"fields":[{"path":"definition.guardrails[0].instruction","code":"required","message":"instruction is required"}]}}}},"slug_conflict":{"status":409,"response":{"error":{"code":"slug_taken","message":"a guardrail set with this slug already exists in this workspace","request_id":"req_guardrail_create_409","details":{"field":"slug","value":"payment_safety"}}}}},"recovery":"Correct every details.fields entry before retrying a 422. For slug_taken, choose a different immutable slug or list with q=payment_safety and operate on the existing set. Reuse the Idempotency-Key only for the same logical intent."},"patch_the_complete_definition_when_configuration_errors_is_present":{"status":200,"condition":"The detail response contains configuration_errors.","recovery":"Treat the returned normalized definition as a safe repair starting point, review every configuration_errors entry, then PATCH a complete corrected definition with the response ETag. Invalid omitted rules are not assumed to execute. A malformed or missing root/guardrails container, a stored definition above the 1,048,576-byte encoded limit, or an oversized normalized safe view can make the returned definition empty; do not infer that any stored rule still executes. When the errors report only an aggregate runtime-budget breach, every individually valid rule remains in definition; shorten or remove rules until every reported aggregate limit is met."},"reconcile_412_or_reduce_the_reported_agent_runtime_budget":{"cases":{"stale_etag":{"status":412,"response_headers":{"ETag":"\"guardrail-set-11111111-1111-4111-8111-111111111111-r1-v4\""},"response":{"error":{"code":"precondition_failed","message":"the resource changed since the supplied If-Match value was issued","request_id":"req_guardrail_patch_412","details":{"header":"If-Match","current_etag":"\"guardrail-set-11111111-1111-4111-8111-111111111111-r1-v4\""}}}},"assigned_agent_budget":{"status":422,"response":{"error":{"code":"validation_failed","message":"request failed validation","request_id":"req_guardrail_patch_422","details":{"fields":[{"path":"definition","code":"assigned_agent_guardrail_instruction_budget_exceeded","message":"definition would exceed the guardrail runtime budget for agent \"billing_assistant\" production version: assigned LLM guardrail instructions contain 40001 characters; the per-agent limit is 40000"}]}}}}},"recovery":"For 412, GET and reconcile before retrying with the fresh ETag. For 422, use each field message to identify the active agent/stage, then reduce this definition or detach another set without exceeding any runtime aggregate."},"detach_every_reported_active_agent_version_then_retry":{"status":409,"response":{"error":{"code":"guardrail_set_in_use","message":"guardrail set cannot be archived while active agent versions reference it","request_id":"req_guardrail_archive_409","details":{"dependencies":[{"kind":"agent_version","agent_id":"33333333-3333-4333-8333-333333333333","agent_slug":"billing_assistant","agent_name":"Billing Assistant","agent_version_id":"44444444-4444-4444-8444-444444444444","agent_version":null,"deployment_stage":"draft","reference":"behavior.guardrails.guardrail_set_ids"}],"dependency_count":1}}},"recovery":"Remove the UUID from the listed draft. When staging or production is listed, promote/deploy replacement versions that do not reference it. Re-GET the set and retry DELETE with the fresh ETag only after every listed active pointer moved."}},"paths":{"/inference/uploads":{"post":{"operationId":"create_inference_upload","summary":"Create a resumable audio upload","description":"Creates a bounded, workspace-owned upload session for the original audio file. Upload bytes directly to signed storage URLs, rather than through the API.\n\nThe session expires after 24 hours. Outstanding upload and byte budgets are checked before storage access is issued.\n\nKeep one stable Idempotency-Key for this logical upload. An ambiguous retry with the same payload returns its identity; changing the payload conflicts. See [file jobs](/inference/async-transcription#upload-and-submit).","security":[{"inferenceBearerAuth":[]}],"tags":["File uploads"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"},"description":"Required. Reuse the same key to retry this write safely. [Retries and idempotency](/voice/essentials/idempotency)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceUploadCreate"}}}},"responses":{"201":{"description":"Create a resumable audio upload","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceUpload"}}}},"400":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sonus-required-permission":"inference-stt:create","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"required","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","idempotency_key_required","invalid_idempotency_key","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"408":["request_timeout"],"409":["conflict","idempotency_conflict","idempotency_in_progress","idempotency_result_lost","idempotency_security_context_changed","inference_job_limit"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","idempotency_identity_unavailable","idempotency_misconfigured","idempotency_persistence_failed","idempotency_unavailable","internal_error","stored_data_invalid"],"503":["authentication_unavailable","idempotency_capacity_exceeded","idempotency_result_unavailable","idempotency_unavailable","inference_async_disabled","inference_model_unavailable","inference_storage_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-stt:create","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"required","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","idempotency_key_required","invalid_idempotency_key","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"408":["request_timeout"],"409":["conflict","idempotency_conflict","idempotency_in_progress","idempotency_result_lost","idempotency_security_context_changed","inference_job_limit"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","idempotency_identity_unavailable","idempotency_misconfigured","idempotency_persistence_failed","idempotency_unavailable","internal_error","stored_data_invalid"],"503":["authentication_unavailable","idempotency_capacity_exceeded","idempotency_result_unavailable","idempotency_unavailable","inference_async_disabled","inference_model_unavailable","inference_storage_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/uploads/{id}":{"get":{"operationId":"get_inference_upload","summary":"Read upload progress","description":"Returns this workspace’s authoritative stored-part inventory and upload expiry. The response contains no storage object keys or credentials.\n\nAfter reopening a browser, reselect the original file and compare each stored part’s size and SHA-256 before reusing it. See [resuming uploads](/inference/async-transcription#resume-an-interrupted-upload).","security":[{"inferenceBearerAuth":[]}],"tags":["File uploads"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Read upload progress","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceUpload"}}}},"400":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sonus-required-permission":"inference-stt:create","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"not_applicable","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"410":["inference_upload_expired"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_storage_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-stt:create","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"not_applicable","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"410":["inference_upload_expired"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_storage_unavailable"]},"x-kejue-cache-control":"private, no-store"},"delete":{"operationId":"delete_inference_upload","summary":"Abort an unused audio upload","description":"Aborts an unused workspace-owned upload and schedules physical cleanup, including unfinished multipart parts.\n\nAfter attaching an upload to a job, delete the job instead. Unknown and cross-workspace IDs return the same not-found response. See [deletion](/inference/async-transcription#charges-cancellation-and-deletion).","security":[{"inferenceBearerAuth":[]}],"tags":["File uploads"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Abort an unused audio upload","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sonus-required-permission":"inference-stt:create","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"not_applicable","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"409":["conflict"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_storage_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-stt:create","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"not_applicable","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"409":["conflict"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_storage_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/uploads/{id}/parts":{"post":{"operationId":"sign_inference_upload_parts","summary":"Sign audio upload parts","description":"Signs at most four exact part numbers and base64 SHA-256 checksums. Parts are 16 MiB except the final remainder. Each URL binds its bytes, checksum and required headers, and lasts at most 15 minutes.\n\nRefresh expired URLs with a new Idempotency-Key while the upload is valid. Send no API authorization or cookies to storage. Browser JavaScript must let the browser set Content-Length. See [uploading parts](/inference/async-transcription#upload-and-submit).","security":[{"inferenceBearerAuth":[]}],"tags":["File uploads"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"},"description":"Required. Reuse the same key to retry this write safely. [Retries and idempotency](/voice/essentials/idempotency)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceUploadPartsRequest"}}}},"responses":{"200":{"description":"Sign audio upload parts","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceSignedUploadParts"}}}},"400":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sonus-required-permission":"inference-stt:create","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"required","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","idempotency_key_required","invalid_idempotency_key","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"409":["conflict","idempotency_conflict","idempotency_in_progress","idempotency_result_lost","idempotency_security_context_changed"],"410":["inference_upload_expired"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","idempotency_identity_unavailable","idempotency_misconfigured","idempotency_persistence_failed","idempotency_unavailable","internal_error","stored_data_invalid"],"503":["authentication_unavailable","idempotency_capacity_exceeded","idempotency_result_unavailable","idempotency_unavailable","inference_async_disabled","inference_model_unavailable","inference_storage_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-stt:create","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"required","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","idempotency_key_required","invalid_idempotency_key","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"409":["conflict","idempotency_conflict","idempotency_in_progress","idempotency_result_lost","idempotency_security_context_changed"],"410":["inference_upload_expired"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","idempotency_identity_unavailable","idempotency_misconfigured","idempotency_persistence_failed","idempotency_unavailable","internal_error","stored_data_invalid"],"503":["authentication_unavailable","idempotency_capacity_exceeded","idempotency_result_unavailable","idempotency_unavailable","inference_async_disabled","inference_model_unavailable","inference_storage_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/uploads/{id}/complete":{"post":{"operationId":"complete_inference_upload","summary":"Complete an audio upload","description":"Completes the multipart upload after reconciling the server-side part inventory and actual stored size.\n\nSend an empty JSON object and keep one stable Idempotency-Key across retries. Multipart ETags are not whole-file SHA-256 proofs. A ready upload can attach to one transcription job. See [upload and submit](/inference/async-transcription#upload-and-submit).","security":[{"inferenceBearerAuth":[]}],"tags":["File uploads"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"},"description":"Required. Reuse the same key to retry this write safely. [Retries and idempotency](/voice/essentials/idempotency)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Complete an audio upload","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceUpload"}}}},"400":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sonus-required-permission":"inference-stt:create","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"required","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","idempotency_key_required","invalid_idempotency_key","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"409":["conflict","idempotency_conflict","idempotency_in_progress","idempotency_result_lost","idempotency_security_context_changed"],"410":["inference_upload_expired"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","idempotency_identity_unavailable","idempotency_misconfigured","idempotency_persistence_failed","idempotency_unavailable","internal_error","stored_data_invalid"],"503":["authentication_unavailable","idempotency_capacity_exceeded","idempotency_result_unavailable","idempotency_unavailable","inference_async_disabled","inference_model_unavailable","inference_storage_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-stt:create","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"required","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","idempotency_key_required","invalid_idempotency_key","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"409":["conflict","idempotency_conflict","idempotency_in_progress","idempotency_result_lost","idempotency_security_context_changed"],"410":["inference_upload_expired"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","idempotency_identity_unavailable","idempotency_misconfigured","idempotency_persistence_failed","idempotency_unavailable","internal_error","stored_data_invalid"],"503":["authentication_unavailable","idempotency_capacity_exceeded","idempotency_result_unavailable","idempotency_unavailable","inference_async_disabled","inference_model_unavailable","inference_storage_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/transcription-jobs":{"post":{"operationId":"create_inference_transcription_job","summary":"Submit an asynchronous transcription job","description":"Submits a ready upload to a published STT model with async support. The server validates decoded samples before reserving the full duration in the existing STT wallet. Original input is at most five hours and 5 GiB, within the model’s separate limits.\n\nInvalid audio is uncharged. Insufficient credit enters awaiting_credits without recognition work. A submitted job survives client disconnects and ordinary browser session expiry.\n\nWord timing is opt-in acoustic forced alignment in a qualified language; unaligned words have null times. Keep one stable Idempotency-Key per logical job. See [file jobs](/inference/async-transcription).","security":[{"inferenceBearerAuth":[]}],"tags":["Transcription jobs"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"},"description":"Required. Reuse the same key to retry this write safely. [Retries and idempotency](/voice/essentials/idempotency)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceTranscriptionJobCreate"}}}},"responses":{"202":{"description":"Submit an asynchronous transcription job","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceTranscriptionJob"}}}},"400":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sonus-required-permission":"inference-stt:create","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"required","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","idempotency_key_required","invalid_idempotency_key","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found","not_found"],"408":["request_timeout"],"409":["conflict","idempotency_conflict","idempotency_in_progress","idempotency_result_lost","idempotency_security_context_changed","inference_job_limit"],"410":["inference_upload_expired"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["inference_unsupported_timestamps","validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","idempotency_identity_unavailable","idempotency_misconfigured","idempotency_persistence_failed","idempotency_unavailable","internal_error","stored_data_invalid"],"503":["authentication_unavailable","idempotency_capacity_exceeded","idempotency_result_unavailable","idempotency_unavailable","inference_async_disabled","inference_model_unavailable","inference_storage_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-stt:create","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"required","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","idempotency_key_required","invalid_idempotency_key","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found","not_found"],"408":["request_timeout"],"409":["conflict","idempotency_conflict","idempotency_in_progress","idempotency_result_lost","idempotency_security_context_changed","inference_job_limit"],"410":["inference_upload_expired"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["inference_unsupported_timestamps","validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","idempotency_identity_unavailable","idempotency_misconfigured","idempotency_persistence_failed","idempotency_unavailable","internal_error","stored_data_invalid"],"503":["authentication_unavailable","idempotency_capacity_exceeded","idempotency_result_unavailable","idempotency_unavailable","inference_async_disabled","inference_model_unavailable","inference_storage_unavailable"]},"x-kejue-cache-control":"private, no-store"},"get":{"operationId":"list_inference_transcription_jobs","summary":"List transcription jobs","description":"Lists durable job metadata for the workspace, newest first. Follow next_cursor until null.\n\nState, progress, deadlines, request identity and result expiry contain no transcript text or storage references. Poll with backoff: preparation, queueing, recognition and optional alignment all contribute to wall time. See [job states](/inference/async-transcription#follow-a-job).","security":[{"inferenceBearerAuth":[]}],"tags":["Transcription jobs"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["validating","awaiting_credits","queued","processing","finalizing","completed","failed","cancelled"]}}],"responses":{"200":{"description":"List transcription jobs","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceTranscriptionJobs"}}}},"400":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sonus-required-permission":"inference-stt:read","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"not_applicable","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-stt:read","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"not_applicable","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/transcription-jobs/{id}":{"get":{"operationId":"get_inference_transcription_job","summary":"Read a transcription job","description":"Reads a workspace-owned job’s state, phase, committed progress and result expiry. Unknown and unauthorized IDs both return not_found.\n\nDisabling new-job admission preserves access to existing metadata, retained results, cancellation and deletion. See [following jobs](/inference/async-transcription#follow-a-job).","security":[{"inferenceBearerAuth":[]}],"tags":["Transcription jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Read a transcription job","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceTranscriptionJob"}}}},"400":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sonus-required-permission":"inference-stt:read","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"not_applicable","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-stt:read","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"not_applicable","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable"]},"x-kejue-cache-control":"private, no-store"},"delete":{"operationId":"delete_inference_transcription_job","summary":"Delete transcription content","description":"Cancels outstanding work and immediately revokes content access. Physical storage cleanup is durable and retried, including source audio, intermediate objects, results and abandoned generations.\n\nAuthorized billing and audit metadata remain. Already downloaded results cannot be recalled. See [retention and deletion](/inference/async-transcription#retention-includes-the-stored-files).","security":[{"inferenceBearerAuth":[]}],"tags":["Transcription jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Delete transcription content","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sonus-required-permission":"inference-stt:delete","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"not_applicable","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-stt:delete","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"not_applicable","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/transcription-jobs/{id}/result":{"get":{"operationId":"get_inference_transcription_result","summary":"Read a transcription result","description":"Reads an authorized, audited, decrypted transcript as JSON or plain text. Transcription read permission and workspace sensitive-content policy apply; supply a reason when required.\n\nOnly committed output is returned. An unfinished job can have an explicit partial result with gaps; missing content is never inferred. No committed output returns 409; expiry or logical deletion returns 410.\n\nWord times are integer milliseconds from the original file’s start. Unaligned words have null start and end values. Chunk ranges are coarse audio ownership intervals. Transcript retention is seven days after termination, shortened by stricter workspace policy. See [results and timestamps](/inference/async-transcription#read-text-and-timestamps).","security":[{"inferenceBearerAuth":[]}],"tags":["Transcription jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"format","in":"query","schema":{"type":"string","enum":["json","text"],"default":"json"}},{"name":"reason","in":"query","schema":{"type":"string","maxLength":500},"description":"Sensitive-content access justification when required by workspace policy."}],"responses":{"200":{"description":"Read a transcription result","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceTranscriptionResult"}},"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sonus-required-permission":"inference-stt:read","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"not_applicable","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","pii_access_approval_required","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"409":["inference_result_not_ready"],"410":["inference_content_expired"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","pii_access_mode_unavailable","stored_data_invalid"],"503":["authentication_unavailable","inference_storage_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-stt:read","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"not_applicable","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","pii_access_approval_required","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"409":["inference_result_not_ready"],"410":["inference_content_expired"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","pii_access_mode_unavailable","stored_data_invalid"],"503":["authentication_unavailable","inference_storage_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/transcription-jobs/{id}/resume":{"post":{"operationId":"resume_inference_transcription_job","summary":"Retry a job credit reservation","description":"Retries the full-duration reservation for a prepared awaiting_credits job without reuploading. Its original processing deadline still applies.\n\nAsync holds share STT credit with other requests but do not consume interactive session concurrency. Repeating a transition cannot charge the same audio twice. See [async accounting](/inference/usage#asynchronous-transcription-jobs).","security":[{"inferenceBearerAuth":[]}],"tags":["Transcription jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"},"description":"Required. Reuse the same key to retry this write safely. [Retries and idempotency](/voice/essentials/idempotency)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Retry a job credit reservation","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceTranscriptionJob"}}}},"400":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sonus-required-permission":"inference-stt:create","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"required","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","idempotency_key_required","invalid_idempotency_key","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"402":["inference_quota_exhausted"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"409":["conflict","idempotency_conflict","idempotency_in_progress","idempotency_result_lost","idempotency_security_context_changed"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","idempotency_identity_unavailable","idempotency_misconfigured","idempotency_persistence_failed","idempotency_unavailable","internal_error","stored_data_invalid"],"503":["authentication_unavailable","idempotency_capacity_exceeded","idempotency_result_unavailable","idempotency_unavailable","inference_async_disabled","inference_model_unavailable","inference_storage_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-stt:create","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"required","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","idempotency_key_required","invalid_idempotency_key","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"402":["inference_quota_exhausted"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"409":["conflict","idempotency_conflict","idempotency_in_progress","idempotency_result_lost","idempotency_security_context_changed"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","idempotency_identity_unavailable","idempotency_misconfigured","idempotency_persistence_failed","idempotency_unavailable","internal_error","stored_data_invalid"],"503":["authentication_unavailable","idempotency_capacity_exceeded","idempotency_result_unavailable","idempotency_unavailable","inference_async_disabled","inference_model_unavailable","inference_storage_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/transcription-jobs/{id}/cancel":{"post":{"operationId":"cancel_inference_transcription_job","summary":"Cancel remaining transcription work","description":"Stops new work and fences late results, then settles only unique committed audio intervals and releases the remaining reservation. Repeating cancellation is safe.\n\nAlready committed partial results remain retrievable until expiry. Recognition and alignment retries add no second customer charge. See [cancellation](/inference/async-transcription#charges-cancellation-and-deletion).","security":[{"inferenceBearerAuth":[]}],"tags":["Transcription jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"},"description":"Required. Reuse the same key to retry this write safely. [Retries and idempotency](/voice/essentials/idempotency)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Cancel remaining transcription work","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceTranscriptionJob"}}}},"400":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Machine-readable error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sonus-required-permission":"inference-stt:create","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"required","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","idempotency_key_required","invalid_idempotency_key","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"409":["conflict","idempotency_conflict","idempotency_in_progress","idempotency_result_lost","idempotency_security_context_changed"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","idempotency_identity_unavailable","idempotency_misconfigured","idempotency_persistence_failed","idempotency_unavailable","internal_error","stored_data_invalid"],"503":["authentication_unavailable","idempotency_capacity_exceeded","idempotency_result_unavailable","idempotency_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-stt:create","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"required","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","idempotency_key_required","invalid_idempotency_key","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["not_found"],"408":["request_timeout"],"409":["conflict","idempotency_conflict","idempotency_in_progress","idempotency_result_lost","idempotency_security_context_changed"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","idempotency_identity_unavailable","idempotency_misconfigured","idempotency_persistence_failed","idempotency_unavailable","internal_error","stored_data_invalid"],"503":["authentication_unavailable","idempotency_capacity_exceeded","idempotency_result_unavailable","idempotency_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/models":{"get":{"operationId":"list_inference_models","summary":"List published Inference model names","description":"Lists the published model names your workspace can use. Send one of these names on every request; an unpublished name returns inference_model_not_found.\n\nSTT async support is separate from the short-request limit. Check supports_async, max_async_audio_seconds, max_async_upload_bytes, timestamp_granularities and qualified alignment_languages before submitting a long recording.\n\nSee [model selection](/inference#make-your-first-request) and [file jobs](/inference/async-transcription).","security":[{"inferenceBearerAuth":[]}],"tags":["Models and voices"],"parameters":[],"responses":{"200":{"description":"List published Inference model names","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InferenceModel"}}},"required":["data"]}}}},"400":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"403":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"408":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"422":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"429":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"500":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"503":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}}},"x-sonus-required-permission":"inference-models:read","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"not_applicable","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_model_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-models:read","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"not_applicable","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_model_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/voices":{"get":{"operationId":"list_inference_voices","summary":"List approved voices for a model","description":"Lists the voices approved for one model. A voice that isn't approved for the model you send returns `404 inference_voice_not_found`.\n\nSee [model and voice selection](/inference#make-your-first-request).","security":[{"inferenceBearerAuth":[]}],"tags":["Models and voices"],"parameters":[{"name":"model","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List approved voices for a model","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InferenceVoice"}}},"required":["data"]}}}},"400":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"403":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"404":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"408":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"422":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"429":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"500":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"503":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}}},"x-sonus-required-permission":"inference-voices:read","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"not_applicable","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-voices:read","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"not_applicable","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/voices/{id}/sample":{"get":{"operationId":"get_inference_voice_sample","summary":"Play a voice sample","description":"Plays a short sample of an approved voice, so you can hear it before you build it into something.\n\nSee [voice samples](/inference/text-to-speech#voice-samples).","security":[{"inferenceBearerAuth":[]}],"tags":["Models and voices"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"model","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Play a voice sample","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"403":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"404":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"408":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"422":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"429":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"500":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"503":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}}},"x-sonus-required-permission":"inference-voices:read","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"not_applicable","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found","not_found"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-voices:read","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"not_applicable","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found","not_found"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/limits":{"get":{"operationId":"get_inference_limits","summary":"Read Inference balances and concurrency","description":"Returns each wallet's available balance and reserved minutes, your current and maximum concurrency, your monthly allowance, and when the next cycle starts.\n\nSee [minutes and limits](/inference/usage).","security":[{"inferenceBearerAuth":[]}],"tags":["Usage and limits"],"parameters":[],"responses":{"200":{"description":"Read Inference balances and concurrency","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InferenceWallet"}}},"required":["data"]}}}},"400":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"403":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"408":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"422":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"429":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"500":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"503":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}}},"x-sonus-required-permission":"inference-usage:read","x-sonus-required-entitlement":null,"x-sonus-idempotency":"not_applicable","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_model_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-usage:read","x-kejue-required-entitlement":null,"x-kejue-idempotency":"not_applicable","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_model_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/usage":{"get":{"operationId":"get_inference_usage","summary":"Read Inference usage and recent requests","description":"Returns daily usage, totals for the range including time to first output, and your hundred most recent requests. `days` is 1, 7 or 30, counted in UTC calendar days including today.\n\nSee [usage and request history](/inference/usage).","security":[{"inferenceBearerAuth":[]}],"tags":["Usage and limits"],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","enum":[1,7,30],"default":7}}],"responses":{"200":{"description":"Read Inference usage and recent requests","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceUsage"}}}},"400":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"403":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"408":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"422":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"429":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"500":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"503":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}}},"x-sonus-required-permission":"inference-usage:read","x-sonus-required-entitlement":null,"x-sonus-idempotency":"not_applicable","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_model_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-usage:read","x-kejue-required-entitlement":null,"x-kejue-idempotency":"not_applicable","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_model_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/requests/{id}":{"get":{"operationId":"get_inference_request","summary":"Get a request's status","description":"Returns what happened to one request — the call to reach for when a client lost its response and you need to know whether the work ran, and what it was charged.\n\nSee [request history and interrupted work](/inference/usage).","security":[{"inferenceBearerAuth":[]}],"tags":["Usage and limits"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Get a request's status","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceRequest"}}}},"400":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"403":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"408":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"422":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"429":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"500":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"503":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}}},"x-sonus-required-permission":"inference-usage:read","x-sonus-required-entitlement":null,"x-sonus-idempotency":"not_applicable","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_model_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-usage:read","x-kejue-required-entitlement":null,"x-kejue-idempotency":"not_applicable","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_model_unavailable"]},"x-kejue-cache-control":"private, no-store"}},"/inference/audio/speech":{"post":{"operationId":"generate_inference_speech","summary":"Stream synthesized speech","description":"Streams raw little-endian PCM16 mono at 16 kHz as the audio is produced. Use a dedicated Inference key.\n\n**A 200 or EOF alone cannot prove completion**\n\nInspect the `X-Kejue-Inference-Status` trailer — `completed`, `error` or `cancelled` — or read `GET /inference/requests/{id}` afterwards.\n\n**Billing and limits**\n\nText to speech is charged by input length, in characters. The whole input is reserved up front (`402` if your balance is short) and charged once audio starts; nothing is charged if no audio is produced, and the audio's length never changes the charge. `X-Kejue-Characters` carries the characters charged. Output is capped by the model's audio limit and the optional `max_audio_seconds`, as a safety limit; `output_limit` means output stopped at that cap, and the input is still charged in full. Audio content is never retained.\n\n**Idempotency**\n\nThe `Idempotency-Key` identifies one computation. A repeated key returns `409` without rerunning or replaying audio.\n\nSee [one-shot generation](/inference/text-to-speech#generate-speech-over-http).","security":[{"inferenceBearerAuth":[]}],"tags":["Text to speech"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"},"description":"Identifies one computation. Reuse returns `409 inference_request_exists`; results are not replayed. [Retries and idempotency](/voice/essentials/idempotency)."}],"responses":{"200":{"description":"Stream synthesized speech","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Sample-Rate":{"description":"Audio sample rate in Hz.","schema":{"type":"string"}},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"},"X-Kejue-Characters":{"description":"Input characters charged for this request.","schema":{"type":"string"}},"Trailer":{"description":"Declares X-Kejue-Inference-Status completion trailer.","schema":{"type":"string"}}},"content":{"audio/pcm":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"401":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"402":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"403":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"404":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"408":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"409":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"413":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"415":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"422":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"429":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"500":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"502":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"503":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}}},"x-sonus-required-permission":"inference-tts:create","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"request_identity","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"402":["inference_quota_exhausted"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found","inference_voice_not_found"],"408":["request_timeout"],"409":["inference_request_exists"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","inference_concurrency_exhausted","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"502":["inference_upstream_failed"],"503":["authentication_unavailable","inference_capacity_unavailable","inference_model_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-tts:create","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"request_identity","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"402":["inference_quota_exhausted"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found","inference_voice_not_found"],"408":["request_timeout"],"409":["inference_request_exists"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","inference_concurrency_exhausted","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"502":["inference_upstream_failed"],"503":["authentication_unavailable","inference_capacity_unavailable","inference_model_unavailable"]},"x-kejue-cache-control":"private, no-store","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceSpeechInput"}}}}}},"/inference/audio/transcriptions":{"post":{"operationId":"create_inference_transcription","summary":"Transcribe an audio file","description":"Transcribes an uploaded audio file. Accepts PCM16 mono 16 kHz WAV, up to the model's published limit and at most 300 seconds.\n\n**What you are charged**\n\nThe accepted input duration, once the request is dispatched — including a partial failure. A refusal before dispatch releases the reservation. Audio and transcript content are not retained by the usage ledger.\n\nReusing an `Idempotency-Key` returns `409` rather than transcribing again.\n\nSee [file transcription](/inference/speech-to-text#upload-a-file).","security":[{"inferenceBearerAuth":[]}],"tags":["Speech to text"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"},"description":"Identifies one computation. Reuse returns `409 inference_request_exists`; results are not replayed. [Retries and idempotency](/voice/essentials/idempotency)."}],"responses":{"200":{"description":"Transcribe an audio file","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceTranscription"}}}},"400":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"401":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"402":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"403":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"404":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"408":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"409":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"413":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"415":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"422":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"429":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"500":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"502":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"503":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}}},"x-sonus-required-permission":"inference-stt:create","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"request_identity","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"402":["inference_quota_exhausted"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found"],"408":["request_timeout"],"409":["inference_request_exists"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","inference_concurrency_exhausted","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"502":["inference_upstream_failed"],"503":["authentication_unavailable","inference_capacity_unavailable","inference_model_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-stt:create","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"request_identity","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"402":["inference_quota_exhausted"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found"],"408":["request_timeout"],"409":["inference_request_exists"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","inference_concurrency_exhausted","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"502":["inference_upstream_failed"],"503":["authentication_unavailable","inference_capacity_unavailable","inference_model_unavailable"]},"x-kejue-cache-control":"private, no-store","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/InferenceTranscriptionInput"}}}}}},"/inference/realtime-tokens":{"post":{"operationId":"create_inference_realtime_token","summary":"Mint a one-use live session token","description":"Mints a token a browser client can connect with, so a long-lived key never reaches your front end. A backend doesn't need one: it can authenticate on either realtime WebSocket directly, with an Inference API key in the `Authorization` Bearer header.\n\nRequires an Inference API key or an authorized browser session.\n\n**The model decides which session you get**\n\nA speech-to-text model opens a live transcription socket, which needs `inference-stt:create`. A text-to-speech model opens a live speech socket, which needs `inference-tts:create` and an approved voice.\n\n**What comes back**\n\nA one-use token valid for 30 seconds, and the absolute `wss://` URL to connect to with `?token=…`. Never place a long-lived key in a WebSocket URL.\n\nEach successful request mints a fresh token. Credit — a character budget for speech, minutes for transcription — is reserved when you connect, not here.\n\nSee [WebSocket authentication](/inference/access#websocket-authentication).","security":[{"inferenceBearerAuth":[]}],"tags":["Realtime sessions"],"parameters":[],"responses":{"201":{"description":"Mint a one-use live transcription token","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceRealtimeToken"}}}},"400":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"403":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"404":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"408":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"413":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"415":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"422":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"429":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"500":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"503":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}}},"x-sonus-required-permission":null,"x-sonus-required-entitlement":"inference","x-sonus-idempotency":"single_use","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found","inference_voice_not_found"],"408":["request_timeout"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_model_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":null,"x-kejue-required-entitlement":"inference","x-kejue-idempotency":"single_use","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_json","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found","inference_voice_not_found"],"408":["request_timeout"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_model_unavailable"]},"x-kejue-cache-control":"private, no-store","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceRealtimeInput"}}}}}},"/inference/audio/transcriptions/realtime":{"get":{"operationId":"connect_inference_realtime","summary":"Connect a live transcription session","description":"Opens a WebSocket for live transcription.\n\n**Connecting**\n\nFrom a backend, send an Inference API key in the `Authorization` Bearer header, with the `model`, `language` (`ar`, `en` or `auto`; default `ar`) and `max_audio_seconds` (1–300; default 60, within the model's limit) query parameters.\n\nFrom a browser, mint a one-use token with `POST /inference/realtime-tokens` and connect with the `token` query parameter alone. Never combine `token` with `Authorization`, and never put a long-lived key in a URL. A token is consumed on the first connection attempt.\n\n**Sending audio**\n\nSend binary PCM16 mono 16 kHz frames, at most 64 KiB each. Send `{\"type\":\"commit\"}` to finalize a segment, or `{\"type\":\"finish\"}` to finalize and close.\n\nEvents carry a `type` of `ready`, `transcript`, `finished` or `error`. A `transcript` carries final text — refining interim hypotheses are not supported.\n\n**Turn detection**\n\nAdd `turn_detection` (`semantic` or `vad`) and any `td_*` settings as query parameters, or set `turn_detection` on the token request, and the model ends each turn itself: stream audio continuously and skip `commit`. Each turn is marked by `speech_started` and `speech_stopped`, and its final `transcript` carries `end_of_turn` (`reason`, `probability`, `audio_end_ms`, `silence_ms`) and `no_speech: true` when the turn held no speech. With turn detection on, `max_audio_seconds` accepts 1–525 (default 300), and pauses are charged like any other audio. Send `commit` before `finish` if a turn may still be open. A model without turn detection answers with a `turn_detection_unavailable` error event.\n\n**Limits and close codes**\n\nA session lasts at most 9 minutes, and accepted audio is charged, bounded by your reserved minutes and the published limit. A session that receives nothing for 30 seconds before `finish` gets an `idle_timeout` error event and closes with 1008.\n\nClose codes are 1000 after `finished`; 1008 for `idle_timeout`, `audio_limit_reached` or `invalid_message`; 1011 when the model fails.\n\nCredentials, options, permissions and available minutes are all checked before the upgrade, and each direct connection creates a new session.\n\nSee [live transcription](/inference/speech-to-text#live-transcription) and [turn detection](/inference/speech-to-text#turn-detection).","tags":["Speech to text"],"parameters":[{"name":"token","in":"query","description":"One-use browser token. Omit when authenticating with an API key.","required":false,"schema":{"type":"string","minLength":43,"maxLength":43}},{"name":"model","in":"query","description":"Published STT model alias. Required with API-key authentication; omit when using a token.","schema":{"type":"string"}},{"name":"language","in":"query","description":"STT language with API-key authentication. Omit when using a token.","schema":{"type":"string","enum":["ar","en","auto"],"default":"ar"}},{"name":"max_audio_seconds","in":"query","description":"Audio reservation cap with API-key authentication. Omit when using a token. 1–300 (default 60) without turn detection; 1–525 (default 300) with turn_detection. Always within the model limit.","schema":{"type":"integer","minimum":1,"maximum":525}},{"name":"turn_detection","in":"query","description":"Turn detection with API-key authentication (see InferenceTurnDetection). The model finds turns in a continuous stream and sends speech_started, speech_stopped and one final transcript per turn. Omit for the commit-driven session; omit when using a token.","schema":{"type":"string","enum":["semantic","vad"]}},{"name":"td_silence_ms","in":"query","description":"Silence before a verdict (semantic) or before the turn ends (vad), in milliseconds. Requires turn_detection. API-key authentication only.","schema":{"type":"integer","minimum":100,"maximum":5000}},{"name":"td_max_silence_ms","in":"query","description":"Semantic backstop in milliseconds; at least td_silence_ms. Requires turn_detection. API-key authentication only.","schema":{"type":"integer","minimum":200,"maximum":10000}},{"name":"td_threshold","in":"query","description":"Turn-model completion probability (semantic). Requires turn_detection. API-key authentication only.","schema":{"type":"number","minimum":0,"maximum":1}},{"name":"td_min_speech_ms","in":"query","description":"Voice needed before a turn opens, in milliseconds. Requires turn_detection. API-key authentication only.","schema":{"type":"integer","minimum":0,"maximum":2000}},{"name":"td_prefix_padding_ms","in":"query","description":"Audio kept from before the detected start of speech, in milliseconds. Requires turn_detection. API-key authentication only.","schema":{"type":"integer","minimum":0,"maximum":2000}},{"name":"td_vad_threshold","in":"query","description":"Speech probability above which a frame counts as voice. Requires turn_detection. API-key authentication only.","schema":{"type":"number","minimum":0,"maximum":1}},{"name":"td_idle_ms","in":"query","description":"Ends an open turn when no audio arrives for this long; 0 turns it off. Requires turn_detection. API-key authentication only.","schema":{"type":"integer","minimum":0,"maximum":10000}},{"name":"td_no_speech_logprob","in":"query","description":"Mean token log-probability below which a turn is reported as no speech. Requires turn_detection. API-key authentication only.","schema":{"type":"number","minimum":-10,"maximum":0}},{"name":"td_incomplete_threshold","in":"query","description":"With semantic turn detection, an end-of-turn probability below this counts as clearly unfinished and extends the wait by td_incomplete_extend_ms; 0 turns it off. Must not exceed td_threshold. Requires turn_detection. API-key authentication only.","schema":{"type":"number","minimum":0,"maximum":1}},{"name":"td_incomplete_extend_ms","in":"query","description":"Extra silence allowed after the speaker's last word when the end-of-turn model judges the sentence clearly unfinished. Requires turn_detection. API-key authentication only.","schema":{"type":"integer","minimum":0,"maximum":10000}}],"responses":{"101":{"description":"WebSocket upgraded. Client sends binary PCM16 mono 16 kHz; JSON controls commit or finish. Server events: ready, transcript (final text), finished, error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"402":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"403":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"404":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"408":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"422":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"429":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"500":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"503":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}}},"x-sonus-required-permission":"inference-stt:create","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"not_applicable","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"402":["inference_quota_exhausted"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","inference_concurrency_exhausted","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_capacity_unavailable","inference_model_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-stt:create","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"not_applicable","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"402":["inference_quota_exhausted"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","inference_concurrency_exhausted","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_capacity_unavailable","inference_model_unavailable"]},"x-kejue-cache-control":"private, no-store","security":[{"inferenceBearerAuth":[]},{"inferenceRealtimeToken":[]}]}},"/inference/audio/speech/realtime":{"get":{"operationId":"connect_inference_speech_realtime","summary":"Connect a live speech session","description":"Opens a WebSocket for streaming speech. The model connection opens once, at connect, so every utterance after that skips connection setup.\n\n**Connecting**\n\nFrom a backend, send an Inference API key in the `Authorization` Bearer header, with the `model`, `voice` (an approved UUID), and optionally `max_characters` (1–100,000; default 10,000) and `max_audio_seconds` (1–600; default 600) query parameters.\n\nFrom a browser, mint a one-use token with `POST /inference/realtime-tokens` and connect with the `token` query parameter alone. Never combine `token` with `Authorization`, and never put a long-lived key in a URL. A token is consumed on the first connection attempt.\n\n**Speaking**\n\nSend `{\"type\":\"speak\",\"text\":…}` for each utterance, 1–8,000 characters. Utterances may be pipelined and are spoken in order. Audio comes back as binary PCM16 mono frames at the `sample_rate` given in the `ready` event, with `{\"type\":\"done\",\"segment\":n,\"audio_ms\":…}` after each one.\n\n**The other messages**\n\n`{\"type\":\"cancel\"}` drops every utterance not yet fully spoken and answers `{\"type\":\"cancelled\",\"segments\":[…]}`. `{\"type\":\"keepalive\"}` holds a quiet session open. `{\"type\":\"finish\"}` ends the session once queued speech is done, answered by `{\"type\":\"finished\"}`.\n\n**Limits and close codes**\n\nA session lasts at most 9 minutes. Each `speak` is charged by its characters when accepted, against the session's `max_characters` budget; a message that would pass the budget is refused with `character_limit_reached` and costs nothing. `max_audio_seconds` only caps the speech produced. With nothing queued and nothing received for 60 seconds, the session gets an `idle_timeout` error event and closes with 1008.\n\nClose codes are 1000 after `finished`; 1008 for `idle_timeout`, `audio_limit_reached`, `character_limit_reached` or `invalid_message`; 1011 when the model fails.\n\nText to speech does not accept `language`. Credentials, options, permissions and available minutes are all checked before the upgrade, and each direct connection creates a new session.\n\nSee [live speech](/inference/text-to-speech#live-speech-websocket).","tags":["Text to speech"],"parameters":[{"name":"token","in":"query","description":"One-use browser token. Omit when authenticating with an API key.","required":false,"schema":{"type":"string","minLength":43,"maxLength":43}},{"name":"model","in":"query","description":"Published TTS model alias. Required with API-key authentication; omit when using a token.","schema":{"type":"string"}},{"name":"voice","in":"query","description":"Approved voice UUID. Required with API-key authentication; omit when using a token.","schema":{"type":"string","format":"uuid"}},{"name":"max_characters","in":"query","description":"Character budget reserved for the session with API-key authentication. Omit when using a token.","schema":{"type":"integer","minimum":1,"maximum":100000,"default":10000}},{"name":"max_audio_seconds","in":"query","description":"Cap on the speech the session may produce, with API-key authentication. A safety limit; it does not change what is charged. Omit when using a token.","schema":{"type":"integer","minimum":1,"maximum":600,"default":600}}],"responses":{"101":{"description":"WebSocket upgraded. Client sends JSON speak, cancel, keepalive and finish messages. Server sends binary PCM16 audio and JSON events: ready, done, cancelled, finished, error.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"401":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"402":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-Kejue-Request-Id":{"$ref":"#/components/headers/InferenceRequestID"}}},"403":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"404":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"408":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"422":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"429":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"500":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"503":{"description":"Machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}}},"x-sonus-required-permission":"inference-tts:create","x-sonus-required-entitlement":"inference","x-sonus-idempotency":"not_applicable","x-sonus-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"402":["inference_quota_exhausted"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found","inference_voice_not_found"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","inference_concurrency_exhausted","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_capacity_unavailable","inference_model_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-required-permission":"inference-tts:create","x-kejue-required-entitlement":"inference","x-kejue-idempotency":"not_applicable","x-kejue-error-codes":{"400":["bad_request","body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"402":["inference_quota_exhausted"],"403":["ai_connectors_disabled","api_key_product_mismatch","entitlement_required","forbidden","team_not_connected"],"404":["inference_model_not_found","inference_voice_not_found"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","inference_concurrency_exhausted","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable","inference_capacity_unavailable","inference_model_unavailable"]},"x-kejue-cache-control":"private, no-store","security":[{"inferenceBearerAuth":[]},{"inferenceRealtimeToken":[]}]}},"/inference/api-keys":{"get":{"operationId":"list_inference_api_keys","x-sonus-required-permission":"inference-api-keys:read","x-kejue-required-permission":"inference-api-keys:read","x-sonus-required-entitlement":null,"x-kejue-required-entitlement":null,"x-sonus-idempotency":"not_applicable","x-kejue-idempotency":"not_applicable","x-sonus-error-codes":{"400":["body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","forbidden","team_not_connected"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable"]},"x-kejue-error-codes":{"400":["body_read_failed","duplicate_query_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","forbidden","team_not_connected"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-cache-control":"private, no-store","summary":"List API keys","description":"Lists this workspace's Inference keys, newest first. Only safe metadata comes back — secrets never do. Follow `next_cursor` until it is null for a complete traversal.\n\nSee [key management](/inference/access#manage-keys).","security":[{"inferenceBearerAuth":[]}],"tags":["API keys"],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Number of API keys to return."}],"responses":{"200":{"description":"API keys, including revoked and expired keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyListResponse"}}},"headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"408":{"$ref":"#/components/responses/RequestTimeout"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"post":{"operationId":"create_inference_api_key","x-sonus-required-permission":"inference-api-keys:create","x-kejue-required-permission":"inference-api-keys:create","x-sonus-required-entitlement":"inference","x-kejue-required-entitlement":"inference","x-sonus-idempotency":"required","x-kejue-idempotency":"required","x-sonus-error-codes":{"400":["body_read_failed","duplicate_field","duplicate_query_parameter","empty_body","idempotency_key_required","invalid_idempotency_key","invalid_json","invalid_query_parameter","invalid_request_id","multiple_json_values","request_body_read_failed","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","delegation_not_allowed","entitlement_required","forbidden","permission_escalation","team_not_connected"],"408":["request_timeout"],"409":["idempotency_conflict","idempotency_in_progress","idempotency_result_lost","idempotency_security_context_changed"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["audit_required","db_error","idempotency_identity_unavailable","idempotency_misconfigured","idempotency_persistence_failed","idempotency_unavailable","internal_error","response_buffer_failed"],"503":["authentication_unavailable","idempotency_capacity_exceeded","idempotency_result_unavailable","idempotency_unavailable"]},"x-kejue-error-codes":{"400":["body_read_failed","duplicate_field","duplicate_query_parameter","empty_body","idempotency_key_required","invalid_idempotency_key","invalid_json","invalid_query_parameter","invalid_request_id","multiple_json_values","request_body_read_failed","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","delegation_not_allowed","entitlement_required","forbidden","permission_escalation","team_not_connected"],"408":["request_timeout"],"409":["idempotency_conflict","idempotency_in_progress","idempotency_result_lost","idempotency_security_context_changed"],"413":["request_too_large"],"415":["unsupported_media_type"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["audit_required","db_error","idempotency_identity_unavailable","idempotency_misconfigured","idempotency_persistence_failed","idempotency_unavailable","internal_error","response_buffer_failed"],"503":["authentication_unavailable","idempotency_capacity_exceeded","idempotency_result_unavailable","idempotency_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-cache-control":"private, no-store","summary":"Create an API key","description":"Creates a scoped Inference key.\n\n**The secret appears once**\n\nIt is in this response only and can never be retrieved again. Store it before you move on.\n\nScopes are canonicalized, and may not exceed your own permissions.\n\nSee [key management](/inference/access#manage-keys).","security":[{"inferenceBearerAuth":[]}],"tags":["API keys"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"},"description":"Required. Reuse the same key to retry this write safely. [Retries and idempotency](/voice/essentials/idempotency)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"201":{"description":"API key metadata plus the one-time secret.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Idempotency-Replayed":{"$ref":"#/components/headers/IdempotencyReplayed"},"Location":{"$ref":"#/components/headers/Location"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"408":{"$ref":"#/components/responses/RequestTimeout"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/RequestTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}},"/inference/api-keys/{id}":{"get":{"operationId":"get_inference_api_key","x-sonus-required-permission":"inference-api-keys:read","x-kejue-required-permission":"inference-api-keys:read","x-sonus-required-entitlement":null,"x-kejue-required-entitlement":null,"x-sonus-idempotency":"not_applicable","x-kejue-idempotency":"not_applicable","x-sonus-error-codes":{"400":["body_read_failed","duplicate_query_parameter","invalid_path_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","forbidden","team_not_connected"],"404":["api_key_not_found"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable"]},"x-kejue-error-codes":{"400":["body_read_failed","duplicate_query_parameter","invalid_path_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","forbidden","team_not_connected"],"404":["api_key_not_found"],"408":["request_timeout"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["db_error","internal_error","stored_data_invalid"],"503":["authentication_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-cache-control":"private, no-store","summary":"Get an API key","description":"Returns one key's metadata. The secret is never retrievable.\n\nThe ETag covers the whole public representation, so it changes when `last_used_at` changes — not only when you edit the key.\n\nSee [key management](/inference/access#manage-keys).","security":[{"inferenceBearerAuth":[]}],"tags":["API keys"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"API key metadata.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"408":{"$ref":"#/components/responses/RequestTimeout"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}},"delete":{"operationId":"revoke_inference_api_key","x-sonus-required-permission":"inference-api-keys:delete","x-kejue-required-permission":"inference-api-keys:delete","x-sonus-required-entitlement":null,"x-kejue-required-entitlement":null,"x-sonus-idempotency":"not_applicable","x-kejue-idempotency":"not_applicable","x-sonus-error-codes":{"400":["body_read_failed","duplicate_query_parameter","invalid_header","invalid_path_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","forbidden","team_not_connected"],"404":["api_key_not_found"],"408":["request_timeout"],"412":["precondition_failed"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["audit_required","db_error","internal_error","response_buffer_failed","stored_data_invalid"],"503":["authentication_unavailable"]},"x-kejue-error-codes":{"400":["body_read_failed","duplicate_query_parameter","invalid_header","invalid_path_parameter","invalid_query_parameter","invalid_request_id","unexpected_body","unknown_query_parameter"],"401":["unauthorized"],"403":["ai_connectors_disabled","api_key_product_mismatch","forbidden","team_not_connected"],"404":["api_key_not_found"],"408":["request_timeout"],"412":["precondition_failed"],"422":["validation_failed"],"429":["authentication_rate_limited","rate_limited"],"500":["audit_required","db_error","internal_error","response_buffer_failed","stored_data_invalid"],"503":["authentication_unavailable"]},"x-sonus-cache-control":"private, no-store","x-kejue-cache-control":"private, no-store","summary":"Revoke an API key","description":"Revokes a key. Its metadata stays available for auditing, and repeating the call is safe. Takes no request body.\n\nSee [key management](/inference/access#manage-keys).","security":[{"inferenceBearerAuth":[]}],"tags":["API keys"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IfMatch"}],"responses":{"204":{"description":"The key is revoked; repeating the operation is a successful no-op.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"},"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"408":{"$ref":"#/components/responses/RequestTimeout"},"412":{"$ref":"#/components/responses/PreconditionFailed"},"422":{"$ref":"#/components/responses/ValidationFailed"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}}},"components":{"securitySchemes":{"inferenceRealtimeToken":{"type":"apiKey","in":"query","name":"token","description":"One-use browser token (30 seconds). [WebSocket authentication](/inference/access#websocket-authentication)."},"inferenceBearerAuth":{"type":"http","scheme":"bearer","description":"Use an Inference API key. [Access and keys](/inference/access)."},"bearerAuth":{"type":"http","scheme":"bearer","description":"Use a Voice API key or connected-app OAuth access token. [Authentication](/voice/essentials/authentication)."}},"parameters":{"Cursor":{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque pagination cursor from a previous response's next_cursor."},"Limit":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"Page size (endpoint-bounded; typical default 25, max 100)."},"AgentVersionLimit":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Number of immutable agent-version summaries to return."},"CallCursor":{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque keyset cursor returned as next_cursor. It is bound to this endpoint's sort and direction."},"CallLimit":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Number of calls to return."},"CatalogLimit":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Number of catalog resources to return. The server fetches one extra row internally to produce next_cursor."},"SearchQuery":{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Case-insensitive literal substring search across slug, name, and description. The supplied and trimmed values must each contain 1–200 Unicode characters; blank values and every Unicode control character are rejected. Percent, underscore, and backslash are literal characters, not LIKE syntax."},"CreatedFrom":{"name":"created_from","in":"query","required":false,"schema":{"type":"string"},"description":"Inclusive created_at lower bound as RFC3339 or YYYY-MM-DD (midnight UTC)."},"CreatedTo":{"name":"created_to","in":"query","required":false,"schema":{"type":"string"},"description":"Exclusive created_at upper bound as RFC3339 or YYYY-MM-DD (midnight UTC). Must be after created_from."},"ArchivedFilter":{"name":"archived","in":"query","required":false,"schema":{"type":"string","enum":["exclude","include","only"],"default":"exclude"},"description":"Whether archived resources are excluded, included alongside active resources, or returned exclusively."},"IfMatch":{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"},"description":"Optional strong ETag (or *) from a prior response. A stale tag returns 412 without changing the resource."},"BreakGlassReason":{"name":"reason","in":"query","required":true,"schema":{"type":"string","minLength":8,"maxLength":500},"description":"Human audit justification. Leading/trailing whitespace is removed; control characters are rejected."},"PIIAccessReason":{"name":"reason","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":500},"description":"Human audit justification, recorded on the access audit row whenever it is sent. Whether it is required depends on the workspace's sensitive-data access mode. In `reason` mode it is required (at least 8 characters) on the transcript, recording and tool-I/O reads, and omitting it returns 400. In `approval` mode a user reads under an approved access request instead (the approved request's reason is recorded), while an API key keeps the `reason` rule. In `open` mode it is optional. Per-turn audio never requires it in any mode. Control characters are rejected."},"Download":{"name":"download","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Use attachment rather than inline Content-Disposition."},"Range":{"name":"Range","in":"header","required":false,"schema":{"type":"string","pattern":"^bytes=(?:[0-9]+-[0-9]*|-[0-9]+)$"},"description":"One RFC 9110 byte interval. Multiple ranges are rejected with 416 and a JSON error envelope."},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"},"description":"Required on every API-key POST except side-effect-free preview operations, which expose OptionalIdempotencyKey. Use a 1 to 255 character portable ASCII HTTP token and one stable, unique value for one logical intent. Reusing it with the same actor, authorization context, method, canonical resource path, query, If-Match value, and body replays the committed result; changing any of those inputs returns a deterministic conflict."},"OptionalIdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9!#$%&'*+.^_`|~-]+$"},"description":"Optional on this side-effect-free POST. When supplied, the normal durable replay and conflict semantics apply."}},"headers":{"InferenceRequestID":{"description":"Durable computation UUID, present after admission, including execution errors and repeated request identities.","schema":{"type":"string","format":"uuid"}},"ETag":{"description":"Strong version tag for conditional PATCH, POST, PUT, or DELETE requests against a versioned resource or aggregate. Treat it as opaque and copy it exactly, including quotes. Agent aggregate tags cover the persisted revision, an opaque representation-version component, and deployment capability bits. A representation normalization or capability rollout can therefore change the tag without changing revision or updated_at. Weak validators never satisfy If-Match.","schema":{"type":"string"}},"GuardrailSetETag":{"description":"Strong opaque version tag for one guardrail set. Copy the complete quoted value into If-Match; do not parse or construct it. Every committed create, material update, or first archive receives a distinct tag. Semantic PATCH no-ops and repeated archive no-ops preserve the current tag. Weak validators are never accepted by If-Match.","schema":{"type":"string","pattern":"^\"guardrail-set-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}-r1-v[1-9][0-9]*\"$"},"example":"\"guardrail-set-11111111-1111-4111-8111-111111111111-r1-v3\""},"GuardrailSetLocation":{"description":"Canonical relative URL of the newly created guardrail set.","schema":{"type":"string","pattern":"^/v1/guardrail-sets/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"example":"/v1/guardrail-sets/11111111-1111-4111-8111-111111111111"},"PrivateNoStore":{"description":"The representation can contain authored safety policy and must not be stored by shared or private caches.","schema":{"type":"string","const":"private, no-store"}},"SonusAgentETag":{"description":"Strong tag for the complete parent agent aggregate when the primary ETag belongs to a nested independently versioned resource. A changed draft after-call configuration advances this tag; a semantic no-op preserves it. It is opaque and also incorporates the representation-version component and point-in-time deployment capability bits described by the aggregate ETag contract.","schema":{"type":"string"}},"Location":{"description":"Relative URL of the newly created resource.","schema":{"type":"string"}},"RetryAfter":{"description":"Whole seconds an automation client should wait before polling or retrying.","schema":{"type":"integer","minimum":1}},"IdempotencyReplayed":{"description":"Present with value true when this response was replayed from an earlier request with the same Idempotency-Key.","schema":{"type":"string","const":"true"}},"XRequestID":{"description":"Correlation identifier echoed from a valid X-Request-Id request header or generated by Kejue Voice.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[!-~]+$"}},"RateLimitLimit":{"description":"Configured request allowance for the current API-key minute window. Omitted for session traffic and for failures emitted before authentication and rate limiting run (for example invalid_request_id, unauthorized, authentication_rate_limited, or authentication_unavailable). During a Redis outage, a bounded per-pod emergency window supplies this value.","schema":{"type":"integer","minimum":1}},"RateLimitRemaining":{"description":"Requests remaining in the current API-key minute window. Omitted under the same pre-authentication and session conditions as X-RateLimit-Limit.","schema":{"type":"integer","minimum":0}},"RateLimitReset":{"description":"Unix timestamp in seconds when the current API-key minute window resets. Omitted under the same pre-authentication and session conditions as X-RateLimit-Limit.","schema":{"type":"integer","minimum":1}},"WWWAuthenticate":{"description":"RFC 6750 Bearer challenge returned when credentials are missing or invalid.","schema":{"type":"string"},"example":"Bearer realm=\"sonus\", error=\"invalid_token\""}},"responses":{"GuardrailSetInUse":{"description":"The set remains referenced by one or more active agent-version pointers. The dependency list is complete for the transaction snapshot and sorted by agent_slug, then draft/staging/production, then agent-version creation/id. Remove the set UUID from replacement drafts, promote/deploy as needed to move every listed pointer, then retry DELETE against a fresh ETag.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"guardrail_set_in_use","message":"guardrail set cannot be archived while active agent versions reference it","request_id":"req_guardrail_archive_409","details":{"dependencies":[{"kind":"agent_version","agent_id":"33333333-3333-4333-8333-333333333333","agent_slug":"billing_assistant","agent_name":"Billing Assistant","agent_version_id":"44444444-4444-4444-8444-444444444444","agent_version":null,"deployment_stage":"draft","reference":"behavior.guardrails.guardrail_set_ids"},{"kind":"agent_version","agent_id":"33333333-3333-4333-8333-333333333333","agent_slug":"billing_assistant","agent_name":"Billing Assistant","agent_version_id":"55555555-5555-4555-8555-555555555555","agent_version":2,"deployment_stage":"production","reference":"behavior.guardrails.guardrail_set_ids"}],"dependency_count":2}}}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/GuardrailSetETag"},"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"}}},"GuardrailValidationFailed":{"description":"The request is valid JSON but one or more metadata, rule, per-set runtime-budget, or referenced-agent aggregate-budget checks failed. More than 100 rules in one definition reports too_many_items at definition.guardrails before aggregate admission. A shape-valid definition can report the instruction, phrase-count, or phrase-character budget codes. Ordered multi-set assignment can additionally report guardrail_rule_budget_exceeded on the first guardrail_set_ids item that crosses the per-agent limit. A definition-changing PATCH reports the analogous assigned_agent_* code whose message names each affected agent and deployment stage. When PATCH reached that locked active-agent admission check, ETag contains the current Guardrail-set validator for the corrected retry; create and pre-resource input validation omit it. Correct every item in details.fields; no resource, version, or audit mutation is committed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_rule":{"value":{"error":{"code":"validation_failed","message":"request failed validation","request_id":"req_guardrail_validation_422","details":{"fields":[{"path":"definition.guardrails[1].phrases[1]","code":"duplicate","message":"phrase duplicates definition.guardrails[1].phrases[0] after case-insensitive normalization"}]}}}},"referenced_agent_budget":{"value":{"error":{"code":"validation_failed","message":"request failed validation","request_id":"req_guardrail_budget_422","details":{"fields":[{"path":"definition","code":"assigned_agent_guardrail_instruction_budget_exceeded","message":"definition would exceed the guardrail runtime budget for agent \"billing_assistant\" production version: assigned LLM guardrail instructions contain 40001 characters; the per-agent limit is 40000"}]}}}}}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/GuardrailSetETag"}}},"BadRequest":{"description":"Malformed request ID, path, query, conditional/idempotency header, JSON syntax/transport, duplicate field, multiple JSON values, or a body supplied to an operation that has no request body. Branch on error.code for the exact correction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"Unauthorized":{"description":"Missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}}},"Forbidden":{"description":"Insufficient scope/role, or session-only endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"NotFound":{"description":"Resource not found or not visible to your org.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"description":"Current parent-aggregate tag when that aggregate was resolved before a nested resource lookup failed; otherwise omitted.","schema":{"type":"string"}}}},"Conflict":{"description":"The requested lifecycle transition conflicts with current resource state, or an Idempotency-Key is in progress, was reused for different intent/security context, or has lost its replay payload. Branch on error.code and follow the error catalog retry policy.","headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"description":"Current aggregate tag when the resource was resolved before the conflict; otherwise omitted.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds before retrying when the conflict is caused by an operation already in progress. Omitted for other conflicts.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Gone":{"description":"Durable metadata exists but the short-lived or external binary object is no longer available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"RangeNotSatisfiable":{"description":"Range is malformed, repeated, multipart, or does not intersect the representation.","headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Content-Range":{"description":"Unsatisfied representation size in `bytes */N` form.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PreconditionFailed":{"description":"The resource changed since the supplied If-Match ETag was issued. The response ETag is current.","headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RequestTooLarge":{"description":"Request body exceeds the endpoint's encoded byte limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"UnsupportedMediaType":{"description":"A JSON operation requires application/json or application/*+json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"ValidationFailed":{"description":"The body is syntactically valid but cannot be applied. validation_failed uses details.fields. agent_baseline_too_large requires the executable AgentBaselineTooLargeDetails shape; referenced_resource_missing can omit details. Consult x-sonus-error-catalog and branch on error.code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"description":"Current aggregate tag when validation required resolving and locking that aggregate; otherwise omitted.","schema":{"type":"string"}}}},"InternalError":{"description":"A sanitized storage/dependency failure, recovered panic, audit invariant, response-buffer failure, or middleware configuration fault prevented a valid result. Retain request_id for support correlation. A retry is safe only when the emitted error code's catalog policy says so.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"description":"Current aggregate tag when it was resolved before the internal failure; otherwise omitted.","schema":{"type":"string"}}}},"BadGateway":{"description":"A configured upstream integration returned an invalid response or could not be reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"GatewayTimeout":{"description":"A configured upstream integration exceeded its timeout.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}},"ServiceUnavailable":{"description":"A required transient dependency, including authentication or the idempotency store, is unavailable. Wait for Retry-After; when the request uses Idempotency-Key, retry with that same value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"RateLimited":{"description":"Rate limit exceeded; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"RequestTimeout":{"description":"The request body was not received before the server deadline. Retry with the same Idempotency-Key when one was supplied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/XRequestID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}}}},"schemas":{"InferenceUploadPart":{"type":"object","additionalProperties":false,"properties":{"part_number":{"type":"integer","minimum":1,"maximum":320},"etag":{"type":"string","description":"Opaque S3 part ETag; this is not a whole-file checksum."},"size_bytes":{"type":"integer","minimum":1,"maximum":16777216},"checksum_sha256":{"type":"string","description":"Base64 SHA-256 of this part, when returned by storage."}},"required":["part_number","etag","size_bytes"]},"InferenceUpload":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["initiating","uploading","completing","ready","aborted","expired"]},"filename":{"type":"string"},"size_bytes":{"type":"integer","minimum":1,"maximum":5368709120},"part_size_bytes":{"type":"integer","const":16777216},"expires_at":{"type":"string","format":"date-time"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/InferenceUploadPart"}}},"required":["id","status","filename","size_bytes","part_size_bytes","expires_at","parts"]},"InferenceUploadCreate":{"type":"object","additionalProperties":false,"properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"size_bytes":{"type":"integer","minimum":1,"maximum":5368709120},"content_type":{"type":"string","minLength":1,"maxLength":255}},"required":["filename","size_bytes","content_type"]},"InferenceUploadPartSign":{"type":"object","additionalProperties":false,"properties":{"part_number":{"type":"integer","minimum":1,"maximum":320},"checksum_sha256":{"type":"string","pattern":"^[A-Za-z0-9+/]{43}=$","description":"Base64 SHA-256 of the exact part bytes. Each URL binds the part, checksum and expected byte count."}},"required":["part_number","checksum_sha256"]},"InferenceUploadPartsRequest":{"type":"object","additionalProperties":false,"properties":{"parts":{"type":"array","minItems":1,"maxItems":4,"items":{"$ref":"#/components/schemas/InferenceUploadPartSign"}}},"required":["parts"]},"InferenceSignedUploadPart":{"type":"object","additionalProperties":false,"properties":{"part_number":{"type":"integer","minimum":1,"maximum":320},"url":{"type":"string","format":"uri","description":"Short-lived upload-only URL. Send a PUT directly to this URL without API authorization or cookies."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Required storage request headers. Do not set Content-Length explicitly in browser JavaScript."},"expires_at":{"type":"string","format":"date-time"}},"required":["part_number","url","headers","expires_at"]},"InferenceSignedUploadParts":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InferenceSignedUploadPart"}}},"required":["data"]},"InferenceTranscriptionJobCreate":{"type":"object","additionalProperties":false,"properties":{"upload_id":{"type":"string","format":"uuid"},"model":{"type":"string","minLength":1,"maxLength":80},"language":{"type":"string","enum":["ar","en","auto"],"default":"ar"},"timestamp_granularity":{"type":"string","enum":["none","chunk","word"],"default":"none"},"webhook_config_id":{"type":"string","format":"uuid"}},"required":["upload_id","model"]},"InferenceTranscriptionProgress":{"type":"object","additionalProperties":false,"properties":{"total_chunks":{"type":"integer","minimum":0,"maximum":1000},"completed_chunks":{"type":"integer","minimum":0,"maximum":1000},"processed_ms":{"type":"integer","minimum":0,"maximum":18000000}},"required":["total_chunks","completed_chunks","processed_ms"]},"InferenceTranscriptionJob":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"upload_id":{"type":"string","format":"uuid"},"model":{"type":"string"},"language":{"type":"string","enum":["ar","en","auto"]},"timestamp_granularity":{"type":"string","enum":["none","chunk","word"]},"status":{"type":"string","enum":["validating","awaiting_credits","queued","processing","finalizing","completed","failed","cancelled"]},"phase":{"type":"string","description":"Current preparation, capacity, recognition, alignment, finalization or terminal phase."},"duration_ms":{"oneOf":[{"type":"integer","minimum":0,"maximum":18000000},{"type":"null"}]},"progress":{"$ref":"#/components/schemas/InferenceTranscriptionProgress"},"request_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"error_code":{"oneOf":[{"type":"string","enum":["invalid_audio","audio_too_long","audio_too_large","preparation_failed","transcription_failed","alignment_failed","job_expired","access_revoked","model_changed","cancelled"]},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deadline_at":{"type":"string","format":"date-time"},"completed_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"result_expires_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"content_expired":{"type":"boolean"},"has_partial_result":{"type":"boolean"}},"required":["id","upload_id","model","language","timestamp_granularity","status","phase","duration_ms","progress","request_id","error_code","created_at","updated_at","deadline_at","completed_at","result_expires_at","content_expired","has_partial_result"]},"InferenceTranscriptionJobs":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InferenceTranscriptionJob"}},"next_cursor":{"oneOf":[{"type":"string","description":"Opaque cursor for the next page; null at the end."},{"type":"null"}]}},"required":["data","next_cursor"]},"InferenceTranscriptionChunk":{"type":"object","additionalProperties":false,"properties":{"index":{"type":"integer","minimum":0},"start_ms":{"type":"integer","minimum":0,"maximum":18000000},"end_ms":{"type":"integer","minimum":0,"maximum":18000000},"text":{"type":"string"}},"required":["index","start_ms","end_ms","text"]},"InferenceTranscriptionWord":{"type":"object","additionalProperties":false,"properties":{"index":{"type":"integer","minimum":0},"text":{"type":"string","description":"Original displayed word with its spelling and punctuation preserved."},"start_ms":{"oneOf":[{"type":"integer","minimum":0,"maximum":18000000},{"type":"null"}]},"end_ms":{"oneOf":[{"type":"integer","minimum":0,"maximum":18000000},{"type":"null"}]},"alignment_status":{"type":"string","enum":["aligned","unaligned"]}},"required":["index","text","start_ms","end_ms","alignment_status"]},"InferenceTranscriptionAlignment":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["complete","partial"]},"model_version":{"type":"string","description":"Pinned alignment checkpoint and algorithm release."},"coverage":{"type":"number","minimum":0,"maximum":1},"aligned_words":{"type":"integer","minimum":0},"total_words":{"type":"integer","minimum":0}},"required":["status","model_version","coverage","aligned_words","total_words"]},"InferenceTranscriptionResult":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"model":{"type":"string"},"language":{"type":"string","description":"The requested language, or backend language metadata; unklang is not reliable language identification."},"text":{"type":"string"},"duration_ms":{"type":"integer","minimum":0,"maximum":18000000},"timestamp_granularity":{"type":"string","enum":["none","chunk","word"]},"timestamp_source":{"oneOf":[{"type":"string","enum":["forced_alignment","chunk"]},{"type":"null"}]},"chunks":{"type":"array","items":{"$ref":"#/components/schemas/InferenceTranscriptionChunk"}},"words":{"type":"array","items":{"$ref":"#/components/schemas/InferenceTranscriptionWord"}},"alignment":{"$ref":"#/components/schemas/InferenceTranscriptionAlignment"},"partial":{"type":"boolean"}},"required":["id","model","language","text","duration_ms","timestamp_granularity","timestamp_source","partial"]},"InferenceModel":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"display_name":{"type":"string"},"kind":{"type":"string","enum":["tts","stt"]},"enabled":{"type":"boolean"},"available":{"type":"boolean"},"max_audio_seconds":{"type":"integer","minimum":1,"maximum":600,"description":"Longest audio one request may produce. For a TTS model this is an output safety cap; it is not what is charged."},"version":{"type":"integer","minimum":1},"sample_rate":{"type":"integer","enum":[16000]},"unit":{"type":"string","enum":["characters","milliseconds"],"description":"What usage of this model is counted in. Text to speech counts input characters (Unicode code points); speech to text counts audio milliseconds."},"est_chars_per_second":{"type":"number","description":"Text to speech only. Estimated input characters per second of generated speech, used for audio-time estimates. It never affects what is charged."},"supports_async":{"type":"boolean","description":"Whether this model currently accepts asynchronous file jobs."},"async_audio_formats":{"type":"array","readOnly":true,"description":"Server-computed decoder formats for STT file jobs; empty for TTS. Not an editable mapping input.","items":{"type":"string","enum":["wav","rf64","mp3","flac","aac","m4a","ogg","opus"]}},"max_async_audio_seconds":{"type":"integer","minimum":0,"maximum":18000},"max_async_upload_bytes":{"type":"integer","minimum":0,"maximum":5368709120},"timestamp_granularities":{"type":"array","items":{"type":"string","enum":["none","chunk","word"]}},"alignment_languages":{"type":"array","items":{"type":"string","enum":["ar","en"]}},"backend_release":{"type":"string","description":"Immutable release pinned by async jobs; empty when no release is configured."}},"required":["id","name","display_name","kind","enabled","available","max_audio_seconds","version","sample_rate","unit"]},"InferenceVoice":{"type":"object","additionalProperties":false,"properties":{"language_label":{"type":"string"},"gender_label":{"type":"string"},"dialect_label":{"type":"string"},"sub_dialect_label":{"type":"string"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"language":{"type":"string"},"gender":{"type":"string"},"dialect":{"type":"string"},"sub_dialect":{"type":"string"},"description":{"type":"string"},"sample_available":{"type":"boolean"}},"required":["id","name","language","gender","dialect","sub_dialect","description","sample_available","language_label","gender_label","dialect_label","sub_dialect_label"]},"InferenceWallet":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["tts","stt"]},"concurrency":{"type":"integer","minimum":1},"active":{"type":"integer","minimum":0},"unit":{"type":"string","enum":["characters","milliseconds"],"description":"Unit of monthly, balance and reserved. Text to speech is counted in input characters, speech to text in audio milliseconds."},"monthly":{"type":"integer","minimum":0,"description":"Monthly allowance, in `unit`."},"balance":{"type":"integer","minimum":0,"description":"Available credit, in `unit`."},"reserved":{"type":"integer","minimum":0,"description":"Held by running requests, in `unit`."},"monthly_ms":{"type":"integer","minimum":0,"description":"monthly as audio time. Exact for speech to text; an estimate for text to speech (see audio_is_estimate)."},"balance_ms":{"type":"integer","minimum":0,"description":"balance as audio time. Exact for speech to text; an estimate for text to speech (see audio_is_estimate)."},"reserved_ms":{"type":"integer","minimum":0,"description":"reserved as audio time. Exact for speech to text; an estimate for text to speech (see audio_is_estimate)."},"audio_is_estimate":{"type":"boolean","description":"True when the *_ms fields are an estimate from est_chars_per_second (text to speech). Estimates are for display only; usage is counted in `unit`."},"est_chars_per_second":{"type":"number","description":"The speech rate behind the estimate (text to speech only)."},"reset_at":{"type":"string","format":"date-time"}},"required":["kind","unit","concurrency","active","monthly","balance","reserved","monthly_ms","balance_ms","reserved_ms","audio_is_estimate","reset_at"]},"InferenceRequest":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid"},"model":{"type":"string"},"kind":{"type":"string","enum":["tts","stt"]},"source":{"type":"string","enum":["api","playground","sample"]},"status":{"type":"string","enum":["running","completed","error","cancelled","interrupted"]},"unit":{"type":"string","enum":["characters","milliseconds"]},"charged":{"type":"integer","minimum":0,"description":"What the request cost, in `unit` (input characters for text to speech, audio milliseconds for speech to text)."},"audio_ms":{"type":"integer","minimum":0,"description":"Audio generated (text to speech). 0 for speech to text, whose charge is its audio duration."},"charged_ms":{"type":"integer","minimum":0,"description":"Deprecated. The charge as audio time. Speech to text, same as charged; text to speech, the audio generated (audio_ms)."},"first_output_ms":{"type":["integer","null"]},"latency_ms":{"type":["integer","null"]},"error_code":{"type":["string","null"]},"api_key_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}},"required":["id","org_id","model","kind","source","status","unit","charged","audio_ms","charged_ms","first_output_ms","latency_ms","error_code","api_key_id","created_at"]},"InferenceUsageBucket":{"type":"object","additionalProperties":false,"properties":{"day":{"type":"string","format":"date"},"kind":{"type":"string","enum":["tts","stt"]},"unit":{"type":"string","enum":["characters","milliseconds"]},"charged":{"type":"integer","minimum":0,"description":"Usage in `unit` (input characters for text to speech, audio milliseconds for speech to text)."},"characters":{"type":"integer","minimum":0,"description":"Input characters charged (text to speech; 0 for speech to text)."},"milliseconds":{"type":"integer","minimum":0,"description":"Audio time. Audio generated for text to speech; audio accepted for speech to text."},"requests":{"type":"integer","minimum":0},"errors":{"type":"integer","minimum":0},"first_output_p95_ms":{"type":["number","null"]}},"required":["day","kind","unit","charged","characters","milliseconds","requests","errors","first_output_p95_ms"]},"InferenceConcurrencyPoint":{"type":"object","additionalProperties":false,"properties":{"bucket":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["tts","stt"]},"peak":{"type":"integer","minimum":0}},"required":["bucket","kind","peak"]},"InferenceUsageTotal":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["tts","stt"]},"unit":{"type":"string","enum":["characters","milliseconds"]},"charged":{"type":"integer","minimum":0,"description":"Usage in `unit` (input characters for text to speech, audio milliseconds for speech to text)."},"characters":{"type":"integer","minimum":0,"description":"Input characters charged (text to speech; 0 for speech to text)."},"milliseconds":{"type":"integer","minimum":0,"description":"Audio time. Audio generated for text to speech; audio accepted for speech to text."},"requests":{"type":"integer","minimum":0},"errors":{"type":"integer","minimum":0},"first_output_p95_ms":{"type":["number","null"]}},"required":["kind","unit","charged","characters","milliseconds","requests","errors","first_output_p95_ms"]},"InferenceUsage":{"type":"object","additionalProperties":false,"properties":{"days":{"type":"integer","enum":[1,7,30]},"buckets":{"type":"array","items":{"$ref":"#/components/schemas/InferenceUsageBucket"}},"totals":{"type":"array","items":{"$ref":"#/components/schemas/InferenceUsageTotal"}},"concurrency":{"type":"array","items":{"$ref":"#/components/schemas/InferenceConcurrencyPoint"}},"concurrency_grain":{"type":"string","enum":["hour","day"]},"requests":{"type":"array","items":{"$ref":"#/components/schemas/InferenceRequest"}},"requests_limit":{"type":"integer","enum":[100]}},"required":["days","buckets","totals","concurrency","concurrency_grain","requests","requests_limit"]},"InferenceSpeechInput":{"type":"object","additionalProperties":false,"properties":{"model":{"type":"string","minLength":1,"maxLength":80},"voice":{"type":"string","format":"uuid"},"input":{"type":"string","minLength":1,"maxLength":8000,"description":"The text to speak. Charged by its length in Unicode characters (code points), counted as received, whitespace and punctuation included."},"max_audio_seconds":{"type":"integer","minimum":1,"maximum":600,"description":"Optional cap on the audio produced, a safety limit for runaway output. It does not change what is charged (the input characters), and output cut by the cap is still charged in full once audio has started."}},"required":["model","voice","input"]},"InferenceTranscriptionInput":{"type":"object","additionalProperties":false,"properties":{"model":{"type":"string","minLength":1,"maxLength":80},"file":{"type":"string","format":"binary","description":"PCM16 mono 16 kHz WAV. Up to 300 seconds, bounded by the published model."},"language":{"type":"string","enum":["ar","en","auto"],"default":"ar"}},"required":["model","file"]},"InferenceTranscription":{"type":"object","additionalProperties":false,"properties":{"text":{"type":"string"},"language":{"type":"string","description":"Language the model reports. It echoes the requested language, and returns unklang when the request asked for auto."},"duration_ms":{"type":"integer","minimum":1},"request_id":{"type":"string","format":"uuid"},"model":{"type":"string"}},"required":["text","language","duration_ms","request_id","model"]},"InferenceRealtimeInput":{"type":"object","additionalProperties":false,"properties":{"model":{"type":"string","minLength":1,"maxLength":80},"language":{"description":"Speech-to-text models only; a TTS voice decides its own language.","type":"string","enum":["ar","en","auto"],"default":"ar"},"voice":{"type":"string","format":"uuid","description":"Required for a TTS model, refused for a speech-to-text model. An approved voice from GET /inference/voices."},"max_audio_seconds":{"type":"integer","minimum":1,"maximum":600,"description":"Speech-to-text 1–300 (default 60, within the model limit) is the audio the session may accept and is what is reserved. With turn_detection the stream is continuous, so the range is 1–525 (default 300, within the model limit), which ends a real-time stream 15 seconds before the 9-minute session limit with audio_limit_reached; silence counts as audio. Text to speech 1–600 (default 600) is only a cap on the speech produced; it is not what is charged."},"max_characters":{"type":"integer","minimum":1,"maximum":100000,"default":10000,"description":"Text to speech only. The character budget reserved for the session, clamped to the available balance. Each speak message is charged by its characters; a message that would pass the budget ends the session with character_limit_reached."},"turn_detection":{"$ref":"#/components/schemas/InferenceTurnDetection"}},"required":["model"]},"InferenceTurnDetection":{"type":"object","additionalProperties":false,"description":"Speech to text only. Turn detection lets the model find where each speaker turn starts and ends in a continuous stream, so you do not need your own voice activity detection. Stream audio continuously, silence included. The session sends speech_started and speech_stopped events and one final transcript per turn, with no commit needed; commit still ends the open turn at once. Omit the object to keep the commit-driven session. Unset fields use the model's defaults. Billing is unchanged, on all audio received, silence included. Because the stream is continuous, max_audio_seconds defaults to 300 and accepts up to 525 (within the model limit, so a real-time stream reaches audio_limit_reached before the 9-minute session limit) on a turn-detection session; that is what is reserved.","properties":{"type":{"type":"string","enum":["semantic","vad"],"default":"semantic","description":"semantic asks a turn model whether the speaker has finished once silence_ms of silence has passed, and ends the turn after max_silence_ms regardless. vad ends the turn after silence_ms of silence."},"silence_ms":{"type":"integer","minimum":100,"maximum":5000,"description":"Silence before a verdict (semantic) or before the turn ends (vad)."},"max_silence_ms":{"type":"integer","minimum":200,"maximum":10000,"description":"Semantic backstop. The turn ends after this much silence even if the turn model says the speaker has not finished. Must be at least silence_ms."},"threshold":{"type":"number","minimum":0,"maximum":1,"description":"Probability at which the turn model treats the turn as complete (semantic)."},"min_speech_ms":{"type":"integer","minimum":0,"maximum":2000,"description":"Voice needed before a turn opens. Raise it to ignore short noises."},"prefix_padding_ms":{"type":"integer","minimum":0,"maximum":2000,"description":"Audio kept from before the detected start of speech, so the first syllable is not clipped."},"vad_threshold":{"type":"number","minimum":0,"maximum":1,"description":"Speech probability above which a frame counts as voice."},"idle_ms":{"type":"integer","minimum":0,"maximum":10000,"description":"Ends an open turn when no audio arrives for this long in wall-clock time. 0 turns it off."},"no_speech_logprob":{"type":"number","minimum":-10,"maximum":0,"description":"A turn whose mean token log-probability is below this is reported as no speech, an empty final transcript with no_speech true."},"incomplete_threshold":{"type":"number","minimum":0,"maximum":1,"description":"With semantic turn detection, an end-of-turn probability below this counts as clearly unfinished, so the wait is extended by incomplete_extend_ms. 0 turns it off. Must not exceed threshold."},"incomplete_extend_ms":{"type":"integer","minimum":0,"maximum":10000,"description":"Extra silence allowed after the speaker's last word when the end-of-turn model judges the sentence clearly unfinished, for example mid-way through dictating a number."}}},"InferenceRealtimeToken":{"type":"object","additionalProperties":false,"properties":{"token":{"type":"string","readOnly":true,"x-sonus-one-time-secret":true,"x-kejue-one-time-secret":true},"expires_in":{"type":"integer","enum":[30]},"kind":{"type":"string","enum":["stt","tts"],"description":"The session the token opens, decided by the model."},"url":{"type":"string","description":"Absolute wss:// URL of the live socket; append ?token=…"}},"required":["token","expires_in","url","kind"]},"AlertDefinition":{"type":"object","additionalProperties":false,"properties":{"min_coverage_percent":{"type":"integer","minimum":0,"maximum":100,"default":80,"description":"Minimum successful processing coverage, in percent, for extraction result rules. Incomplete coverage cannot resolve incidents. 0 (or omitting the field) means the default of 80; a stored 0 is omitted from responses."},"metric":{"type":"string","enum":["tool_5xx","tool_timeout","tool_failure","webhook_failure","webhook_terminal","webhook_backlog","extraction_failure","extraction_backlog","extraction_result","call_failure","call_route_failure","call_unanswered","trunk_registration","outbound_redial_loop","campaign_auto_paused","dncr_provider_failure","dncr_rate_limited","dncr_registered","dncr_unresolved","dncr_connection"],"description":"Signal to watch. trunk_registration, outbound_redial_loop, campaign_auto_paused, dncr_unresolved, dncr_connection and the backlog signals support count aggregation only. For call, trunk and outbound signals resource_keys are SIP trunk IDs; DNCR and campaign signals take no resource_keys."},"campaign_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":20,"uniqueItems":true,"description":"Campaigns to watch. Only for call_failure, call_route_failure, call_unanswered, outbound_redial_loop, campaign_auto_paused and the dncr_ signals; omitted or empty means every campaign and non-campaign call."},"failure_codes":{"type":"array","items":{"type":"string","enum":["provider_busy","provider_no_answer","provider_rejected","provider_capacity","provider_rate_limited","provider_route_unavailable","caller_id_invalid","provider_authentication","provider_unknown","destination_invalid","provider_forbidden","agent_dispatch_timeout","agent_crash","media_pipeline_error","caller_hangup_pre_answer","unknown"]},"maxItems":16,"uniqueItems":true,"description":"Only for call_failure. Counts only failed calls with one of these failure codes; omitted or empty counts every failure."},"aggregation":{"type":"string","enum":["rate","count"]},"severity":{"type":"string","enum":["warning","critical"]},"resource_keys":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120},"maxItems":20},"agent_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":20,"uniqueItems":true},"window_minutes":{"type":"integer","enum":[5,10,15,30,60,180,1440]},"threshold":{"type":"number","minimum":0},"recovery_threshold":{"type":"number","minimum":0},"min_samples":{"type":"integer","minimum":1,"maximum":1000000},"fire_for_minutes":{"type":"integer","minimum":0,"maximum":60},"recover_for_minutes":{"type":"integer","minimum":0,"maximum":60},"recipient_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":20,"uniqueItems":true},"include_tests":{"type":"boolean"},"field":{"type":"string","maxLength":120},"operator":{"type":"string","enum":["eq","neq","gt","lt","missing"]},"expected":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["metric","aggregation","severity","resource_keys","agent_ids","window_minutes","threshold","recovery_threshold","min_samples","fire_for_minutes","recover_for_minutes","recipient_ids","include_tests"]},"AlertRule":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"definition":{"$ref":"#/components/schemas/AlertDefinition"},"enabled":{"type":"boolean"},"resource_version":{"type":"integer"},"state":{"type":"string","enum":["healthy","pending","firing","recovering","insufficient_data","error","paused"]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"numerator":{"type":"integer"},"denominator":{"type":"integer"},"breach_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"recovery_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"evaluated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","org_id","name","definition","enabled","resource_version","state","value","numerator","denominator","breach_since","recovery_since","evaluated_at","last_error","archived_at","created_at","updated_at"]},"AlertCreateRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"definition":{"$ref":"#/components/schemas/AlertDefinition"},"enabled":{"type":"boolean"}},"required":["name","definition"]},"AlertUpdateRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"definition":{"$ref":"#/components/schemas/AlertDefinition"},"enabled":{"type":"boolean"}},"minProperties":1},"AlertListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AlertRule"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"]},"AlertSample":{"type":"object","additionalProperties":false,"properties":{"at":{"type":"string","format":"date-time"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"numerator":{"type":"integer"},"denominator":{"type":"integer"},"state":{"type":"string"}},"required":["at","value","numerator","denominator","state"]},"AlertPreviewResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AlertSample"}},"coverage_note":{"type":"string"}},"required":["data","coverage_note"]},"AlertRecipient":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["id","name","email"]},"AlertRecipientsResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AlertRecipient"}}},"required":["data"]},"AlertTemplate":{"type":"object","additionalProperties":false,"properties":{"metric":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"source":{"type":"string"},"permission":{"type":"string"}},"required":["metric","label","description","source","permission"]},"AlertPreset":{"type":"object","additionalProperties":false,"description":"A ready-made rule. Its definition has no recipients or scope; the caller adds them before creating the rule.","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"definition":{"type":"object","additionalProperties":false,"properties":{"metric":{"type":"string"},"aggregation":{"type":"string","enum":["rate","count"]},"severity":{"type":"string","enum":["warning","critical"]},"resource_keys":{"type":"array","items":{"type":"string"},"maxItems":0},"agent_ids":{"type":"array","items":{"type":"string"},"maxItems":0},"window_minutes":{"type":"integer"},"threshold":{"type":"number"},"recovery_threshold":{"type":"number"},"min_samples":{"type":"integer"},"fire_for_minutes":{"type":"integer"},"recover_for_minutes":{"type":"integer"},"recipient_ids":{"type":"array","items":{"type":"string"},"maxItems":0},"include_tests":{"type":"boolean"}},"required":["metric","aggregation","severity","window_minutes","threshold","recovery_threshold","min_samples","fire_for_minutes","recover_for_minutes"]}},"required":["id","name","description","definition"]},"AlertSchemaResponse":{"type":"object","additionalProperties":false,"properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/AlertTemplate"}},"presets":{"type":"array","items":{"$ref":"#/components/schemas/AlertPreset"}},"failure_codes":{"type":"array","description":"Call failure codes call_failure rules may be narrowed to.","items":{"type":"string"}},"windows":{"type":"array","items":{"type":"integer"}},"max_rules":{"type":"integer"},"max_recipients":{"type":"integer"}},"required":["templates","presets","failure_codes","windows","max_rules","max_recipients"]},"AlertIncident":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"rule_id":{"type":"string","format":"uuid"},"rule_version":{"type":"integer"},"rule_snapshot":{"$ref":"#/components/schemas/AlertRule"},"opened_at":{"type":"string","format":"date-time"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"close_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"initial_value":{"type":"number"},"peak_value":{"type":"number"},"numerator":{"type":"integer"},"denominator":{"type":"integer"}},"required":["id","rule_id","rule_version","rule_snapshot","opened_at","closed_at","close_reason","initial_value","peak_value","numerator","denominator"]},"AlertIncidentListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AlertIncident"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"]},"AlertNotification":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"event":{"type":"string","enum":["firing","resolved","test"]},"recipient_name":{"type":"string"},"recipient_email":{"type":"string"},"user_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","sending","sent","skipped","failed"]},"attempts":{"type":"integer"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","event","user_id","recipient_name","recipient_email","status","attempts","error_code","created_at","sent_at"]},"AlertIncidentDetailResponse":{"type":"object","additionalProperties":false,"properties":{"incident":{"$ref":"#/components/schemas/AlertIncident"},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/AlertNotification"}}},"required":["incident","notifications"]},"Error":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","request_id"],"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string","minLength":1,"description":"Human-readable summary. Automation must branch on code, not this text."},"request_id":{"type":"string","minLength":1,"maxLength":128,"description":"Always equals the X-Request-Id response header."},"feature":{"type":"string","description":"Compatibility mirror of details.feature, emitted only for entitlement_required."},"details":{"$ref":"#/components/schemas/PublicErrorDetails"}},"oneOf":[{"$ref":"#/components/schemas/AgentBaselineTooLargeErrorVariant"},{"$ref":"#/components/schemas/AgentSlugTakenErrorVariant"},{"$ref":"#/components/schemas/GuardrailSetInUseErrorVariant"},{"$ref":"#/components/schemas/GenericPublicErrorVariant"}]}}},"AgentBaselineTooLargeErrorVariant":{"type":"object","description":"Executable specialization selected only by code=agent_baseline_too_large.","properties":{"code":{"type":"string","const":"agent_baseline_too_large"},"details":{"$ref":"#/components/schemas/AgentBaselineTooLargeDetails"}},"required":["code","details"]},"AgentBaselineTooLargeDetails":{"type":"object","additionalProperties":false,"description":"Admission-control measurement at the rejected candidate. Reduce system prompt content or assigned/materialized tools until baseline_tokens is no greater than max_model_len (the usable budget), then retry with the latest aggregate ETag. system_tokens and tools_tokens are present when a draft save or activation is rejected; a call-start rejection (web call, test call, outbound) reads only the persisted total and omits them.","properties":{"baseline_tokens":{"type":"integer","minimum":1},"max_model_len":{"type":"integer","minimum":0,"description":"Usable token budget for the system prompt plus tools — 80% of model_context_limit, the rest is reserved for the conversation. This is the number the dashboard shows."},"model_context_limit":{"type":"integer","minimum":1,"description":"Raw deployment model context length the budget derives from."},"headroom_budget":{"type":"integer","minimum":0,"deprecated":true,"description":"Compatibility alias; always equals max_model_len."},"system_tokens":{"type":"integer","minimum":0},"tools_tokens":{"type":"integer","minimum":0}},"required":["baseline_tokens","max_model_len","model_context_limit","headroom_budget"]},"AgentSlugTakenErrorVariant":{"type":"object","description":"Executable specialization selected only by code=slug_taken. The historical component name is retained for generated-client compatibility; the shape is shared by agent and JSON-catalog slugs, including guardrail sets.","properties":{"code":{"type":"string","const":"slug_taken"},"details":{"$ref":"#/components/schemas/AgentSlugTakenDetails"}},"required":["code","details"]},"AgentSlugTakenDetails":{"type":"object","additionalProperties":false,"properties":{"field":{"type":"string","const":"slug"},"value":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9_-]+$","description":"Normalized slug that collided with an existing resource. Agent slugs use the narrower 48-character underscore-only subset; guardrail-set slugs can also contain hyphens and contain at most 64 characters."}},"required":["field","value"]},"GenericPublicErrorVariant":{"type":"object","description":"Every public error other than the two agent-specialized variants.","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCode"},{"not":{"enum":["agent_baseline_too_large","guardrail_set_in_use","slug_taken"]}}]}},"required":["code"]},"PIIAccessApprovalRequiredDetails":{"description":"Details for pii_access_approval_required. Exactly one subject is present. A call grant cannot authorize a transcription job or vice versa.","oneOf":[{"type":"object","additionalProperties":false,"properties":{"call_id":{"type":"string","format":"uuid"},"request_status":{"type":"string","enum":["none","pending","approved","rejected","expired","revoked"]},"request_id":{"type":"string","format":"uuid"}},"required":["call_id","request_status"]},{"type":"object","additionalProperties":false,"properties":{"inference_job_id":{"type":"string","format":"uuid"},"request_status":{"type":"string","enum":["none","pending","approved","rejected","expired","revoked"]},"request_id":{"type":"string","format":"uuid"}},"required":["inference_job_id","request_status"]}]},"PublicErrorDetails":{"type":"object","additionalProperties":true,"description":"Code-specific structured details. The properties below cover every normalized middleware contract; domain codes marked optional_object or polymorphic_object in x-sonus-error-catalog can add documented fields. Use the catalog's details discriminator to select the applicable shape. For pii_access_approval_required, PIIAccessApprovalRequiredDetails documents the exact call-or-transcription subject union.","properties":{"internal":{"type":"string","maxLength":2049,"description":"The underlying cause of the failure (upstream status and reason, database error class, provider message), scrubbed of credentials and personal data. Present on server errors and on any error whose cause is known. Intended for operators and support tickets; automation must branch on code."},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"feature":{"type":"string"},"header":{"type":"string"},"path":{"type":"string"},"received":{"type":"string"},"parameter":{"type":"string"},"reason":{"type":"string"},"retry_after_seconds":{"type":"integer","minimum":1},"retryable":{"type":"boolean"},"call_id":{"type":"string","format":"uuid","description":"Call subject for sensitive-content approval failures."},"inference_job_id":{"type":"string","format":"uuid","description":"Transcription job subject for sensitive-content approval failures; replaces call_id."},"request_status":{"type":"string","description":"Approval request state when pii_access_approval_required is returned."},"request_id":{"type":"string","description":"Existing sensitive-content access request identity, when one is available."}}},"FieldError":{"type":"object","additionalProperties":false,"required":["path","code","message"],"properties":{"path":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}}},"ValidationDetails":{"type":"object","additionalProperties":false,"required":["fields"],"properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}}}},"AIConnectorsMode":{"type":"string","enum":["enabled","read_only","disabled"],"description":"Whether members may connect AI assistants (Claude and other MCP clients) to this team through OAuth. `enabled` — a connected app acts as the member, limited by their role and the scopes they approved; `read_only` — connected apps keep only read access; `disabled` — every connected-app request for this team is refused with `ai_connectors_disabled`. Teams with a signed BAA start `disabled`. Changing it requires `org:update`."},"OAuthScope":{"type":"string","enum":["read","build","deploy","calls","pii","admin"],"description":"Consent scope a member approved for a connected app. `read` — every read; `build` — create/edit agents, tools, evals and other resources, promote to staging; `deploy` — production deploys; `calls` — place calls, run tools against real systems, control live calls; `pii` — unmasked data; `admin` — team administration and destructive call operations. Effective access is always the member's current role in the team intersected with these scopes."},"ConnectedAppUser":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"display_name":{"type":"string"}},"required":["id","email","display_name"]},"ConnectedApp":{"type":"object","additionalProperties":false,"description":"An OAuth grant that reaches this team.","properties":{"id":{"type":"string","format":"uuid"},"client_id":{"type":"string","description":"OAuth client identifier — an https Client ID Metadata Document URL, or an identifier issued by dynamic registration."},"client_name":{"type":"string","description":"Client name the member saw on the consent screen, e.g. Claude."},"client_uri":{"description":"Client home page, or null when the client did not publish one.","oneOf":[{"type":"string","format":"uri"},{"type":"null"}]},"user":{"$ref":"#/components/schemas/ConnectedAppUser"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/OAuthScope"}},"all_teams":{"type":"boolean","description":"True when the member approved all of their teams, including teams they join later. Such a grant reaches this team because the member belongs to it; removing this team keeps it excluded even if the member leaves and rejoins, while the grant keeps working in the member's other teams."},"created_at":{"type":"string","format":"date-time"},"last_used_at":{"description":"Last request made with this grant, or null when unused.","oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","client_id","client_name","client_uri","user","scopes","all_teams","created_at","last_used_at"]},"ConnectedAppListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConnectedApp"}},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page, or null after the final page."}},"required":["data","next_cursor"]},"AuthOAuthContextResponse":{"type":"object","additionalProperties":false,"description":"Context visible to a connected app (OAuth access token). The app acts as the member; `memberships` lists only the teams the member approved for this app and still belongs to (for an all-teams grant, every team the member belongs to now, minus any a team admin removed and any whose single sign-on or two-factor requirement the member does not meet). Select a team per request with the `Sonus-Org-Id` header; without it the request runs in the default team.","properties":{"principal":{"$ref":"#/components/schemas/AuthOAuthPrincipal"},"user":{"$ref":"#/components/schemas/ConnectedAppUser"},"org_id":{"type":"string","format":"uuid","description":"Team this request ran in."},"current_org":{"$ref":"#/components/schemas/AuthOAuthCurrentOrganization"},"permissions":{"$ref":"#/components/schemas/AuthPermissionList"},"memberships":{"type":"array","items":{"$ref":"#/components/schemas/AuthOAuthMembership"}},"tenancy_mode":{"$ref":"#/components/schemas/AuthTenancyMode"},"via_api_key":{"type":"boolean","const":false},"entitlements":{"$ref":"#/components/schemas/AuthEntitlements"},"baa":{"$ref":"#/components/schemas/AuthBAAStatus"}},"required":["principal","user","org_id","current_org","permissions","memberships","tenancy_mode","via_api_key","entitlements","baa"]},"AuthOAuthPrincipal":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","const":"oauth"},"grant_id":{"type":"string","format":"uuid"},"client_id":{"type":"string"},"client_name":{"type":"string"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/OAuthScope"}},"all_teams":{"type":"boolean","description":"True when the member approved all of their teams, including teams they join later. `memberships` then lists every team the member currently belongs to that the app may use, and changes as the member joins or leaves teams, without reconnecting."}},"required":["type","grant_id","client_id","client_name","scopes","all_teams"]},"AuthOAuthCurrentOrganization":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"retention_days":{"type":"integer","minimum":1,"maximum":3650},"default_timezone":{"type":"string"},"pii_access_mode":{"type":"string","enum":["open","reason","approval"]},"pii_access_grant_days":{"type":"integer","minimum":0,"maximum":365},"ai_connectors":{"$ref":"#/components/schemas/AIConnectorsMode"},"role":{"oneOf":[{"type":"string"},{"type":"null"}]},"role_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","name","retention_days","default_timezone","pii_access_mode","pii_access_grant_days","ai_connectors","role","role_id"]},"AuthOAuthMembership":{"type":"object","additionalProperties":false,"properties":{"org_id":{"type":"string","format":"uuid"},"org_name":{"type":"string"},"role":{"type":"string"},"ai_connectors":{"$ref":"#/components/schemas/AIConnectorsMode"},"default":{"type":"boolean","description":"True for the team requests run in without a Sonus-Org-Id header."}},"required":["org_id","org_name","role","ai_connectors","default"]},"AuthContextResponse":{"description":"Authentication and workspace context. `via_api_key` narrows API keys; a connected app (OAuth) carries `principal.type` = `oauth`.","oneOf":[{"$ref":"#/components/schemas/AuthAPIKeyContextResponse"},{"$ref":"#/components/schemas/AuthSessionContextResponse"},{"$ref":"#/components/schemas/AuthOAuthContextResponse"}]},"AuthAPIKeyContextResponse":{"type":"object","additionalProperties":false,"description":"Delegated context visible to an API key. Human memberships and administrative identity are intentionally absent.","properties":{"principal":{"$ref":"#/components/schemas/AuthAPIKeyPrincipal"},"current_org":{"$ref":"#/components/schemas/AuthAPIKeyCurrentOrganization"},"org_id":{"type":"string","format":"uuid","description":"Workspace the API key is permanently bound to."},"permissions":{"$ref":"#/components/schemas/AuthPermissionList"},"scopes":{"$ref":"#/components/schemas/AuthPermissionList"},"tenancy_mode":{"$ref":"#/components/schemas/AuthTenancyMode"},"via_api_key":{"type":"boolean","const":true},"entitlements":{"$ref":"#/components/schemas/AuthEntitlements"},"baa":{"$ref":"#/components/schemas/AuthBAAStatus"}},"required":["principal","current_org","org_id","permissions","scopes","tenancy_mode","via_api_key","entitlements","baa"]},"AuthSessionContextResponse":{"type":"object","additionalProperties":false,"description":"Human session context, including memberships across workspaces.","properties":{"user":{"$ref":"#/components/schemas/AuthUser"},"current_org":{"$ref":"#/components/schemas/AuthSessionCurrentOrganization"},"permissions":{"$ref":"#/components/schemas/AuthPermissionList"},"memberships":{"type":"array","description":"All workspaces the user can switch to, sorted by workspace name.","items":{"$ref":"#/components/schemas/AuthMembership"}},"tenancy_mode":{"$ref":"#/components/schemas/AuthTenancyMode"},"via_api_key":{"type":"boolean","const":false},"entitlements":{"$ref":"#/components/schemas/AuthEntitlements"},"baa":{"$ref":"#/components/schemas/AuthBAAStatus"},"account_admin":{"description":"Account-level administration context, or null when the user is not an account administrator.","oneOf":[{"$ref":"#/components/schemas/AuthAccountAdmin"},{"type":"null"}]},"mfa":{"$ref":"#/components/schemas/AuthMFAContext"},"must_change_password":{"type":"boolean","description":"True when an administrator set a temporary password for this user. The session is confined to the change-password endpoint (every other route answers 403 `password_change_required`) until they choose their own password."}},"required":["user","current_org","permissions","memberships","tenancy_mode","via_api_key","entitlements","baa","account_admin","mfa","must_change_password"]},"AuthMFAContext":{"type":"object","additionalProperties":false,"description":"The signed-in user's second-factor state, so a client can route to enrollment and render security settings without another round trip.","properties":{"enrolled":{"type":"boolean","description":"True when the user has a CONFIRMED authenticator. An enrollment that was started but never confirmed is not enrolled."},"policy":{"type":"string","enum":["off","optional","required"],"description":"The current workspace's second-factor requirement."},"enrollment_required":{"type":"boolean","description":"True when this session is confined to the enrollment endpoints because the workspace requires a factor the user has not set up yet. Every other route answers 403 `mfa_enrollment_required`."}},"required":["enrolled","policy","enrollment_required"]},"AuthAPIKeyPrincipal":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","const":"api_key"},"api_key_id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Human label assigned when the key was created."},"prefix":{"type":"string","description":"Non-secret key prefix safe to log and display."},"expires_at":{"description":"Expiration instant, or null for a non-expiring key.","oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_by_user_id":{"description":"Creating user, or null for a legacy or system-created key.","oneOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["type","api_key_id","name","prefix","expires_at","created_by_user_id"]},"AuthAPIKeyCurrentOrganization":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"retention_days":{"type":"integer","minimum":1,"maximum":3650},"default_timezone":{"type":"string","description":"IANA timezone used when an outbound workflow omits its timezone."},"pii_access_mode":{"type":"string","enum":["open","reason","approval"],"description":"Friction in front of un-redacted reads of call data, so the dashboard knows whether to prompt for a reason, open a request, or reveal outright before any call is opened."},"pii_access_grant_days":{"type":"integer","minimum":0,"maximum":365,"description":"Lifetime in days of an approved break-glass request; 0 never expires."}},"required":["id","name","retention_days","default_timezone","pii_access_mode","pii_access_grant_days"]},"AuthSessionCurrentOrganization":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"retention_days":{"type":"integer","minimum":1,"maximum":3650},"default_timezone":{"type":"string","description":"IANA timezone used when an outbound workflow omits its timezone."},"pii_access_mode":{"type":"string","enum":["open","reason","approval"],"description":"Friction in front of un-redacted reads of call data, so the dashboard knows whether to prompt for a reason, open a request, or reveal outright before any call is opened."},"pii_access_grant_days":{"type":"integer","minimum":0,"maximum":365,"description":"Lifetime in days of an approved break-glass request; 0 never expires."},"role":{"description":"Current membership role name, or null for an account/platform administrator without a workspace membership.","oneOf":[{"type":"string"},{"type":"null"}]},"role_id":{"description":"Current role resource ID, or null without a workspace membership.","oneOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","name","retention_days","default_timezone","pii_access_mode","pii_access_grant_days","role","role_id"]},"AuthUser":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"display_name":{"type":"string"},"is_platform_admin":{"type":"boolean"},"disabled_at":{"description":"Disablement instant, or null while the user is active.","oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"disabled_reason":{"description":"Operator-provided reason, or null when none is recorded.","oneOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","display_name","is_platform_admin","disabled_at","disabled_reason"]},"AuthMembership":{"type":"object","additionalProperties":false,"properties":{"org_id":{"type":"string","format":"uuid"},"org_name":{"type":"string"},"role":{"type":"string","description":"System or custom role name in this workspace."}},"required":["org_id","org_name","role"]},"AuthPermissionList":{"type":"array","maxItems":256,"uniqueItems":true,"items":{"type":"string","pattern":"^(\\*|[a-z][a-z0-9_-]*:(\\*|[a-z][a-z0-9_-]*))$"}},"AuthTenancyMode":{"type":"string","enum":["single","multi"]},"AuthEntitlements":{"type":"object","additionalProperties":false,"description":"Complete stable entitlement catalog for the current workspace.","properties":{"inference":{"$ref":"#/components/schemas/AuthEntitlement"},"alerts":{"$ref":"#/components/schemas/AuthEntitlement"},"audit_log_export":{"$ref":"#/components/schemas/AuthEntitlement"},"pii_redaction_config":{"$ref":"#/components/schemas/AuthEntitlement"},"legal_hold":{"$ref":"#/components/schemas/AuthEntitlement"},"custom_retention":{"$ref":"#/components/schemas/AuthEntitlement"},"llm_observability_content":{"$ref":"#/components/schemas/AuthEntitlement"},"mfa":{"$ref":"#/components/schemas/AuthEntitlement"},"evals":{"$ref":"#/components/schemas/AuthEntitlement"},"guardrails":{"$ref":"#/components/schemas/AuthEntitlement"},"human_call_ingest":{"$ref":"#/components/schemas/AuthEntitlement"},"campaigns":{"$ref":"#/components/schemas/AuthEntitlement"},"sso":{"$ref":"#/components/schemas/AuthEntitlement"},"flows":{"$ref":"#/components/schemas/AuthEntitlement"},"groups":{"$ref":"#/components/schemas/AuthEntitlement"}},"required":["audit_log_export","pii_redaction_config","legal_hold","custom_retention","llm_observability_content","mfa","evals","guardrails","human_call_ingest","campaigns","sso","flows","groups","inference"]},"AuthEntitlement":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"config":{"description":"Optional feature-specific JSON configuration. Its shape is defined by the named entitlement rather than interpreted generically."}},"required":["enabled"]},"AuthBAAStatus":{"type":"object","additionalProperties":false,"properties":{"signed":{"type":"boolean"},"signed_at":{"description":"Signature instant, or null when no BAA is recorded.","oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ref":{"description":"Contract reference, or null when none is recorded.","oneOf":[{"type":"string"},{"type":"null"}]}},"required":["signed","signed_at","ref"]},"AuthAccountAdmin":{"type":"object","additionalProperties":false,"properties":{"account_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["account_id","name","slug"]},"ArchiveResult":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]},"CreatedResource":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]},"AfterCallConfig":{"type":"object","additionalProperties":false,"description":"Complete after-call behavior for one agent version. Nullable fields are always present. A virtual default has id, summary_prompt, created_at, and updated_at set to null and version 0.","properties":{"id":{"description":"Persisted configuration ID, or null when the response is a virtual default.","oneOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"agent_version_id":{"type":"string","format":"uuid"},"summary_enabled":{"type":"boolean"},"summary_prompt":{"oneOf":[{"type":"string","maxLength":50000},{"type":"null"}],"description":"Custom summary prompt, or null to use the system default."},"extraction_object_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"webhook_config_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"version":{"type":"integer","format":"int64","minimum":0,"description":"Strong resource version. Zero is reserved for a virtual default; persisted configurations start at one."},"created_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updated_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","agent_version_id","summary_enabled","summary_prompt","extraction_object_ids","webhook_config_ids","version","created_at","updated_at"]},"AfterCallPatchRequest":{"type":"object","minProperties":1,"additionalProperties":false,"properties":{"summary_enabled":{"type":"boolean"},"summary_prompt":{"oneOf":[{"type":"string","maxLength":50000},{"type":"null"}],"description":"Whitespace is trimmed. Send null or an empty string to restore the system-default summary prompt."},"extraction_object_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"uniqueItems":true,"description":"Complete set of active extraction objects to attach. Send [] to clear all."},"webhook_config_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"uniqueItems":true,"description":"Complete set of non-archived webhook configurations to attach. Send [] to clear all."}}},"AgentBaselineEstimateRequest":{"description":"Read-only candidate patch with exactly the same closed authoring shape and merge semantics as PATCH /agents/{id}/draft. Omitted fields are loaded from the current persisted draft; therefore {} estimates that draft unchanged. When the agent has no draft, the request must supply prompt so a complete in-memory candidate can be assembled. The server performs the same template, catalog-reference, provider, transfer, topology, and baseline checks as a draft save but performs no write and emits no audit event.","allOf":[{"$ref":"#/components/schemas/AgentDraftSaveRequest"}]},"AgentBaselineEstimateResponse":{"type":"object","additionalProperties":false,"properties":{"baseline_tokens":{"type":"integer","minimum":0},"max_model_len":{"type":"integer","minimum":0,"description":"Usable token budget for the system prompt plus tools — 80% of model_context_limit, the rest is reserved for the conversation. A draft save is rejected when baseline_tokens exceeds it. This is the number the dashboard shows."},"model_context_limit":{"type":"integer","minimum":1,"description":"Raw deployment model context length the budget derives from."},"headroom_budget":{"type":"integer","minimum":0,"deprecated":true,"description":"Compatibility alias; always equals max_model_len."},"components":{"type":"object","additionalProperties":false,"properties":{"system":{"type":"integer","minimum":0},"tools":{"type":"integer","minimum":0}},"required":["system","tools"]}},"required":["baseline_tokens","max_model_len","model_context_limit","headroom_budget","components"]},"AgentPromptTemplate":{"type":"string","maxLength":500000,"description":"Prompt-mode runtime template. Each expression is one variable reference between balanced {{ and }} delimiters; whitespace immediately inside the delimiters is allowed. Bare aliases such as {{lead_name}} and explicit {{vars.lead_name}} references resolve from the same per-call variable map. Bare and vars names must match ^[A-Za-z_][A-Za-z0-9_]{0,63}$. Operator variables override the built-in bare aliases call_id, agent_slug, caller_phone, and caller_phone_number. {{system.NAME}} accepts a 1–128 character name whose first segment starts with a letter or underscore and whose non-empty dot-separated segments contain letters, digits, underscores, or hyphens. Stable system names are call_id, session_id, org_id, agent_id, agent_slug, agent_version_id, pathway_id, current_node_id, caller_phone, caller_phone_number, locale, lead_timezone, timestamp_iso, and timestamp_ms. Dynamic system.sip.* names expose SIP participant attributes, including system.sip.h.x-<header>; system.timezone.lead uses the valid IANA zone in the lead_timezone call variable; and system.timezone.<iana-slug> converts an IANA zone to lowercase hyphen form (Asia/Dubai becomes asia-dubai and + / - become plus / minus). Missing but syntactically valid vars/system values render as the empty string. {{tools.SLUG}} and {{tools.SLUG.NAME}} render the results of the agent's pre-call tools (behavior.tools.pre_call), which run once before the agent speaks: SLUG is the tool slug (a letter or underscore, then up to 47 letters, digits, or underscores) and NAME is a key of that tool's response mapping; bare {{tools.SLUG}} is the whole response body, JSON-encoded when structured. A tool that failed, did not run, or lacks the name renders the empty string. The same contract applies to behavior.opening.greeting.instructions, which is rendered per call before the opening line is generated. The tools scope is available in this prompt and in behavior.opening.greeting.instructions only. slots is unavailable in top-level prompt mode and in greeting instructions. params and secrets are forbidden, unknown scopes are rejected, and malformed or unmatched delimiters return 422 validation_failed."},"AgentScopedWorkflowTemplate":{"type":"string","description":"Scoped pathway runtime template used by transfer destination and announcement fields. Every expression must use slots.NAME, vars.NAME, or system.NAME; bare aliases are rejected here. Names, dynamic SIP/timezone behavior, missing-value rendering, balanced delimiters, and params/secrets restrictions are exactly those documented by AgentPromptTemplate and AgentWorkflowPromptTemplate. Referenced slots must be defined somewhere in the same graph before the workflow can be saved."},"AgentCloneRequest":{"type":"object","additionalProperties":false,"required":["name","slug","source"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Display name for the copy."},"slug":{"type":"string","minLength":2,"maxLength":48,"pattern":"^[a-z0-9_]+$","description":"Unique routing identifier for the copy."},"source":{"type":"string","enum":["draft","staging","production"],"description":"Version to copy. The request fails if the selected version is unavailable."}}},"AgentCreateRequest":{"type":"object","additionalProperties":false,"properties":{"slug":{"type":"string","minLength":2,"maxLength":48,"pattern":"^[a-z0-9_]+$","description":"Stable routing identifier. It cannot be renamed after creation."},"name":{"type":"string","minLength":1,"maxLength":200},"mode":{"type":"string","enum":["prompt"]},"prompt":{"$ref":"#/components/schemas/AgentPromptTemplate","description":"Optional initial prompt template. Omit, send an empty string, or send only whitespace to seed the platform default. See AgentPromptTemplate for the complete variable contract."}},"required":["slug","name","mode"]},"AgentCreateResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"mode":{"type":"string","enum":["prompt"]},"draft_version_id":{"type":"string","format":"uuid"},"revision":{"type":"integer","format":"int64","minimum":1,"description":"Initial aggregate revision. Supply the response ETag rather than constructing one from this number."},"updated_at":{"type":"string","format":"date-time"}},"required":["id","slug","name","mode","draft_version_id","revision","updated_at"]},"AgentDeployResponse":{"type":"object","additionalProperties":false,"properties":{"agent_id":{"type":"string","format":"uuid"},"production_version_id":{"type":"string","format":"uuid"},"updated":{"type":"boolean","description":"False when production already referenced the staging snapshot."},"revision":{"type":"integer","format":"int64","minimum":1},"updated_at":{"type":"string","format":"date-time","description":"Aggregate update timestamp corresponding to revision."}},"required":["agent_id","production_version_id","updated","revision","updated_at"]},"AgentDetail":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","format":"int64","minimum":1,"description":"Monotonic persisted revision of the complete mutable agent aggregate. Never construct an ETag from this number: the opaque aggregate tag also covers a representation-version component and deployment capability bits."},"updated_at":{"type":"string","format":"date-time","description":"Time of the latest externally visible aggregate change. Semantic no-ops preserve this value."},"production_version_id":{"type":"string","format":"uuid"},"production_version_number":{"type":"integer","minimum":1,"description":"Immutable version number currently deployed to production. Omitted until production_version_id is present; a staging-only snapshot is never reported as production."},"production_version":{"$ref":"#/components/schemas/AgentVersionDetail"},"pipeline_topology":{"type":"string","enum":["three_stage","two_stage_speechlm"],"description":"Topology of the effective version selected in strict production→staging→draft precedence. Omitted only when none of those pointers resolves to a version. Reported label derived from pipeline_mode: cascaded (STT → brain → TTS) reads three_stage, speech_model reads two_stage_speechlm; a legacy version stored on the three-stage engine also reads three_stage. It is not the runtime engine selector (every v2 version, cascaded included, runs the v2 turn engine), and writing three_stage back to a cascaded draft is a no-op."},"mode":{"type":"string","enum":["prompt","empty"],"description":"Content mode of the same effective production→staging→draft version used for pipeline_topology. prompt means prompt is present, and empty means no effective runnable content/version exists. This is deployment-effective state, not necessarily the newest draft's mode."},"created_at":{"type":"string","format":"date-time"},"archived_at":{"type":"string","format":"date-time"},"staging_version_id":{"type":"string","format":"uuid"},"draft_version_id":{"type":"string","format":"uuid"},"staging_version":{"$ref":"#/components/schemas/AgentVersionDetail"},"draft_version":{"$ref":"#/components/schemas/AgentVersionDetail"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/AgentVersionSummary"},"maxItems":200,"description":"At most 200 compact immutable snapshots, ordered by created_at descending and then UUID id descending. Drafts are excluded. Use /agents/{id}/versions to traverse the complete history with the same ordering."},"three_stage_allowed":{"type":"boolean","description":"Point-in-time deployment capability. True means new draft authoring and lifecycle activation may select three_stage, subject to provider-specific compatibility. False means clients must author two_stage_speechlm; an old immutable three-stage snapshot remains readable but cannot be activated."},"all_stt_models_allowed":{"type":"boolean","description":"Point-in-time deployment capability. True means agent authoring may select any enabled compatible STT catalog model; false means the server applies its curated STT allowlist. This flag is not an entitlement and can change between reads, so lifecycle operations always revalidate it."}},"required":["id","slug","name","revision","updated_at","mode","created_at","versions","three_stage_allowed","all_stt_models_allowed"]},"AgentDraftSaveRequest":{"type":"object","additionalProperties":false,"description":"Merge-style patch of the one mutable draft. Omitted fields are preserved.","properties":{"prompt":{"allOf":[{"$ref":"#/components/schemas/AgentPromptTemplate"}],"minLength":1,"description":"Non-blank prompt template. Omit it to preserve current content; null is invalid and an empty string cannot erase runnable content."},"pipeline_topology":{"type":"string","enum":["three_stage","two_stage_speechlm"],"description":"Legacy engine selector; prefer pipeline_mode, which overrides it when both are sent. three_stage is accepted only when the deployment capability enables it, except that three_stage sent for a draft whose pipeline_mode is cascaded is the reported label being echoed back and is ignored. Most realtime STT integrations require two_stage_speechlm; the server validates the selected model's published capabilities."},"pipeline_mode":{"type":"string","enum":["speech_model","cascaded"],"description":"Source-of-truth runtime pipeline selector. speech_model feeds the brain raw caller audio; cascaded feeds a realtime STT transcript to a text brain then TTS. Both modes run on the v2 turn engine, so the stored engine selector stays two_stage_speechlm; reads report pipeline_topology three_stage for cascaded and two_stage_speechlm for speech_model. Omit to preserve the current value."},"endpointing_mode":{"type":"string","enum":["auto","stt","audio"],"description":"Legacy version-level turn endpointing selector; prefer behavior.turn_taking.endpointing_mode. auto uses the engine's default endpointing; stt uses STT-driven turn endpointing, which takes effect only on a cascaded pipeline with a transcriber whose stt_capabilities.endpointing in GET /providers reports capable and reliable; otherwise it falls back to auto at runtime rather than being rejected. Ignored when the same request supplies behavior: the value is then derived from behavior.turn_taking.endpointing_mode (absent means auto). Omit to preserve the current value. `audio` always uses the agent's own audio endpointer; `auto` lets Kejue pick (on the self-hosted speech recognizer that is the recognizer's own turn detection)."},"stt_language":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9_-]*$"},"stt_language_hints":{"type":"array","description":"Languages the caller is expected to speak, for transcribers whose auto-detection takes a hint list (providers with `stt_capabilities.language_hints: true` in GET /providers). Each entry is a 2–3 letter language code with an optional two-letter region, such as `ar`, `en`, or `pt-br`; the server trims, lower-cases, and de-duplicates the list and drops blank entries, and at most 10 distinct codes may remain (code too_many). Every code must be in the selected provider's `stt_capabilities.languages` catalog. Send an empty array to clear; omit to preserve. Setting a non-empty list on a transcriber without the capability is rejected with code incompatible_model; a stored list survives an STT switch and is simply not forwarded.","items":{"type":"string"}},"stt_vocabulary":{"type":["object","null"],"description":"Per-agent recognition vocabulary: custom terms, free-text context notes, key/value hints, and spoken-to-written translations the recognizer should favor. Accepted when the selected transcriber advertises `stt_capabilities.vocabulary: true` in GET /providers (already resolved for the selected model). Send null or an empty object to clear; omit to preserve. Rejected with code incompatible_model otherwise.","additionalProperties":false,"properties":{"terms":{"type":"array","maxItems":1000,"items":{"type":"string","maxLength":200}},"notes":{"type":"string","maxLength":4000},"hints":{"type":"array","maxItems":200,"items":{"type":"object","additionalProperties":false,"required":["key","value"],"properties":{"key":{"type":"string","maxLength":200},"value":{"type":"string","maxLength":500}}}},"translations":{"type":"array","maxItems":1000,"items":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"from":{"type":"string","maxLength":200},"to":{"type":"string","maxLength":200}}}}}},"behavior":{"$ref":"#/components/schemas/AgentBehavior"},"llm_provider_model_id":{"$ref":"#/components/schemas/NullableAgentReferenceInput"},"stt_provider_model_id":{"$ref":"#/components/schemas/NullableAgentReferenceInput"},"tts_provider_model_id":{"$ref":"#/components/schemas/NullableAgentReferenceInput"},"tts_voice_id":{"$ref":"#/components/schemas/NullableAgentReferenceInput","description":"Enabled voice belonging to the selected TTS provider, or an empty string to clear it. Aria, ElevenLabs-compatible, and Fish Speech integrations require a voice and reject a resulting draft without one. If this or tts_provider_model_id changes while tts_voice_settings is omitted, the server clears the previous provider-specific override instead of carrying potentially incompatible settings into the new selection. Resend explicit settings to retain them."},"speechlm_provider_model_id":{"$ref":"#/components/schemas/NullableAgentReferenceInput"},"tts_voice_settings":{"$ref":"#/components/schemas/AgentProviderVoiceSettingsInput"}}},"AgentProviderVoiceSettingsInput":{"type":"object","additionalProperties":false,"description":"Writable provider-specific override layered over the selected voice's catalog settings. The selected connector permits only its advertised subset and can impose narrower ranges; inspect voice_settings_schema in GET /providers before authoring. Send {} to clear every per-agent override. Dialect is intentionally absent because it belongs to the selected voice catalog entry.","properties":{"speed":{"type":"number","minimum":0.5,"maximum":2},"volume":{"type":"number","minimum":-20,"maximum":20},"temperature":{"type":"number","minimum":0,"maximum":1},"top_p":{"type":"number","minimum":0,"maximum":1},"stability":{"type":"number","minimum":0,"maximum":1},"expressiveness":{"type":"number","minimum":0,"maximum":1,"description":"Intonation variation (Bland). Higher is more varied; lower is flatter. Provider default 0.6."},"model":{"type":"string","deprecated":true,"description":"Legacy operator-only synthesis setting. Select a catalog model by its platform UUID for new configurations."},"similarity_boost":{"type":"number","minimum":0,"maximum":1},"style":{"type":"number","minimum":0,"maximum":1},"use_speaker_boost":{"type":"boolean"},"normalize_text":{"type":"boolean","description":"Ask the provider to normalize numbers, dates and dialect spellings before synthesis (OpenAI-compatible TTS such as Sawtak)."}}},"AgentProviderVoiceSettings":{"type":"object","additionalProperties":false,"description":"Provider-specific override layered over the selected voice's catalog settings. This closed object is the union of every currently public setting key. The selected connector permits only its subset and can impose narrower ranges; inspect voice_settings_schema plus the selected voice's settings in GET /providers before authoring. Send {} to clear every per-agent override.","properties":{"speed":{"type":"number","minimum":0.5,"maximum":2,"description":"Playback-speed multiplier. Provider discovery supplies the selected connector's narrower range and default."},"volume":{"type":"number","minimum":-20,"maximum":20,"description":"Output-gain control. Aria narrows this to a 0.25–2 multiplier; Fish Speech uses a -20..20 dB offset. Provider discovery supplies the selected connector's range and semantics."},"temperature":{"type":"number","minimum":0,"maximum":1,"description":"Sampling temperature. Aria expressive providers narrow the minimum to 0.8; Fish Speech permits the complete range."},"top_p":{"type":"number","minimum":0,"maximum":1,"description":"Nucleus-sampling diversity (Fish Speech)."},"stability":{"type":"number","minimum":0,"maximum":1,"description":"Voice stability. Aria expressive providers narrow the minimum to 0.8; ElevenLabs-compatible providers permit the complete range."},"dialect":{"type":"string","readOnly":true,"deprecated":true,"enum":["jordanian","saudi","hejazi","najdi","iraqi","palestinian","emirati","hindi_english"],"description":"Legacy stored per-agent dialect override. New writes reject this field: choose a voice with the required catalog dialect instead. It remains in responses so agents created before the catalog-driven workflow can be read and migrated safely."},"expressiveness":{"type":"number","minimum":0,"maximum":1,"description":"Intonation variation (Bland). Higher is more varied; lower is flatter."},"similarity_boost":{"type":"number","minimum":0,"maximum":1},"style":{"type":"number","minimum":0,"maximum":1},"use_speaker_boost":{"type":"boolean"},"normalize_text":{"type":"boolean","description":"Ask the provider to normalize numbers, dates and dialect spellings before synthesis (OpenAI-compatible TTS such as Sawtak)."}}},"AgentBehavior":{"type":"object","additionalProperties":false,"description":"Complete version-scoped behavior document. Supplying behavior replaces the previous behavior document on the mutable draft; omitted behavior leaves it unchanged. Omitted blocks and fields use the runtime defaults documented on their schemas. New writes use only this canonical shape; supported legacy inactivity and transfer rows are normalized before public responses are emitted.","properties":{"temperature":{"type":["number","null"],"minimum":0,"maximum":2,"description":"Agent-level sampling temperature. Null or omission inherits the engine default."},"silence_timeout_seconds":{"type":"number","minimum":0,"description":"End the call after this many seconds without agent speech while a caller is present (a stuck pipeline guard). 0 disables it. Omitted inherits the deployment default (300 seconds unless the deployment overrides it)."},"max_call_duration_seconds":{"type":"number","minimum":0,"description":"Hang up once the call has been answered for this many seconds. 0 means uncapped for this agent. Omitted inherits the workspace's call-duration cap when one is set, otherwise the product default of 600 seconds."},"wait_instruction":{"type":"string","description":"Promptable endpointing. Freeform instruction that teaches the agent when to keep listening instead of answering: tell it to reply with the bare tag <WAIT/> when the caller clearly has not finished (for example while a number is dictated group by group). The caller never hears the tag — the agent simply holds the turn and answers once the caller is done. A non-empty value enables the mechanism for this agent and overrides the deployment default instruction."},"wait_rearm_ms":{"type":"integer","minimum":1000,"maximum":30000,"description":"How long a held turn may stay silent (milliseconds) before the agent stops waiting and answers anyway. Omitted inherits the deployment default (5000)."},"opening":{"$ref":"#/components/schemas/AgentBehaviorOpening"},"connection":{"$ref":"#/components/schemas/AgentBehaviorConnection"},"recording":{"$ref":"#/components/schemas/AgentBehaviorRecording"},"background_noise":{"$ref":"#/components/schemas/AgentBehaviorBackgroundNoise"},"inactivity":{"$ref":"#/components/schemas/AgentBehaviorInactivity"},"guardrails":{"$ref":"#/components/schemas/AgentGuardrailAssignments"},"pronunciation":{"$ref":"#/components/schemas/AgentPronunciationAssignments"},"tools":{"$ref":"#/components/schemas/AgentToolAssignments"},"system_tools":{"$ref":"#/components/schemas/AgentBehaviorSystemTools"},"dtmf":{"$ref":"#/components/schemas/AgentBehaviorDTMF"},"turn_taking":{"$ref":"#/components/schemas/AgentBehaviorTurnTaking"},"memory":{"$ref":"#/components/schemas/AgentBehaviorMemory"},"gender_detection":{"$ref":"#/components/schemas/AgentBehaviorGenderDetection"},"resume":{"$ref":"#/components/schemas/AgentBehaviorResume"}}},"AgentBehaviorOpening":{"type":"object","additionalProperties":false,"description":"Opening behavior. Pathway agents normally drive first speech from their start node; prompt agents use this block directly.","properties":{"first_speaker":{"type":"string","enum":["agent","caller"],"default":"agent","description":"Caller suppresses proactive first speech until the caller talks."},"greeting":{"$ref":"#/components/schemas/AgentBehaviorGreeting"}}},"AgentBehaviorGreeting":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["generate","fixed"],"default":"generate"},"text":{"type":"string","description":"Fixed-mode opening line, spoken verbatim and literal (it is synthesized ahead of the call, so it cannot vary per call). Unlike `instructions`, which accepts templates, `text` rejects them — a {{ or }} here returns validation_failed/templates_not_allowed. To greet by name, use generate mode with instructions."},"instructions":{"type":"string","description":"Accepts templates. Generate-mode guidance for the opening line, rendered per call before the line is generated. It follows the AgentPromptTemplate expression contract: bare aliases ({{lead_name}}), {{vars.NAME}}, {{system.NAME}} and {{tools.SLUG}} / {{tools.SLUG.NAME}} from pre-call tools resolve; missing values render as the empty string. {{slots.NAME}} is rejected (there is no pathway state at first speech), params and secrets are rejected, unknown scopes are rejected, and malformed or unmatched delimiters return 422 validation_failed. Prompt agents only — a pathway's start node owns first speech."},"allow_interruptions":{"type":"boolean","default":true},"delay_seconds":{"type":"number","minimum":0,"default":0,"description":"Delay before first speech; caller speech during the delay can suppress the greeting."}}},"AgentBehaviorConnection":{"type":"object","additionalProperties":false,"properties":{"wait_for_participant_timeout_seconds":{"type":"number","minimum":0,"default":60,"description":"Seconds to wait for a remote participant. Zero disables the timeout."}}},"AgentBehaviorRecording":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Explicit per-agent override. Omission follows deployment policy."}}},"AgentBehaviorBackgroundNoise":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","default":false},"sound":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","maxLength":64,"default":"office","description":"Key of the ambience loop. Either one of the bundled clips (office, keyboard, keyboard-soft, city, forest, crowded-room) or the key of a background noise uploaded to the library by the platform operator and made available to this workspace; GET /v1/background-noises lists every key the workspace may use. Saving a key the workspace cannot use fails validation with reference_not_found."},"volume":{"type":"number","minimum":0,"maximum":1,"description":"Linear gain applied to the ambience track."}}},"AgentBehaviorInactivity":{"type":"object","additionalProperties":false,"description":"Ordered caller-silence script. An absent or empty messages array is disabled; there is no separate enable flag.","properties":{"messages":{"type":"array","maxItems":100,"default":[],"items":{"$ref":"#/components/schemas/AgentBehaviorInactivityStep"}}}},"AgentBehaviorInactivityStep":{"type":"object","additionalProperties":false,"properties":{"silence_seconds":{"type":"number","minimum":1,"default":15,"description":"Caller silence since the prior caller activity or prior step."},"message":{"$ref":"#/components/schemas/AgentBehaviorInactivitySpeech"},"action":{"type":"string","enum":["none","soft_hangup","hard_hangup"],"default":"none","description":"Soft hangup is cancelled by caller barge-in; hard hangup is not."}}},"AgentBehaviorInactivitySpeech":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["empty","fixed"],"default":"empty"},"text":{"type":"string","description":"Literal line for fixed mode. Runtime template expansion is not applied; either template delimiter is rejected."}}},"AgentGuardrailAssignments":{"type":"object","additionalProperties":false,"properties":{"guardrail_set_ids":{"type":"array","maxItems":50,"uniqueItems":true,"default":[],"description":"Ordered active guardrail-set UUIDs in this workspace. Missing, archived, and cross-workspace references return 422.","items":{"type":"string","format":"uuid"}}}},"AgentPronunciationAssignments":{"type":"object","additionalProperties":false,"properties":{"table_ids":{"type":"array","maxItems":50,"uniqueItems":true,"default":[],"description":"Ordered active pronunciation-table UUIDs. Table order controls precedence for overlapping substitutions. Missing, archived, and cross-workspace references return 422.","items":{"type":"string","format":"uuid"}}}},"AgentToolAssignments":{"type":"object","additionalProperties":false,"properties":{"tool_ids":{"type":"array","maxItems":50,"uniqueItems":true,"default":[],"description":"Ordered active HTTP-tool UUIDs in this workspace. Missing, archived, and cross-workspace references return 422.","items":{"type":"string","format":"uuid"}},"pre_call":{"type":"array","maxItems":10,"default":[],"description":"Tools that run once, concurrently, before the agent speaks. Every referenced tool must have `phase: pre_call`. Their responses become the {{tools.SLUG.NAME}} template scope, usable in the prompt, the greeting, and other tools' templates. Each tool runs under its own `timeout_ms` (times its retry attempts); a tool that overruns that deadline is abandoned and treated as a failure. On outbound this time elapses while the line rings; on inbound the caller hears it as silence, so keep each tool's timeout tight. Missing, archived, cross-workspace, duplicated, and wrong-phase references return 422.","items":{"$ref":"#/components/schemas/ToolPreCallAttachment"}},"pre_call_timeout_ms":{"type":"integer","deprecated":true,"description":"Deprecated and ignored. Pre-call deadlines are governed by each tool's own `timeout_ms`; there is no batch-level cap. The field is still accepted for backward compatibility but is discarded on save and never returned."},"mcp_server_ids":{"type":"array","maxItems":50,"uniqueItems":true,"default":[],"description":"Ordered active MCP-server UUIDs in this workspace. Missing, archived, cross-workspace, non-introspected, hash-unenforced, malformed, and aggregate-over-budget approved catalogs return indexed 422 errors.","items":{"type":"string","format":"uuid"}},"carry_across_calls":{"type":"object","default":{},"description":"Per-attachment override of each tool's carry_across_calls flag, keyed by tool UUID. Keys must appear in tool_ids; unknown keys return 422. A tool without an entry uses its own flag. Controls whether the tool's latest successful result from a recent call is replayed into context when this agent resumes a dropped call.","additionalProperties":{"type":"boolean"}}}},"AgentBehaviorSystemTools":{"type":"object","additionalProperties":false,"description":"Built-in tools materialized by the call runtime. Each transfer array is limited to 50 entries. Labels are converted into tool-name suffixes and must remain unique after that conversion.","properties":{"resolve_date":{"$ref":"#/components/schemas/AgentBehaviorResolveDate"},"transfer_warm":{"type":"array","maxItems":50,"default":[],"items":{"$ref":"#/components/schemas/AgentBehaviorWarmTransfer"}},"transfer_cold":{"type":"array","maxItems":50,"default":[],"items":{"$ref":"#/components/schemas/AgentBehaviorColdTransfer"}},"transfer_agent":{"type":"array","maxItems":50,"default":[],"items":{"$ref":"#/components/schemas/AgentBehaviorAgentTransfer"}},"schedule_call":{"type":"array","maxItems":50,"default":[],"items":{"$ref":"#/components/schemas/AgentBehaviorScheduleCall"}},"wait":{"type":"array","maxItems":50,"default":[],"items":{"$ref":"#/components/schemas/AgentBehaviorWait"}},"end_call":{"$ref":"#/components/schemas/AgentBehaviorEndCall"}}},"AgentBehaviorWarmTransfer":{"type":"object","additionalProperties":false,"properties":{"label":{"type":"string","description":"Optional human label used to derive the runtime tool name."},"destination":{"type":"string","minLength":1,"description":"Operator-controlled phone number or SIP URI. Supports {{system.*}}, {{vars.*}}, {{slots.*}} and {{params.*}} templates, rendered per call from context the model cannot author. Required when destination_mode is static; rejected when it is dynamic."},"destination_mode":{"type":"string","enum":["static","dynamic"],"default":"static","description":"Who chooses the destination. static keeps it operator-controlled (a literal or a template). dynamic lets the assistant supply the number at call time and requires trunk_id, whose outbound allowlist bounds where it may dial; a dynamic entry on a trunk with no allowlist is rejected with dynamic_destination_requires_allowlist."},"trunk_id":{"$ref":"#/components/schemas/NullableEmptyAgentUUID"},"method":{"type":"string","const":"bridge","default":"bridge","description":"Warm transfers support bridge only."},"announcement":{"type":"string","description":"Stored for compatibility but ignored by the behavior-tool runtime; the calling model must provide a call-specific summary for warm transfer. Template delimiters are rejected."},"briefing_language":{"type":"string","maxLength":200,"description":"Language and dialect the briefing AI uses for the whole briefing call to the human, e.g. \"Arabic (Jordanian dialect)\". Empty or absent means English. It never switches, whatever language the human answers in. Supports {{system.*}}, {{vars.*}}, {{slots.*}} and {{params.*}} templates rendered at transfer time. Warm entries only."},"include_transcript":{"type":"boolean","default":true,"description":"Whether the briefing AI's prompt carries the caller's full prior conversation alongside the model's call-specific summary. true (the default) briefs with summary plus full transcript; false briefs with the summary only, so the recipient never sees verbatim caller turns. Warm entries only."},"briefing_prompt":{"type":"string","maxLength":20000,"description":"Optional instructions for the briefing AI, i.e. what to tell or ask the transfer recipient, what to stress, and how to answer their questions. Used only on the briefing call to the recipient; the caller never hears it. It is added under the platform's built-in briefing rules (speak only to the recipient, keep messages short, end by connecting, declining, or reporting voicemail) and cannot override them. Rendered at transfer time with the same template syntax as the agent prompt (unscoped {{name}} call variables, {{vars.*}}, {{system.*}}, {{tools.*}} pre-call results, {{slots.*}}) plus briefing-only variables {{transfer.summary}} (the summary the agent passed when it started the transfer), {{transfer.label}}, {{transfer.destination}}, {{transfer.language}}, {{call.transcript}} (the conversation so far), {{call.last_caller_message}}, {{call.duration}} (e.g. \"3 minutes 12 seconds\") and {{call.duration_seconds}}. {{call.transcript}} and {{call.last_caller_message}} are empty when include_transcript is false. Missing values render as empty text; {{secrets.*}}, {{params.*}}, and unknown transfer/call names are rejected. Empty or absent keeps the default briefing. Warm entries only."}}},"AgentBehaviorColdTransfer":{"type":"object","additionalProperties":false,"properties":{"label":{"type":"string","description":"Optional human label used to derive the runtime tool name."},"destination":{"type":"string","minLength":1,"description":"Operator-controlled phone number or SIP URI. Supports {{system.*}}, {{vars.*}}, {{slots.*}} and {{params.*}} templates, rendered per call from context the model cannot author. Required when destination_mode is static; rejected when it is dynamic."},"destination_mode":{"type":"string","enum":["static","dynamic"],"default":"static","description":"Who chooses the destination. static keeps it operator-controlled (a literal or a template). dynamic lets the assistant supply the number at call time and requires trunk_id, whose outbound allowlist bounds where it may dial; a dynamic entry on a trunk with no allowlist is rejected with dynamic_destination_requires_allowlist."},"trunk_id":{"$ref":"#/components/schemas/NullableEmptyAgentUUID"},"method":{"type":"string","enum":["refer","bridge"],"default":"refer"},"announcement":{"type":"string","description":"Literal context retained on the transfer record. The current behavior-tool runtime does not automatically speak it and does not expand prompt variables. Template delimiters are rejected."}}},"AgentBehaviorAgentTransfer":{"type":"object","additionalProperties":false,"properties":{"label":{"type":"string","description":"Optional human label used to derive the runtime tool name."},"target":{"type":"string","minLength":2,"maxLength":48,"pattern":"^[a-z0-9_]{2,48}$","description":"Active target agent slug in this workspace. Required when target_mode is static; rejected when it is choice."},"target_mode":{"type":"string","enum":["static","choice"],"default":"static","description":"Who chooses the receiving agent. static always hands off to target. choice lets the assistant pick, but only from allowed_targets — those slugs become an enum on the generated tool, so an unlisted agent cannot be named."},"allowed_targets":{"type":"array","maxItems":50,"default":[],"description":"Agent slugs the assistant may choose between. Required and non-empty when target_mode is choice; every slug must reference an active agent in this workspace.","items":{"type":"string","minLength":2,"maxLength":48,"pattern":"^[a-z0-9_]{2,48}$"}},"announcement":{"type":"string","description":"Stored for compatibility but ignored by the behavior-tool runtime; the calling model must provide a call-specific handoff summary. Template delimiters are rejected."}}},"AgentBehaviorScheduleCall":{"type":"object","additionalProperties":false,"description":"Books a call for a LATER time as a durable outbound job rather than dialing immediately, and does not end the current call. The requested time is resolved in the contact's timezone and snapped into the organization's outbound contact-hours window, so the booked instant may differ from the one requested; the runtime reports the booked time back to the model. Two independent axes — who places the call (agent_mode) and who is called (destination_mode) — each with a mode-dependent required field.","properties":{"label":{"type":"string","description":"Optional human label used to derive the runtime tool name."},"agent_mode":{"type":"string","enum":["self","fixed","choice"],"default":"self","description":"Who places the scheduled call. self reuses the agent handling the current call (a plain callback). fixed always uses agent_target. choice lets the assistant pick from allowed_agents, which become an enum on the generated tool."},"agent_target":{"type":"string","minLength":2,"maxLength":48,"pattern":"^[a-z0-9_]{2,48}$","description":"Agent slug that will place the call. Required when agent_mode is fixed; must reference an active agent in this workspace."},"allowed_agents":{"type":"array","maxItems":50,"default":[],"description":"Agent slugs the assistant may choose between. Required and non-empty when agent_mode is choice; every slug must reference an active agent in this workspace.","items":{"type":"string","minLength":2,"maxLength":48,"pattern":"^[a-z0-9_]{2,48}$"}},"destination_mode":{"type":"string","enum":["caller","static","dynamic"],"default":"caller","description":"Who is called. caller uses the number of the party on the current call, resolved server-side so the model never supplies it. static uses destination. dynamic lets the assistant supply the number and requires trunk_id, whose outbound allowlist bounds where it may dial; a dynamic entry on a trunk with no allowlist is rejected with dynamic_destination_requires_allowlist."},"destination":{"type":"string","minLength":1,"description":"Number to call. Required when destination_mode is static. Supports {{system.*}}, {{vars.*}}, {{slots.*}} and {{params.*}} templates, rendered per call from context the model cannot author."},"trunk_id":{"$ref":"#/components/schemas/NullableEmptyAgentUUID"},"number_pool_id":{"$ref":"#/components/schemas/NullableEmptyAgentUUID"},"max_attempts":{"type":"integer","minimum":0,"default":0,"description":"Retry attempts for the scheduled call. 0 inherits the organization's outbound policy."},"priority":{"type":"integer","default":0,"description":"Higher values are dialed first when several scheduled calls come due together."},"carry_context":{"type":"boolean","default":true,"description":"Pass the call's collected values plus an assistant-written summary into the scheduled job's variables, so whoever places the call retains the context this conversation gathered. When true the generated tool requires a summary argument."},"when_mode":{"type":"string","enum":["agent","now","relative","absolute"],"default":"agent","description":"When the call happens. agent is the only mode that puts a `when` argument on the generated tool — the assistant resolves a spoken time into an absolute one. now books as soon as the outbound window allows, relative books call-time plus when_offset_minutes, and absolute books a fixed instant. In every mode except agent the assistant cannot influence the time at all."},"when_at":{"type":"string","description":"Naive ISO-8601 date and time (YYYY-MM-DDTHH:MM:SS), read in the resolved timezone. Required when when_mode is absolute and must be in the future; a fixed instant that has passed is rejected on save and refused at call time rather than dialed immediately."},"when_offset_minutes":{"type":"integer","minimum":1,"description":"Minutes after the moment the assistant books it. Required (and at least 1) when when_mode is relative — 7205 is five days and five minutes. Zero would mean now, which is what when_mode now is for."},"timezone_mode":{"type":"string","enum":["organization","custom","agent"],"default":"organization","description":"Which timezone the time is read in. organization uses the workspace default, custom uses timezone below, and agent lets the assistant supply one — which is only accepted together with when_mode agent, since it cannot name a zone for a time it does not choose."},"timezone":{"type":"string","minLength":1,"description":"IANA timezone name, e.g. Asia/Dubai. Required when timezone_mode is custom."}}},"AgentBehaviorWait":{"type":"object","additionalProperties":false,"description":"The wait built-in. When the caller asks for a moment (\"give me a few seconds, I'm logging in\"), the agent calls the tool and stays silent. The waited seconds do not count toward the inactivity messages or the silence timeout. The wait is always interruptible: the caller can speak at any time and is answered normally, which ends the wait. Each entry becomes one tool, named wait for a single unlabelled entry and wait__<label> otherwise. Its result does not trigger another reply.","properties":{"label":{"type":"string","description":"Optional human label used to derive the runtime tool name."},"duration_mode":{"type":"string","enum":["agent","fixed"],"default":"agent","description":"Who decides how long to wait. agent gives the tool a seconds argument (1-120) that the assistant chooses per call. fixed uses the seconds below, and the tool takes no arguments."},"seconds":{"type":"integer","minimum":1,"maximum":120,"description":"How long to wait, in seconds. Required when duration_mode is fixed."},"on_timeout":{"type":"string","enum":["none","say","prompt"],"default":"none","description":"What happens when the wait runs out and the caller is still quiet. none says nothing, and the inactivity messages start counting from zero. say speaks message verbatim. prompt hands message to the assistant as an instruction, and the assistant writes the line. After either line the inactivity messages count as usual."},"message":{"type":"string","minLength":1,"description":"The line (on_timeout say) or the instruction (on_timeout prompt). Required for both. A say line supports {{system.*}}, {{vars.*}} and {{slots.*}} templates, rendered per call. A prompt is plain prose, and template delimiters are rejected."}}},"AgentBehaviorEndCall":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","default":false},"type":{"type":"string","enum":["soft","hard"],"default":"soft","description":"Soft lets caller barge-in cancel the farewell and hangup; hard always completes the hangup."},"farewell":{"type":"string","description":"Optional literal TTS farewell. Runtime template expansion is not applied and template delimiters are rejected."}}},"AgentBehaviorDTMF":{"type":"object","additionalProperties":false,"description":"Caller keypad (DTMF) settings. collect_enabled turns on free-flow keypad collection for the whole call: the caller may press digits at any moment and the runtime turns them into a caller turn — after collection.inter_digit_timeout_ms of silence since the last keypress, or immediately on the terminator. Spoken input always wins: a caller who speaks while digits are pending hands the turn to normal endpointing and the digits ride that turn's history. The model sees each entry as a caller turn prefixed with \"[Keypad]\" (for example \"[Keypad] 1234\"). Pathway wait nodes use their own configuration. The former collect_dtmf tool and its collect_defaults block are retired; sending collect_defaults returns 422 (unknown).","properties":{"collect_enabled":{"type":"boolean","default":false,"description":"Free-flow keypad collection for the whole call."},"collection":{"$ref":"#/components/schemas/AgentBehaviorDTMFCollection"},"send_enabled":{"type":"boolean","default":false,"description":"Expose the send_dtmf_events tool (the agent presses keys on the line)."}}},"AgentBehaviorDTMFCollection":{"type":"object","additionalProperties":false,"properties":{"inter_digit_timeout_ms":{"type":"integer","minimum":100,"maximum":30000,"default":2000,"description":"Silence after the caller's last keypress before the pending digits commit as a caller turn."},"terminator":{"type":"string","enum":["#","*",""],"default":"#","description":"Pressing it commits the pending digits immediately; it is never part of the digits. Empty string disables the terminator."},"interrupt_on_digit":{"type":"boolean","default":false,"description":"Whether a keypress cuts the agent's in-flight reply (classic IVR type-ahead). false (default) = digits are buffered while the agent speaks and commit once it stops."}}},"AgentBehaviorTurnTaking":{"type":"object","additionalProperties":false,"description":"Millisecond-authored VAD and turn-taking overrides. endpointing_delay_ms must not exceed turn_endpoint_delay_ms. Adaptive interruption is available only with two_stage_speechlm.","properties":{"turn_endpoint_delay_ms":{"type":"integer","minimum":0,"default":500},"min_turn_duration_ms":{"type":"integer","minimum":0,"default":50},"min_interruption_ms":{"type":"integer","minimum":0,"default":90},"adaptive_interruption":{"type":"boolean","default":true},"endpointing_delay_ms":{"type":"integer","minimum":0,"default":330},"frame_activation":{"type":"number","minimum":0,"maximum":1,"default":0.35},"endpointing_mode":{"type":"string","enum":["auto","stt","audio"],"default":"auto","description":"Turn endpointing authority. auto uses the engine's audio endpointer; stt lets the speech recognizer's native endpoint end the caller's turn. stt takes effect only on a cascaded pipeline with a transcriber whose stt_capabilities.endpointing in GET /providers reports capable and reliable; on any other combination the runtime falls back to auto rather than failing. Writing it here also updates the version's top-level endpointing_mode. `audio` always uses the agent's own audio endpointer; `auto` lets Kejue pick (on the self-hosted speech recognizer that is the recognizer's own turn detection)."}}},"AgentBehaviorMemory":{"type":"object","additionalProperties":false,"properties":{"inject_enabled":{"type":"boolean","default":false,"description":"Inject the matched contact's saved memory into the call."},"write_enabled":{"type":"boolean","default":false,"description":"Extract and reconcile contact memory after the call."}}},"AgentBehaviorGenderDetection":{"type":"object","additionalProperties":false,"properties":{"enabled":{"type":"boolean","default":false,"description":"Sensitive voice-derived attribute; supported only by two_stage_speechlm."}}},"AgentBehaviorResume":{"type":"object","additionalProperties":false,"description":"Continue a previous call instead of greeting from scratch. When the same caller number reaches this agent again — inbound or outbound — within window_minutes of their last call with it ending, the runtime loads that call's redacted transcript as context and opens by continuing the conversation. The resumed opening overrides opening.first_speaker and any fixed greeting for that call only: the agent always speaks first and always generates the line. Calls with no caller number (web and test calls) and calls whose previous transcript was purged never resume.","properties":{"enabled":{"type":"boolean","default":false,"description":"Turn continue-previous-call on for this agent."},"window_minutes":{"type":"integer","minimum":1,"maximum":120,"default":30,"description":"How long after a call ends a call-back still counts as the same conversation. Measured from the previous call's end. Consecutive drops chain — each link is checked against this same window — up to three prior calls, and the replayed transcript is capped so a long history cannot crowd out the agent's own prompt."}}},"NullableEmptyAgentUUID":{"description":"UUID value, or an empty string to select the deployment/runtime default.","oneOf":[{"type":"string","format":"uuid"},{"type":"string","const":""}]},"NullableAgentReferenceInput":{"description":"UUID of an enabled compatible catalog resource, or an empty string to clear the optional reference.","oneOf":[{"type":"string","format":"uuid"},{"type":"string","const":""}]},"AgentDraftSaveResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"updated":{"type":"boolean","description":"False only when the patch was a semantic no-op."},"revision":{"type":"integer","format":"int64","minimum":1},"updated_at":{"type":"string","format":"date-time","description":"Aggregate update timestamp corresponding to revision."},"draft":{"$ref":"#/components/schemas/AgentVersionDetail"}},"required":["id","agent_id","updated","revision","updated_at","draft"]},"AgentListItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","format":"int64","minimum":1,"description":"Current persisted aggregate revision. Use the ETag returned by detail/mutation operations rather than deriving a conditional tag from this number; the tag also includes an opaque representation-version component and deployment capability bits."},"updated_at":{"type":"string","format":"date-time","description":"Last externally visible aggregate change; semantic no-ops preserve it."},"production_version_id":{"type":"string","format":"uuid"},"production_version_number":{"type":"integer","minimum":1,"description":"Immutable version number currently deployed to production. Omitted unless production_version_id is present."},"staging_version_id":{"type":"string","format":"uuid","description":"Version last promoted to staging; omitted when none is set."},"staging_version_number":{"type":"integer","minimum":1,"description":"Immutable version number currently on staging. Omitted unless staging_version_id is present."},"pipeline_topology":{"type":"string","enum":["three_stage","two_stage_speechlm"],"description":"Topology of the effective production→staging→draft version; omitted when no version pointer resolves. Reported label derived from pipeline_mode: cascaded (STT → brain → TTS) reads three_stage, speech_model reads two_stage_speechlm; a legacy version stored on the three-stage engine also reads three_stage. It is not the runtime engine selector (every v2 version, cascaded included, runs the v2 turn engine), and writing three_stage back to a cascaded draft is a no-op."},"mode":{"type":"string","enum":["prompt","empty"],"description":"Content mode of the effective production→staging→draft version. It reflects deployed precedence, so draft edits do not change this value while a production version exists."},"created_at":{"type":"string","format":"date-time"},"archived_at":{"type":"string","format":"date-time"}},"required":["id","slug","name","revision","updated_at","mode","created_at"]},"AgentListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"AgentPatchRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"]},"AgentPatchResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"updated":{"type":"boolean","description":"False when the trimmed name already matched."},"revision":{"type":"integer","format":"int64","minimum":1},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","updated","revision","updated_at"]},"AgentPromoteDraftRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","maxLength":120,"description":"Optional human-readable snapshot label. When present, the trimmed value must contain at least one non-whitespace character; an empty or whitespace-only value returns 422 invalid_body with a field error for name rather than being treated as omitted."}}},"AgentPromoteDraftResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid","description":"ID of the immutable snapshot created from the draft."},"agent_id":{"type":"string","format":"uuid"},"staging_version_id":{"type":"string","format":"uuid","description":"New staging pointer; equal to id for this operation."},"version":{"type":"integer","minimum":1},"revision":{"type":"integer","format":"int64","minimum":1},"updated_at":{"type":"string","format":"date-time","description":"Aggregate update timestamp corresponding to revision."}},"required":["id","agent_id","staging_version_id","version","revision","updated_at"]},"AgentPromoteStagingRequest":{"type":"object","additionalProperties":false,"properties":{"version_id":{"type":"string","format":"uuid"}},"required":["version_id"]},"AgentPromoteStagingResponse":{"type":"object","additionalProperties":false,"properties":{"agent_id":{"type":"string","format":"uuid"},"staging_version_id":{"type":"string","format":"uuid"},"updated":{"type":"boolean","description":"False when staging already referenced version_id."},"revision":{"type":"integer","format":"int64","minimum":1},"updated_at":{"type":"string","format":"date-time","description":"Aggregate update timestamp corresponding to revision."}},"required":["agent_id","staging_version_id","updated","revision","updated_at"]},"AgentVersionDetail":{"type":"object","additionalProperties":false,"description":"Full draft or immutable snapshot. Drafts have is_draft=true and omit version; immutable snapshots have is_draft=false and require their positive version number. prompt and workflow are mutually exclusive. Modern runnable rows have exactly one of them; neither is allowed only so a versionless or migrated legacy empty row remains readable and can be repaired through draft authoring.","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"integer","minimum":1},"is_draft":{"type":"boolean"},"name":{"type":"string","maxLength":120},"prompt":{"$ref":"#/components/schemas/AgentPromptTemplate"},"pipeline_topology":{"type":"string","enum":["three_stage","two_stage_speechlm"],"description":"Reported label derived from pipeline_mode: cascaded (STT → brain → TTS) reads three_stage, speech_model reads two_stage_speechlm; a legacy version stored on the three-stage engine also reads three_stage. It is not the runtime engine selector (every v2 version, cascaded included, runs the v2 turn engine), and writing three_stage back to a cascaded draft is a no-op."},"pipeline_mode":{"type":"string","enum":["speech_model","cascaded"],"description":"Source-of-truth runtime pipeline selector. speech_model feeds the brain raw caller audio; cascaded feeds a realtime STT transcript to a text brain then TTS. Both run on the v2 turn engine; pipeline_topology reports three_stage for cascaded and two_stage_speechlm for speech_model."},"endpointing_mode":{"type":"string","enum":["auto","stt","audio"],"description":"Turn endpointing selector. auto uses the engine's default endpointing; stt uses STT-driven turn endpointing, valid only for a cascaded pipeline on an endpoint-capable STT integration. `audio` always uses the agent's own audio endpointer; `auto` lets Kejue pick (on the self-hosted speech recognizer that is the recognizer's own turn detection)."},"stt_language":{"type":"string","maxLength":64,"description":"Explicit STT language hint projected from the legacy storage column. Omitted means provider auto-detection."},"stt_language_hints":{"type":"array","maxItems":10,"description":"Expected caller languages projected from storage (see the save-request field of the same name). Omitted when none is set.","items":{"type":"string"}},"stt_vocabulary":{"type":"object","description":"Per-agent recognition vocabulary projected from storage (see the save-request field of the same name). Omitted when none is set.","properties":{"terms":{"type":"array","items":{"type":"string"}},"notes":{"type":"string"},"hints":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"translations":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}}}}},"tts_voice_settings":{"$ref":"#/components/schemas/AgentProviderVoiceSettings"},"behavior":{"$ref":"#/components/schemas/AgentBehavior"},"configuration_errors":{"type":"array","minItems":1,"description":"Present only when a legacy or corrupted stored authored field could not be safely normalized. The unreadable top-level field is omitted from this response, and each entry reports its precise JSON path and validation failure so the draft can be repaired with PATCH /agents/{id}. Immutable snapshots are not mutated in place; repair them by correcting and promoting the agent draft. This property is absent for valid modern rows.","items":{"$ref":"#/components/schemas/FieldError"}},"llm_provider_model_id":{"type":"string","format":"uuid"},"stt_provider_model_id":{"type":"string","format":"uuid"},"tts_provider_model_id":{"type":"string","format":"uuid"},"tts_voice_id":{"type":"string","format":"uuid"},"speechlm_provider_model_id":{"type":"string","format":"uuid"},"created_by":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"}},"required":["id","is_draft","pipeline_topology","pipeline_mode","endpointing_mode","created_at"],"oneOf":[{"$ref":"#/components/schemas/AgentDraftVersionInvariant"},{"$ref":"#/components/schemas/AgentImmutableVersionInvariant"}],"not":{"required":["prompt","workflow"]}},"AgentDraftVersionInvariant":{"type":"object","description":"Draft discriminator branch for AgentVersionDetail.","properties":{"is_draft":{"type":"boolean","const":true}},"required":["is_draft"],"not":{"required":["version"]}},"AgentImmutableVersionInvariant":{"type":"object","description":"Immutable discriminator branch for AgentVersionDetail.","properties":{"is_draft":{"type":"boolean","const":false}},"required":["is_draft","version"]},"AgentVersionSummary":{"type":"object","additionalProperties":false,"description":"Compact immutable-version representation used in history lists. It omits the potentially large prompt, workflow, and behavior documents; fetch /agent-versions/{version_id} for the complete snapshot.","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"integer","minimum":1},"is_draft":{"type":"boolean","const":false},"name":{"type":"string","maxLength":120},"pipeline_topology":{"type":"string","enum":["three_stage","two_stage_speechlm"]},"created_by":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"}},"required":["id","version","is_draft","pipeline_topology","created_at"]},"AgentVersionGetResponse":{"type":"object","additionalProperties":false,"properties":{"agent_id":{"type":"string","format":"uuid"},"revision":{"type":"integer","format":"int64","minimum":1,"description":"Parent aggregate revision corresponding to the response ETag."},"version":{"$ref":"#/components/schemas/AgentVersionDetail"}},"required":["agent_id","revision","version"]},"AgentVersionListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentVersionSummary"}},"next_cursor":{"type":["string","null"],"description":"Opaque cursor for the next strictly older (created_at, id) tuple. Null means the traversal is complete. A non-null value is bound to this agent, endpoint, sort order, and query shape and must not be edited or reused on another list operation."}},"required":["data","next_cursor"]},"AnalysisSource":{"type":"string","enum":["call","extraction","guardrail","tool_call","contact"],"description":"Data family queried by one series. Call, extraction, guardrail, and tool_call queries are session-rooted and may be scoped with agent_ids. Contact queries are contact-rooted and reject agent_ids."},"AnalysisOperation":{"type":"string","enum":["count","sum","avg","min","max"],"description":"Aggregation applied to the selected column. Read /analysis/schema for the operations supported by each column."},"AnalysisFilterOperator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","contains","starts_with","ends_with","is_null","not_null"]},"AnalysisColumnType":{"type":"string","enum":["string","enum","uuid","integer","number","boolean","array"]},"AnalysisChartType":{"type":"string","description":"How the insight renders. Several types constrain the query shape and are rejected at write time when the config cannot draw them: pie and donut need a categorical group_by; scatter needs exactly two queries; heatmap needs a secondary group-by; number and number_delta need group_by=none; area_percent needs at least two series. The machine readable form of these rules is constraints.chart_rules on GET /v1/analysis/schema.","enum":["bar","line","area","area_percent","pie","donut","scatter","heatmap","table","number","number_delta"]},"AnalysisTimeRange":{"type":"string","description":"The window the insight reads. custom takes its bounds from config.range_from and config.range_to.","enum":["24h","7d","30d","90d","all","custom"]},"AnalysisBucket":{"type":"string","description":"Time-axis granularity. hour is available only for the 24h, 7d, and custom ranges; a coarser bucket is required for longer windows.","enum":["hour","day","week","month"]},"AnalysisValueFormat":{"type":"string","enum":["number","percent","duration","currency"]},"AnalysisStackMode":{"type":"string","enum":["none","stack","normalize"]},"AnalysisOrientation":{"type":"string","enum":["vertical","horizontal"]},"AnalysisInsightLayout":{"type":"object","additionalProperties":false,"description":"Placement on the board's 12-column grid. A row unit is 40px in the dashboard. All four fields are supplied together; x + w must not exceed 12 columns.","properties":{"x":{"type":"integer","minimum":0,"maximum":11},"y":{"type":"integer","minimum":0,"maximum":999},"w":{"type":"integer","minimum":1,"maximum":12},"h":{"type":"integer","minimum":1,"maximum":24}},"required":["x","y","w","h"]},"AnalysisInsightDisplay":{"type":"object","additionalProperties":false,"description":"Presentation options. Never affects which rows the query returns, so an unsupported combination changes how a chart looks and never what it measures.","properties":{"series_colors":{"type":"object","description":"Series (or slice) name to a Kejue Voice design token. Colors are restricted to var(--sonus-*) custom properties; hex literals and arbitrary CSS are rejected.","maxProperties":60,"additionalProperties":{"type":"string","pattern":"^var\\(--sonus-[a-z0-9-]{1,40}\\)$"}},"legend":{"type":"boolean"},"value_format":{"$ref":"#/components/schemas/AnalysisValueFormat"},"stack_mode":{"$ref":"#/components/schemas/AnalysisStackMode"},"orientation":{"$ref":"#/components/schemas/AnalysisOrientation"},"goal":{"type":["number","null"],"description":"Dashed reference line on the value axis."},"lower_is_better":{"type":"boolean","description":"Inverts delta coloring for metrics where down is good."}}},"AnalysisGroupBy":{"type":"string","enum":["none","time","agent","value"]},"AnalysisSecondaryGroupBy":{"type":"string","enum":["time","agent","value"]},"AnalysisValueDimension":{"type":"object","additionalProperties":false,"description":"Column used when the primary or secondary grouping is value. Omit to group by the metric column. Call and extraction can group by either source; other sources must match the metric. Requires exactly one query and a declared extraction field when source is extraction.","properties":{"source":{"$ref":"#/components/schemas/AnalysisSource"},"column":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"}},"required":["source","column"]},"AnalysisFilter":{"type":"object","additionalProperties":false,"description":"A typed filter. value is required for every operator except is_null and not_null, for which value must be omitted. Numeric, boolean, UUID, and fixed-enum values are validated against the selected column before SQL runs.","properties":{"source":{"$ref":"#/components/schemas/AnalysisSource","description":"Omit to inherit the metric source. Call and extraction filters may be combined within the same query; other sources must match the metric."},"column":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"op":{"$ref":"#/components/schemas/AnalysisFilterOperator"},"value":{"type":"string","maxLength":500,"description":"A typed value encoded as a string. Literal wildcard characters in text filters are escaped."}},"required":["column","op"],"allOf":[{"if":{"properties":{"op":{"enum":["is_null","not_null"]}},"required":["op"]},"then":{"not":{"required":["value"]}},"else":{"required":["value"]}}]},"AnalysisQueryInput":{"type":"object","additionalProperties":false,"description":"One input series. Omitted names normalize to A, B, C, and so on; filters and agent_ids normalize to empty arrays. Optional group_by selects a value dimension independently of the metric column, for example average call duration by an extracted category. All extraction queries in one insight must reference the same extraction object. A contact query cannot supply agent_ids, and one insight cannot mix contact with session-rooted sources.","properties":{"name":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,31}$","description":"Unique formula identifier within this insight. Defaults by position when omitted."},"source":{"$ref":"#/components/schemas/AnalysisSource"},"group_by":{"$ref":"#/components/schemas/AnalysisValueDimension"},"extraction_object_id":{"type":"string","format":"uuid","description":"Required whenever the metric, grouping, or a filter references extraction fields. All extraction references in an insight must use the same object. Rejected when no extraction field is referenced."},"column":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"operation":{"$ref":"#/components/schemas/AnalysisOperation"},"filters":{"type":"array","maxItems":10,"default":[],"items":{"$ref":"#/components/schemas/AnalysisFilter"}},"agent_ids":{"type":"array","maxItems":20,"uniqueItems":true,"default":[],"items":{"type":"string","format":"uuid"}}},"required":["source","column","operation"],"allOf":[{"if":{"anyOf":[{"properties":{"source":{"const":"extraction"}},"required":["source"]},{"properties":{"group_by":{"properties":{"source":{"const":"extraction"}},"required":["source"]}},"required":["group_by"]},{"properties":{"filters":{"contains":{"properties":{"source":{"const":"extraction"}},"required":["source"]}}},"required":["filters"]}]},"then":{"required":["extraction_object_id"]},"else":{"not":{"required":["extraction_object_id"]}}}]},"AnalysisQuery":{"type":"object","additionalProperties":false,"description":"A normalized saved query. Defaulted name, filters, and agent_ids are always emitted.","properties":{"name":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,31}$"},"source":{"$ref":"#/components/schemas/AnalysisSource"},"group_by":{"$ref":"#/components/schemas/AnalysisValueDimension"},"extraction_object_id":{"type":"string","format":"uuid"},"column":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"operation":{"$ref":"#/components/schemas/AnalysisOperation"},"filters":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/AnalysisFilter"}},"agent_ids":{"type":"array","maxItems":20,"uniqueItems":true,"items":{"type":"string","format":"uuid"}}},"required":["name","source","column","operation","filters","agent_ids"],"allOf":[{"if":{"anyOf":[{"properties":{"source":{"const":"extraction"}},"required":["source"]},{"properties":{"group_by":{"properties":{"source":{"const":"extraction"}},"required":["source"]}},"required":["group_by"]},{"properties":{"filters":{"contains":{"properties":{"source":{"const":"extraction"}},"required":["source"]}}},"required":["filters"]}]},"then":{"required":["extraction_object_id"]},"else":{"not":{"required":["extraction_object_id"]}}}]},"AnalysisSchemaField":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"label":{"type":"string","minLength":1},"type":{"$ref":"#/components/schemas/AnalysisColumnType"},"description":{"type":["string","null"]},"required":{"type":"boolean","description":"Whether a dynamic extraction field is required in extracted output. Fixed source columns return false."},"enum_values":{"type":"array","items":{"type":"string"},"description":"Allowed machine values for a fixed or dynamic enum column; otherwise an empty array."},"item_type":{"type":["string","null"],"enum":["string","integer","number",null],"description":"Array element type for extraction fields; otherwise null."},"supported_operations":{"type":"array","minItems":1,"maxItems":5,"uniqueItems":true,"items":{"$ref":"#/components/schemas/AnalysisOperation"}},"filter_operators":{"type":"array","minItems":2,"maxItems":8,"uniqueItems":true,"items":{"$ref":"#/components/schemas/AnalysisFilterOperator"}}},"required":["name","label","type","description","required","enum_values","item_type","supported_operations","filter_operators"]},"AnalysisSchemaSource":{"type":"object","additionalProperties":false,"properties":{"source":{"$ref":"#/components/schemas/AnalysisSource"},"label":{"type":"string","minLength":1},"extraction_object_id":{"type":["string","null"],"format":"uuid","description":"The dynamic object ID for extraction sources; null for fixed sources."},"extraction_object_name":{"type":["string","null"],"minLength":1,"maxLength":120,"description":"The extraction object's name; null for fixed sources."},"description":{"type":["string","null"],"maxLength":1000,"description":"The extraction object's description; null for fixed sources."},"supports_agent_scope":{"type":"boolean"},"time_basis":{"type":"string","enum":["session.started_at","tool_call.occurred_at","contact.created_at"]},"columns":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/AnalysisSchemaField"}}},"required":["source","label","extraction_object_id","extraction_object_name","description","supports_agent_scope","time_basis","columns"]},"AnalysisSchemaAgent":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":120},"has_data":{"type":"boolean","description":"True when at least one call exists for any version of the agent."}},"required":["id","slug","name","has_data"]},"AnalysisSchemaConstraints":{"type":"object","additionalProperties":false,"properties":{"chart_types":{"type":"array","minItems":11,"maxItems":11,"uniqueItems":true,"items":{"$ref":"#/components/schemas/AnalysisChartType"}},"time_ranges":{"type":"array","minItems":6,"maxItems":6,"uniqueItems":true,"items":{"$ref":"#/components/schemas/AnalysisTimeRange"}},"buckets":{"type":"array","minItems":4,"maxItems":4,"uniqueItems":true,"items":{"$ref":"#/components/schemas/AnalysisBucket"}},"group_bys":{"type":"array","minItems":4,"maxItems":4,"uniqueItems":true,"items":{"$ref":"#/components/schemas/AnalysisGroupBy"}},"secondary_group_bys":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/components/schemas/AnalysisSecondaryGroupBy"}},"maximum_queries":{"type":"integer","const":6},"maximum_filters_per_query":{"type":"integer","const":10},"maximum_agent_ids_per_query":{"type":"integer","const":20},"maximum_result_rows":{"type":"integer","const":500},"maximum_result_series":{"type":"integer","const":50},"maximum_result_cells":{"type":"integer","const":10000},"value_formats":{"type":"array","minItems":4,"maxItems":4,"uniqueItems":true,"items":{"$ref":"#/components/schemas/AnalysisValueFormat"}},"stack_modes":{"type":"array","minItems":3,"maxItems":3,"uniqueItems":true,"items":{"$ref":"#/components/schemas/AnalysisStackMode"}},"orientations":{"type":"array","minItems":2,"maxItems":2,"uniqueItems":true,"items":{"$ref":"#/components/schemas/AnalysisOrientation"}},"chart_rules":{"type":"object","description":"Per-chart-type query-shape rules, keyed by chart type. Only types that constrain the config appear. The dashboard renders these as editor constraints; the server enforces the same rules, so a client that respects them never sees a shape rejection.","additionalProperties":{"type":"object","additionalProperties":false,"properties":{"queries":{"type":"integer","description":"Exact number of queries the chart requires."},"minimum_series":{"type":"integer"},"group_bys":{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/AnalysisGroupBy"}},"requires_secondary_group_by":{"type":"boolean"},"forbids_secondary_group_by":{"type":"boolean"},"forbidden_time_ranges":{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/AnalysisTimeRange"}}}}},"grid_columns":{"type":"integer","const":12},"maximum_custom_range_days":{"type":"integer","const":400}},"required":["chart_types","time_ranges","buckets","group_bys","secondary_group_bys","maximum_queries","maximum_filters_per_query","maximum_agent_ids_per_query","maximum_result_rows","maximum_result_series","maximum_result_cells","value_formats","stack_modes","orientations","chart_rules","grid_columns","maximum_custom_range_days"]},"AnalysisSchemaResponse":{"type":"object","additionalProperties":false,"properties":{"schema_version":{"type":"string","const":"2.0","description":"2.0 publishes every source's columns once, under sources[]. The 1.x top-level call_columns / guardrail_columns / tool_call_columns / contact_columns and extraction_objects duplicated them and were removed."},"operations":{"type":"array","minItems":5,"maxItems":5,"uniqueItems":true,"items":{"$ref":"#/components/schemas/AnalysisOperation"}},"filter_operators":{"type":"array","minItems":11,"maxItems":11,"uniqueItems":true,"items":{"$ref":"#/components/schemas/AnalysisFilterOperator"}},"sources":{"type":"array","minItems":4,"description":"The queryable sources and their columns: the fixed call, guardrail, tool_call and contact sources, then one extraction source per active extraction object (identified by extraction_object_id).","items":{"$ref":"#/components/schemas/AnalysisSchemaSource"}},"agents":{"type":"array","items":{"$ref":"#/components/schemas/AnalysisSchemaAgent"}},"constraints":{"$ref":"#/components/schemas/AnalysisSchemaConstraints"}},"required":["schema_version","operations","filter_operators","sources","agents","constraints"]},"ApiKey":{"type":"object","additionalProperties":false,"description":"Safe API-key metadata. Secret and hash material are never present.","properties":{"id":{"type":"string","format":"uuid"},"prefix":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":120},"scopes":{"type":"array","minItems":1,"maxItems":256,"uniqueItems":true,"items":{"type":"string"}},"status":{"type":"string","enum":["active","expired","revoked"]},"created_by_user_id":{"type":["string","null"],"format":"uuid"},"created_by_api_key_id":{"type":["string","null"],"format":"uuid"},"last_used_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"version":{"type":"integer","format":"int64","minimum":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","prefix","name","scopes","status","created_by_user_id","created_by_api_key_id","last_used_at","expires_at","revoked_at","version","created_at","updated_at"]},"ApiKeyListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"next_cursor":{"type":["string","null"],"description":"Cursor for the next page, or null after the final page."}},"required":["data","next_cursor"]},"AuditActorKind":{"type":"string","enum":["user","api_key","system","agent","eval"]},"AuditPublicMetadata":{"type":"object","additionalProperties":false,"description":"Versioned, fail-closed public projection of internal audit metadata. Only the fields declared here can be returned. Unknown, free-form, malformed, or unsafe source fields are omitted; source objects that cannot be safely decoded are replaced by a redacted status object.","properties":{"public_schema_version":{"type":"integer","const":1},"metadata_status":{"type":"string","enum":["complete","filtered","redacted"]},"dropped_fields_count":{"type":"integer","minimum":1,"description":"Present when metadata_status is filtered."},"reason_code":{"type":"string","enum":["source_too_large","invalid_json","invalid_shape"],"description":"Present when metadata_status is redacted."},"source_bytes":{"type":"integer","minimum":1,"description":"Source size when known for a redacted object."},"account_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"agent_version_id":{"type":"string","format":"uuid"},"board_id":{"type":"string","format":"uuid"},"call_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"delivery_id":{"type":"string","format":"uuid"},"document_id":{"type":"string","format":"uuid"},"draft_version_id":{"type":"string","format":"uuid"},"extraction_object_id":{"type":"string","format":"uuid"},"guardrail_id":{"type":"string","format":"uuid"},"invitation_id":{"type":"string","format":"uuid"},"job_id":{"type":"string","format":"uuid"},"kb_id":{"type":"string","format":"uuid"},"mcp_server_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"pcap_id":{"type":"string","format":"uuid"},"phone_number_id":{"type":"string","format":"uuid"},"policy_id":{"type":"string","format":"uuid"},"pool_id":{"type":"string","format":"uuid"},"production_version_id":{"type":"string","format":"uuid"},"recording_id":{"type":"string","format":"uuid"},"replay_delivery_id":{"type":"string","format":"uuid"},"replay_of_delivery_id":{"type":"string","format":"uuid"},"revision_id":{"type":"string","format":"uuid"},"role_id":{"type":"string","format":"uuid"},"secret_id":{"type":"string","format":"uuid"},"source_delivery_id":{"type":"string","format":"uuid"},"staging_version_id":{"type":"string","format":"uuid"},"suite_id":{"type":"string","format":"uuid"},"tag_id":{"type":"string","format":"uuid"},"tool_id":{"type":"string","format":"uuid"},"transfer_id":{"type":"string","format":"uuid"},"trunk_id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"version_id":{"type":"string","format":"uuid"},"webhook_config_id":{"type":"string","format":"uuid"},"active_job_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"attached_trunk_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"attempt_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"byte_size":{"type":"integer","minimum":0,"maximum":9007199254740991},"call_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"cancelled_delivery_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"consumed_attempt_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"dependency_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"entity_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"external_objects_scheduled":{"type":"integer","minimum":0,"maximum":9007199254740991},"field_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"invitation_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"max_attempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"member_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"packet_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"policy_version":{"type":"integer","minimum":0,"maximum":9007199254740991},"organization_version":{"type":"integer","minimum":0,"maximum":9007199254740991},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"priority":{"type":"integer","minimum":0,"maximum":9007199254740991},"resource_version":{"type":"integer","minimum":0,"maximum":9007199254740991},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"tag_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"tool_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"ttl_seconds":{"type":"integer","minimum":0,"maximum":9007199254740991},"turn_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"usage_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"allow_call_overrides":{"type":"boolean"},"allowlist_edit":{"type":"boolean"},"archived":{"type":"boolean"},"changed":{"type":"boolean"},"enabled":{"type":"boolean"},"pcap_enabled":{"type":"boolean"},"provider_edit":{"type":"boolean"},"outcome_unknown":{"type":"boolean"},"reassigned_agent":{"type":"boolean"},"renamed":{"type":"boolean"},"rotated_creds":{"type":"boolean"},"retryable":{"type":"boolean"},"set_extraction_object_ids":{"type":"boolean"},"set_summary_enabled":{"type":"boolean"},"set_summary_prompt":{"type":"boolean"},"set_webhook_config_ids":{"type":"boolean"},"content_hash":{"type":"string","pattern":"^[0-9A-Fa-f]{64}$"},"definition_hash":{"type":"string","pattern":"^[0-9A-Fa-f]{64}$"},"destination_sha256":{"type":"string","pattern":"^[0-9A-Fa-f]{64}$"},"from":{"type":["string","null"],"enum":["ringing","in_progress","ended","failed",null]},"to":{"type":["string","null"],"enum":["ringing","in_progress","ended","failed",null]},"failure_code":{"type":"string","enum":["caller_hangup_pre_answer","caller_hangup_during_queue","agent_dispatch_timeout","provider_busy","provider_no_answer","provider_rejected","provider_capacity","provider_rate_limited","provider_route_unavailable","caller_id_invalid","provider_authentication","provider_unknown","destination_invalid","provider_forbidden","agent_crash","media_pipeline_error","admin_canceled","dncr_blocked","dncr_unavailable","dncr_configuration_invalid","unknown"]},"end_reason":{"type":"string","enum":["caller_hangup_pre_answer","caller_hangup_during_queue","agent_dispatch_timeout","provider_busy","provider_no_answer","provider_rejected","provider_capacity","provider_rate_limited","provider_route_unavailable","caller_id_invalid","provider_authentication","provider_unknown","destination_invalid","provider_forbidden","agent_crash","media_pipeline_error","admin_canceled","dncr_blocked","dncr_unavailable","dncr_configuration_invalid","unknown","agent_hungup","agent_silence_watchdog","api_hangup","customer_hungup","caller_disconnected","twilio_completed"]},"direction":{"type":"string","enum":["inbound","outbound"]},"leg":{"type":"string","enum":["caller","agent"]},"transport":{"type":"string","enum":["udp","tcp","tls"]},"selection_policy":{"type":"string","enum":["sticky_least_loaded","least_loaded","weighted_round_robin"]},"provider_cleanup":{"type":"string","enum":["scheduled","confirmed","not_required","reconciliation_required"]},"provider":{"type":"string","enum":["livekit","twilio","unknown"]},"provider_confirmation":{"type":"string","enum":["confirmed","already_terminal"]},"provider_status":{"type":"string","enum":["accepted","queued","ringing","in-progress","completed","canceled","busy","failed","no-answer","deleted","not_found"]},"result":{"type":"string","enum":["already_terminal"]},"livekit_delete":{"type":"string","enum":["scheduled"]},"dependency_kind":{"type":"string","enum":["agent","phone_number","sip_trunk","tool","webhook"]},"status":{"$ref":"#/components/schemas/AuditPublicStatusCode"},"previous_status":{"$ref":"#/components/schemas/AuditPublicStatusCode"},"delivery_status":{"type":"string","enum":["pending","leased","delivered","failed","failed_permanent"]},"deployment_stage":{"type":"string","enum":["draft","staging","production"]},"reconciliation":{"type":"string","enum":["scheduled","required","complete"]},"reconciliation_code":{"type":"string","enum":["provider_result_ambiguous","provider_state_unknown"]}},"required":["public_schema_version","metadata_status"]},"AuditPublicStatusCode":{"type":"string","enum":["active","archived","canceled","cancelled","completed","delivered","disabled","done","draft","ended","error","expired","failed","failed_permanent","in_progress","inactive","leased","pending","provisioning","published","queued","ready","rejected","retrying","ringing","running","scheduled","skipped","staging","succeeded"]},"AuditVia":{"type":"object","additionalProperties":false,"description":"The connected app a person acted through. The event's actor fields still name the human (actor_kind `user`); this records the app that made the request on their behalf, so the event reads \"<user> via <client_name>\".","properties":{"kind":{"type":"string","enum":["oauth"],"description":"Delegation channel. `oauth` is an OAuth connected app (MCP client such as Claude)."},"client_name":{"type":"string","minLength":1,"description":"The app's name as shown on the consent screen when the grant was approved (a snapshot, like the actor email)."},"grant_id":{"type":["string","null"],"format":"uuid","description":"The connected-app grant that made the request; use it with the list `oauth_grant_id` filter. Null only for events whose writer recorded the app name without a grant."}},"required":["kind","client_name","grant_id"]},"AuditLogListItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[1-9][0-9]*$"},"ts":{"type":"string","format":"date-time"},"actor_kind":{"$ref":"#/components/schemas/AuditActorKind"},"user_id":{"type":["string","null"],"format":"uuid"},"user_email":{"type":["string","null"],"format":"email"},"user_name":{"type":["string","null"]},"api_key_id":{"type":["string","null"],"format":"uuid"},"api_key_prefix":{"type":["string","null"]},"api_key_name":{"type":["string","null"]},"action":{"type":"string","minLength":1,"maxLength":160},"resource_kind":{"type":"string","minLength":1,"maxLength":120},"resource_id":{"type":["string","null"],"maxLength":512},"resource_label":{"type":["string","null"],"maxLength":200,"description":"The resource's human name, resolved at read time within the caller's own organization. Null when the resource kind has no name, the row has since been deleted, or the identifier is not a UUID — the client then displays `resource_id`."},"client_ip":{"type":["string","null"]},"request_id":{"type":["string","null"],"maxLength":256},"session_id":{"type":["string","null"],"format":"uuid"},"via":{"anyOf":[{"$ref":"#/components/schemas/AuditVia"},{"type":"null"}],"description":"Set when the actor acted through a connected app (OAuth client such as Claude over MCP); null for direct actions."},"metadata":{"$ref":"#/components/schemas/AuditPublicMetadata"}},"required":["id","ts","actor_kind","user_id","user_email","user_name","api_key_id","api_key_prefix","api_key_name","action","resource_kind","resource_id","resource_label","client_ip","request_id","session_id","via","metadata"]},"AuditLogListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"AuditActor":{"type":"object","additionalProperties":false,"description":"One distinct principal appearing in the audit trail. At most one identity block is populated — a human (user_id/email/display_name) or an API key (api_key_id/api_key_name/api_key_prefix). Both are null for the system, agent, and eval writers, which have no principal; select those with the `actor` filter instead. A person who also acted through a connected app appears once more per connection, with `via` set — select those events with the list's `oauth_grant_id` filter.","properties":{"actor_kind":{"$ref":"#/components/schemas/AuditActorKind"},"user_id":{"type":["string","null"],"format":"uuid"},"email":{"type":["string","null"],"format":"email"},"display_name":{"type":["string","null"]},"api_key_id":{"type":["string","null"],"format":"uuid"},"api_key_name":{"type":["string","null"]},"api_key_prefix":{"type":["string","null"]},"via":{"anyOf":[{"$ref":"#/components/schemas/AuditVia"},{"type":"null"}],"description":"Set on the entry for a person's actions through one connected app; null on their direct entry and on every non-human entry."},"event_count":{"type":"integer","minimum":1},"last_seen":{"type":"string","format":"date-time"}},"required":["actor_kind","user_id","email","display_name","api_key_id","api_key_name","api_key_prefix","via","event_count","last_seen"]},"AuditActorsResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditActor"}},"truncated":{"type":"boolean","description":"True when the organization has more distinct actors than this response carries. Never a silent truncation — the client must surface that the picker is not exhaustive."}},"required":["data","truncated"]},"Board":{"type":"object","additionalProperties":false,"description":"A complete analysis board. Insights are always present and ordered by position, then ID.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"insights":{"type":"array","items":{"$ref":"#/components/schemas/Insight"}}},"required":["id","name","archived_at","created_at","updated_at","insights"]},"BoardSummary":{"type":"object","additionalProperties":false,"description":"List representation. Embedded insight definitions are intentionally omitted.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"archived_at":{"type":["string","null"],"format":"date-time"},"insight_count":{"type":"integer","minimum":0},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","archived_at","insight_count","created_at","updated_at"]},"BoardCreateRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Trimmed display name. Active names are unique case-insensitively."}},"required":["name"]},"BoardListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BoardSummary"}},"next_cursor":{"type":["string","null"],"description":"Opaque endpoint-scoped cursor, or null on the final page."}},"required":["data","next_cursor"]},"BoardPatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"archived":{"type":"boolean","description":"True archives the board; false restores it."}}},"CallBatchDeleteRequest":{"type":"object","additionalProperties":false,"properties":{"ids":{"type":"array","minItems":1,"maxItems":200,"uniqueItems":true,"items":{"type":"string","format":"uuid"}}},"required":["ids"]},"CallPurgeCleanup":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["not_required","pending","complete"]},"total":{"type":"integer","format":"int64","minimum":0},"deleted":{"type":"integer","format":"int64","minimum":0},"pending":{"type":"integer","format":"int64","minimum":0}},"required":["status","total","deleted","pending"]},"CallBatchDeleteResult":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["purged","purging","already_purged","legal_hold","active","processing","not_found"]},"cleanup":{"oneOf":[{"$ref":"#/components/schemas/CallPurgeCleanup"},{"type":"null"}]},"poll_url":{"type":["string","null"],"description":"GET this relative API URL after retry_after_seconds when status is purging; null for every other status."}},"required":["id","status","cleanup","poll_url"]},"CallBatchDeleteResponse":{"type":"object","additionalProperties":false,"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/CallBatchDeleteResult"}},"deleted":{"type":"array","items":{"type":"string","format":"uuid"}},"cleanup_pending":{"type":"array","items":{"type":"string","format":"uuid"}},"skipped_legal_hold":{"type":"array","items":{"type":"string","format":"uuid"}},"skipped_active":{"type":"array","items":{"type":"string","format":"uuid"}},"skipped_processing":{"type":"array","items":{"type":"string","format":"uuid"}},"not_found":{"type":"array","items":{"type":"string","format":"uuid"}},"already_purged":{"type":"array","items":{"type":"string","format":"uuid"}},"retry_after_seconds":{"type":["integer","null"],"minimum":1,"description":"Matches Retry-After when any result is purging; null when no polling is required."}},"required":["results","deleted","cleanup_pending","skipped_legal_hold","skipped_active","skipped_processing","not_found","already_purged","retry_after_seconds"]},"CallDeleteResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","const":"call"},"status":{"type":"string","enum":["purged","purging","already_purged"]},"deleted":{"type":"boolean","description":"True only when this request performed the database purge."},"purged_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"cleanup":{"$ref":"#/components/schemas/CallPurgeCleanup"},"records_deleted":{"type":"object","additionalProperties":{"type":"integer","format":"int64","minimum":0}}},"required":["id","object","status","deleted","purged_at","updated_at","cleanup","records_deleted"]},"CallContextInjectRequest":{"type":"object","additionalProperties":false,"description":"Queues an encrypted system-context message for a live call. The message is committed before delivery and retried for transient message-bus or subscriber-readiness failures. `content` is limited to 4096 UTF-8 bytes; newlines are allowed, blank-only content and NUL are rejected.","properties":{"content":{"type":"string","minLength":1,"maxLength":4096},"role":{"type":"string","enum":["system"],"default":"system"},"urgency":{"type":"string","enum":["immediate","soon","later"],"default":"soon"}},"required":["content"]},"CallContextInjectResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"call_id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["system"]},"urgency":{"type":"string","enum":["immediate","soon","later"]},"delivery_status":{"type":"string","enum":["pending"]},"created_at":{"type":"string","format":"date-time"}},"required":["id","call_id","role","urgency","delivery_status","created_at"]},"CallHangupResponse":{"type":"object","additionalProperties":false,"description":"Closed action result for a confirmed hangup or terminal no-op.","properties":{"call_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["ended","failed"]},"changed":{"type":"boolean","description":"True only when this request transitioned the call to ended."},"provider_confirmation":{"type":"string","enum":["confirmed","already_terminal"]},"reconciliation_status":{"type":"string","enum":["not_applicable","scheduled"],"description":"Scheduled means durable outbound job and attempt healing continues after commit."}},"required":["call_id","status","changed","provider_confirmation","reconciliation_status"]},"CallDetail":{"allOf":[{"$ref":"#/components/schemas/CallCore"},{"type":"object","properties":{"contact_id":{"type":["string","null"],"format":"uuid"},"transcript":{"type":"array","items":{"$ref":"#/components/schemas/TranscriptSegment"}},"live_transcript":{"description":"Current redacted live transcript snapshot, or null when unavailable."},"transcript_id":{"type":["string","null"],"format":"uuid"},"redacted_entities":{"type":["object","null"],"additionalProperties":true},"has_encrypted_raw":{"type":"boolean"},"tool_invocations":{"type":"array","items":{"$ref":"#/components/schemas/CallToolInvocation"}},"actions":{"type":"array","items":{"$ref":"#/components/schemas/CallAction"}},"data_messages":{"type":"array","items":{"$ref":"#/components/schemas/CallDataMessage"}},"summary":{"oneOf":[{"$ref":"#/components/schemas/CallSummaryResult"},{"type":"null"}]},"extractions":{"type":"array","items":{"$ref":"#/components/schemas/CallExtractionResult"}},"webhook_deliveries":{"type":"array","items":{"$ref":"#/components/schemas/CallWebhookDelivery"}},"recordings":{"type":"array","items":{"$ref":"#/components/schemas/RecordingSummary"}},"recording_enabled":{"type":"boolean","description":"True when the deployment stores call recordings and the call had audio. Always false for text-modality web calls."},"turn_metrics":{"type":"array","items":{"$ref":"#/components/schemas/CallTurnMetric"}},"metrics_rollup":{"oneOf":[{"$ref":"#/components/schemas/CallMetricsRollup"},{"type":"null"}]},"user_turn_audio":{"type":"array","items":{"$ref":"#/components/schemas/UserTurnAudio"}},"purge_cleanup":{"oneOf":[{"$ref":"#/components/schemas/CallPurgeCleanup"},{"type":"null"}]},"failure_reason_internal":{"type":["string","null"],"maxLength":2049,"description":"Operator-only failure diagnostics. Customer responses return null and expose the classified failure_code and failure_reason instead."},"sip_failure":{"oneOf":[{"$ref":"#/components/schemas/CallSIPFailure"},{"type":"null"}]},"sip_messages":{"type":"array","description":"Captured SIP messages for the call's setup (first INVITE, auth challenge, final response), oldest first.","items":{"$ref":"#/components/schemas/CallSIPMessage"}},"sip_rejections":{"type":"array","items":{"$ref":"#/components/schemas/CallSIPRejection"}},"timeline_available":{"type":"boolean","description":"True when GET /v1/calls/{id}/timeline has evidence beyond the session's own start/answer/end markers — the agent event log, model requests, tool calls, turn metrics, transcript, transfer or SIP events, or a ready recording. The timeline's sources array names which of them it was assembled from."}},"required":["contact_id","transcript","live_transcript","transcript_id","redacted_entities","has_encrypted_raw","tool_invocations","actions","data_messages","summary","extractions","webhook_deliveries","recordings","recording_enabled","turn_metrics","metrics_rollup","user_turn_audio","purge_cleanup","failure_reason_internal","sip_failure","sip_messages","sip_rejections","timeline_available"]}],"unevaluatedProperties":false},"CallTimeline":{"type":"object","additionalProperties":false,"required":["call_id","version","anchor","duration_ms","sources","truncated","recording","events","turns","transcript","models"],"properties":{"call_id":{"type":"string","format":"uuid"},"version":{"type":"integer","const":1},"anchor":{"type":"string","format":"date-time","description":"Time zero of the timeline; every event's t is milliseconds since this instant."},"duration_ms":{"type":"integer","minimum":0},"sources":{"type":"array","description":"Producers that contributed events (agent, usage_events, tool_invocations, turn_metrics, transcript, transfers).","items":{"type":"string"}},"truncated":{"type":"boolean","description":"True when an event cap was reached and some events were dropped."},"recording":{"oneOf":[{"$ref":"#/components/schemas/CallTimelineRecording"},{"type":"null"}]},"events":{"type":"array","items":{"$ref":"#/components/schemas/CallTimelineEvent"}},"turns":{"type":"array","items":{"$ref":"#/components/schemas/CallTimelineTurn"}},"transcript":{"type":"array","items":{"$ref":"#/components/schemas/CallTimelineUtterance"}},"models":{"type":"array","items":{"$ref":"#/components/schemas/CallTimelineModelUsage"}}}},"CallTimelineRecording":{"type":"object","additionalProperties":false,"required":["recording_id","offset_ms","duration_ms","channels","has_peaks"],"properties":{"recording_id":{"type":"string","format":"uuid"},"offset_ms":{"type":["integer","null"],"description":"Recording start relative to the anchor; null when unknown."},"duration_ms":{"type":["integer","null"]},"channels":{"type":["integer","null"]},"has_peaks":{"type":"boolean"}}},"CallTimelineEvent":{"type":"object","additionalProperties":false,"required":["id","t","d","track","kind","turn","speech_id","level","label","source","attrs"],"properties":{"id":{"type":"string"},"t":{"type":"integer","description":"Start in milliseconds since the anchor (may be negative for events before the agent joined)."},"d":{"type":["integer","null"],"minimum":0,"description":"Duration in milliseconds; null for an instant marker."},"track":{"type":"string","description":"Lane, for example call, sip, caller_speech, agent_speech, vad, stt, endpoint, turn, llm, tts, tool, decision, state, guardrail, transfer, dtmf, error, degraded."},"kind":{"type":"string"},"turn":{"type":["integer","null"]},"speech_id":{"type":["string","null"]},"level":{"type":"string","enum":["info","warn","error"]},"label":{"type":["string","null"]},"source":{"type":"string","enum":["agent","gateway","tool","session","transfer","sip"]},"attrs":{"type":"object","additionalProperties":true}}},"CallTimelineTurn":{"type":"object","additionalProperties":false,"required":["index","speech_id","t","response_ms","endpoint_ms","transcription_ms","model_ttft_ms","model_duration_ms","tts_ttfb_ms","tts_duration_ms","tool_ms","outcome","model_role","response_measurement"],"properties":{"index":{"type":"integer","minimum":0},"speech_id":{"type":["string","null"]},"t":{"type":"integer"},"response_ms":{"type":["integer","null"]},"endpoint_ms":{"type":["integer","null"]},"transcription_ms":{"type":["integer","null"]},"model_ttft_ms":{"type":["integer","null"]},"model_duration_ms":{"type":["integer","null"]},"tts_ttfb_ms":{"type":["integer","null"]},"tts_duration_ms":{"type":["integer","null"]},"tool_ms":{"type":["integer","null"]},"outcome":{"type":["string","null"]},"model_role":{"type":["string","null"]},"response_measurement":{"type":["string","null"]}}},"CallTimelineUtterance":{"type":"object","additionalProperties":false,"required":["t","speaker","text","speech_id","kind","is_error","leg"],"properties":{"t":{"type":"integer"},"speaker":{"type":"string"},"text":{"type":"string","description":"Redacted transcript text."},"speech_id":{"type":["string","null"]},"kind":{"type":["string","null"]},"is_error":{"type":"boolean"},"leg":{"type":"string"}}},"CallTimelineModelUsage":{"type":"object","additionalProperties":false,"required":["kind","provider","requests","errors","avg_ttft_ms"],"properties":{"kind":{"type":"string"},"provider":{"type":"string"},"requests":{"type":"integer","minimum":0},"errors":{"type":"integer","minimum":0},"avg_ttft_ms":{"type":["integer","null"]}}},"SIPRejectionListResponse":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CallSIPRejection"}}}},"CallSIPFailure":{"type":"object","additionalProperties":false,"description":"Structured SIP outcome of a failed call leg.","required":["status"],"properties":{"status":{"type":"integer","minimum":100,"maximum":699},"status_text":{"type":"string"},"reason":{"type":"string"},"disconnect_reason":{"type":"string"},"call_id":{"type":"string","description":"Carrier-visible SIP Call-ID header."},"class":{"type":"string","description":"Call failure code derived from the SIP status."},"q850_cause":{"type":"integer","minimum":1,"maximum":127,"description":"ITU-T Q.850 cause number from the final response's Reason header, when the far end sent one (for example 34, no circuit available). Omitted when there was none."},"q850_text":{"type":"string","description":"Plain-language meaning of q850_cause. Kejue Voice's own wording for the cause number, never the far end's free text."},"source":{"type":"string","enum":["capture"],"description":"capture when the outcome was read from the captured SIP messages rather than reported by the SIP service. Omitted otherwise."}}},"CallSIPMessage":{"type":"object","additionalProperties":false,"required":["seq","sip_call_id","direction","kind","method","status_code","reason","headers","ts","hop","src","dst","transport"],"properties":{"seq":{"type":"integer","minimum":0},"sip_call_id":{"type":"string"},"direction":{"type":"string","enum":["sent","received"],"description":"Relative to the sender named by hop; sent means towards the carrier."},"hop":{"type":"string","enum":["sonus","edge"],"description":"Which Kejue Voice component exchanged the message. sonus is the SIP service; for a trunk that signals through the SIP edge its messages go to the edge, and edge messages are what the carrier actually received and sent."},"src":{"type":["string","null"],"description":"Source host:port as on the wire, when known (edge messages)."},"dst":{"type":["string","null"],"description":"Destination host:port as on the wire, when known (edge messages)."},"transport":{"type":["string","null"],"description":"udp, tcp or tls, when known (edge messages)."},"kind":{"type":"string","enum":["request","response"]},"method":{"type":["string","null"]},"status_code":{"type":["integer","null"]},"reason":{"type":["string","null"]},"headers":{"type":"string","description":"Start line and header block, CRLF-separated, body removed and credentials redacted."},"ts":{"type":"string","format":"date-time"}}},"CallSIPRejection":{"type":"object","additionalProperties":false,"required":["id","session_id","occurred_at","direction","stage","sip_status","sip_reason","caller_number","called_number","sip_trunk_id","phone_number_id","sip_call_id","source_ip","detail_internal","messages"],"properties":{"id":{"type":"string","format":"uuid"},"session_id":{"type":["string","null"],"format":"uuid"},"occurred_at":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["inbound","outbound"]},"stage":{"type":"string","description":"Where the call was refused (trunk_auth, no_trunk, no_dispatch_rule, admission, capacity, quota, unknown_number, carrier_rejected, registrar, other)."},"sip_status":{"type":["integer","null"]},"sip_reason":{"type":["string","null"]},"caller_number":{"type":["string","null"]},"called_number":{"type":["string","null"]},"sip_trunk_id":{"type":["string","null"],"format":"uuid"},"phone_number_id":{"type":["string","null"],"format":"uuid"},"sip_call_id":{"type":["string","null"]},"source_ip":{"type":["string","null"]},"detail_internal":{"type":["string","null"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/CallSIPMessage"}}}},"CallExtractionResult":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"extraction_object_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"status":{"type":"string"},"model":{"type":["string","null"]},"fields":{"type":"object","additionalProperties":true,"description":"Free-form JSON object."},"result":{"type":"object","additionalProperties":true,"description":"Free-form JSON object."},"error":{"type":["string","null"]},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}},"required":["id","extraction_object_id","name","status","model","fields","result","error","started_at","completed_at"]},"CallExtractionFilter":{"type":"object","additionalProperties":false,"description":"Decoded JSON object carried by one `ef` query parameter on GET /calls. Serialize this object as UTF-8 JSON, then encode it with strict unpadded base64url (RFC 4648 URL alphabet). The encoded value may not exceed 4096 bytes, and no request may contain more than 20 `ef` parameters.\n\nThe referenced extraction object and field must be visible in the current workspace. Operators are selected from the field's declared type:\n* `enum`: `is`, `is_not`, `any_of`\n* `string` or `array`: `is`, `is_not`, `contains`, `starts_with`\n* `integer` or `number`: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `between`\n* `boolean`: `is_true`, `is_false`\n\n`value` is required except for boolean predicates, where it must be omitted. String-like scalar values must be JSON strings of at most 2048 encoded bytes. `any_of` takes 1–100 strings, each at most 2048 encoded bytes. Numeric comparisons accept a finite JSON number or numeric string. `between` takes exactly `{ \"from\": number|string, \"to\": number|string }`, with `from <= to`.","properties":{"object":{"type":"string","format":"uuid","description":"Extraction-object ID."},"field":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Declared field name on the referenced extraction object."},"op":{"type":"string","enum":["is","is_not","contains","starts_with","any_of","eq","ne","gt","gte","lt","lte","between","is_true","is_false"]},"value":{"description":"Operator-specific JSON value. Omit for is_true and is_false."}},"required":["object","field","op"]},"CallLegalHoldRequest":{"type":"object","additionalProperties":false,"properties":{"held":{"type":"boolean"}},"required":["held"]},"CallLegalHoldResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","const":"call"},"legal_hold":{"type":"boolean"},"changed":{"type":"boolean"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","object","legal_hold","changed","updated_at"]},"CallCore":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"room_name":{"type":"string"},"agent_id":{"type":["string","null"],"format":"uuid"},"agent_slug":{"type":["string","null"]},"agent_name":{"type":["string","null"]},"agent_version_id":{"type":["string","null"],"format":"uuid"},"agent_version":{"type":["integer","null"],"description":"Published version number. Null when the call ran the agent's unpublished draft (see agent_version_is_draft) or has no agent."},"agent_version_is_draft":{"type":"boolean","description":"True when agent_version_id is the agent's draft — dashboard and API test calls usually run the draft, which has no version number."},"channel":{"type":["string","null"],"enum":["sip_inbound","sip_outbound","web_sdk","web_test","eval","transfer_brief",null],"description":"How the call reached the platform: sip_inbound / sip_outbound telephony, web_sdk (POST /v1/web-calls), web_test (dashboard test call), transfer_brief (warm-transfer consult leg). Null for ingested human-handled calls. For web channels metadata.source is web_call / test_call rather than real_call."},"direction":{"type":"string","enum":["inbound","outbound"],"description":"Direction-normalized side of the call. Web and test calls are inbound (the browser user calls the agent). For outbound calls caller_number is the dialed destination and platform_number the caller ID presented."},"flow_id":{"type":["string","null"],"format":"uuid","description":"The flow this call ran inside, or null for an ordinary single-agent call. agent_slug and agent_name stay the agent that OPENED the call; later hops appear as handoff markers in the transcript."},"flow_slug":{"type":["string","null"]},"flow_name":{"type":["string","null"]},"group_id":{"type":["string","null"],"format":"uuid","description":"The group this call was routed through, or null. agent_slug and agent_name are then the agent of the member the call was assigned to."},"group_member_id":{"type":["string","null"],"format":"uuid","description":"The group member the call was assigned to, or null."},"group_name":{"type":["string","null"]},"group_member_label":{"type":["string","null"],"description":"The assigned member's label (A, B, …), or null."},"started_at":{"type":"string","format":"date-time"},"answered_at":{"type":["string","null"],"format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"duration_sec":{"type":["number","null"],"minimum":0},"ring_duration_sec":{"type":["number","null"],"minimum":0},"talk_duration_sec":{"type":["number","null"],"minimum":0},"total_duration_sec":{"type":["number","null"],"minimum":0},"outcome":{"type":["string","null"]},"status":{"type":"string","enum":["live","completed"]},"lifecycle_status":{"$ref":"#/components/schemas/CallLifecycleStatus"},"display_status":{"type":"string","enum":["ringing","queued","in_progress","ended","failed"]},"failure_code":{"type":["string","null"]},"failure_reason":{"type":["string","null"]},"ended_reason":{"type":["string","null"]},"segment_count":{"type":"integer","minimum":0},"metadata":{"type":["object","null"],"additionalProperties":true},"legal_hold":{"type":"boolean"},"purged_at":{"type":["string","null"],"format":"date-time"},"purge_kind":{"type":["string","null"],"enum":["manual","retention",null]},"caller_number":{"type":["string","null"],"description":"The external party, direction-normalized: the caller for inbound calls, the dialed destination for outbound calls. Null for web, test and older calls."},"platform_number":{"type":["string","null"],"description":"The platform's DID or trunk number: the number dialed for inbound calls, the caller ID presented for outbound calls."},"handled_by":{"type":"string","description":"Who was on the platform's end of the call: ai for calls a Kejue Voice agent handled, human for an ingested recording of a human-handled call. Human calls carry metadata.human_agent and have no agent version. This is a different axis from the session's channel (sip_inbound, web_sdk, ...), which records how the call reached the platform: a human-handled call that arrived over a SIP trunk is still sip_inbound.","enum":["ai","human"]},"updated_at":{"type":"string","format":"date-time"}},"required":["id","room_name","agent_id","agent_slug","agent_name","agent_version_id","agent_version","agent_version_is_draft","channel","direction","flow_id","flow_slug","flow_name","group_id","group_member_id","group_name","group_member_label","started_at","answered_at","ended_at","duration_sec","ring_duration_sec","talk_duration_sec","total_duration_sec","outcome","status","lifecycle_status","display_status","failure_code","failure_reason","ended_reason","segment_count","metadata","legal_hold","purged_at","purge_kind","caller_number","platform_number","handled_by","updated_at"]},"CallListItem":{"allOf":[{"$ref":"#/components/schemas/CallCore"}],"unevaluatedProperties":false},"CallListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CallListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"CallLifecycleStatus":{"type":"string","enum":["ringing","in_progress","ended","failed"]},"CallSummaryResult":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"text":{"type":["string","null"]},"model":{"type":["string","null"]},"error":{"type":["string","null"]},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}},"required":["id","status","text","model","error","started_at","completed_at"]},"CallToolInvocation":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"tool_kind":{"type":"string"},"tool_slug":{"type":"string"},"tool_name":{"type":["string","null"]},"ok":{"type":"boolean"},"http_status":{"type":["integer","null"]},"error_kind":{"type":["string","null"]},"duration_ms":{"type":["integer","null"],"minimum":0},"occurred_at":{"type":"string","format":"date-time"},"request_redacted":{"description":"Redacted JSON request, or null for legacy/no-payload rows."},"response_redacted":{"description":"Redacted JSON response, or null for legacy/no-payload rows."},"has_raw_io":{"type":"boolean"},"phase":{"type":"string","enum":["in_call","pre_call"],"description":"pre_call for tools that ran before the greeting to fill call variables; in_call for tools the agent called during the conversation."}},"required":["id","tool_kind","tool_slug","tool_name","ok","http_status","error_kind","duration_ms","occurred_at","request_redacted","response_redacted","has_raw_io","phase"]},"CallAction":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"target_kind":{"type":["string","null"]},"target_id":{"type":["string","null"]},"summary":{"type":"string"},"detail":{"description":"Action-specific redacted JSON detail."},"occurred_at":{"type":"string","format":"date-time"}},"required":["id","kind","target_kind","target_id","summary","detail","occurred_at"]},"CallDataMessage":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"call_id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["system"]},"urgency":{"type":"string","enum":["immediate","soon","later"]},"content_redacted":{"type":"string"},"source":{"type":"string"},"actor_kind":{"type":"string","enum":["user","api_key","system"]},"user_id":{"type":["string","null"],"format":"uuid"},"api_key_id":{"type":["string","null"],"format":"uuid"},"subscriber_count":{"type":"integer","minimum":0},"delivered":{"type":"boolean"},"delivery_status":{"type":"string","enum":["pending","publishing","retrying","published","failed"]},"delivery_attempts":{"type":"integer","minimum":0},"delivery_error_code":{"type":["string","null"]},"next_delivery_at":{"type":["string","null"],"format":"date-time"},"published_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","call_id","role","urgency","content_redacted","source","actor_kind","user_id","api_key_id","subscriber_count","delivered","delivery_status","delivery_attempts","delivery_error_code","next_delivery_at","published_at","created_at","updated_at"]},"CallWebhookDelivery":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"webhook_config_id":{"type":["string","null"],"format":"uuid"},"webhook_name":{"type":["string","null"]},"webhook_url":{"type":["string","null"],"format":"uri"},"event":{"type":"string"},"attempt":{"type":"integer","minimum":0},"max_attempts":{"type":"integer","minimum":1},"status":{"type":"string"},"scheduled_at":{"type":"string","format":"date-time"},"next_retry_at":{"type":["string","null"],"format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"response_status":{"type":["integer","null"],"minimum":100,"maximum":599},"error":{"type":["string","null"]}},"required":["id","webhook_config_id","webhook_name","webhook_url","event","attempt","max_attempts","status","scheduled_at","next_retry_at","started_at","completed_at","response_status","error"]},"CallTurnMetric":{"type":"object","additionalProperties":false,"properties":{"model_generation_ids":{"type":"array","items":{"type":"string"}},"model_ttft_ms":{"type":["integer","null"],"minimum":0},"model_duration_ms":{"type":["integer","null"],"minimum":0},"pipeline_mode":{"type":["string","null"]},"model_family":{"type":["string","null"],"deprecated":true,"description":"Internal model-family diagnostics are omitted from customer responses."},"model_name":{"type":["string","null"],"description":"Catalog display name for the model, or null when no unambiguous public name is available."},"model_role":{"type":["string","null"]},"response_measurement":{"type":["string","null"],"enum":["measured","composed",null]},"turn_outcome":{"type":["string","null"]},"turn_index":{"type":"integer","minimum":0},"speech_id":{"type":["string","null"]},"ts":{"type":"string","format":"date-time"},"response_latency_ms":{"type":["integer","null"],"minimum":0},"eou_delay_ms":{"type":["integer","null"],"minimum":0},"transcription_delay_ms":{"type":["integer","null"],"minimum":0},"stt_duration_ms":{"type":["integer","null"],"minimum":0},"slm_ttft_ms":{"type":["integer","null"],"minimum":0},"slm_duration_ms":{"type":["integer","null"],"minimum":0},"tts_ttfb_ms":{"type":["integer","null"],"minimum":0},"tts_duration_ms":{"type":["integer","null"],"minimum":0},"tts_audio_duration_ms":{"type":["integer","null"],"minimum":0},"tool_latency_ms":{"type":["integer","null"],"minimum":0},"tool_call_count":{"type":"integer","minimum":0},"transcribe_wait_ms":{"type":["integer","null"],"minimum":0,"description":"Latency breakdown. Time the reply waited for the final transcript after the turn ended."},"model_first_token_ms":{"type":["integer","null"],"minimum":0,"description":"Latency breakdown. Model time to first token on the reply's critical path."},"model_hidden_ms":{"type":["integer","null"],"minimum":0,"description":"Model time that ran speculatively before the turn ended. Not part of the reply sum."},"tool_wait_ms":{"type":["integer","null"],"minimum":0,"description":"Latency breakdown. Tool-calling generation and tool run before the follow-up reply. Null on turns without one."},"first_chunk_ms":{"type":["integer","null"],"minimum":0,"description":"Latency breakdown. Model first token until the speech engine received its first request (first-sentence buffering)."},"tts_first_audio_ms":{"type":["integer","null"],"minimum":0,"description":"Latency breakdown. Speech engine request until its first audio."},"handoff_ms":{"type":["integer","null"],"minimum":0,"description":"Latency breakdown. Remaining time before the audio played (guardrails, framework, output)."},"breakdown_version":{"type":["integer","null"],"description":"1 when every breakdown segment is known. Then eou_delay_ms + transcribe_wait_ms + model_first_token_ms + tool_wait_ms + first_chunk_ms + tts_first_audio_ms + handoff_ms equals response_latency_ms (null segments count as 0). Null otherwise."}},"required":["turn_index","speech_id","ts","response_latency_ms","eou_delay_ms","transcription_delay_ms","stt_duration_ms","slm_ttft_ms","slm_duration_ms","tts_ttfb_ms","tts_duration_ms","tts_audio_duration_ms","tool_latency_ms","tool_call_count"]},"CallMetricsRollup":{"type":"object","additionalProperties":false,"properties":{"avg_model_ttft_ms":{"type":["integer","null"],"minimum":0},"p50_model_ttft_ms":{"type":["integer","null"],"minimum":0},"p95_model_ttft_ms":{"type":["integer","null"],"minimum":0},"avg_model_duration_ms":{"type":["integer","null"],"minimum":0},"turn_count":{"type":"integer","minimum":0},"duty_cycle":{"type":["number","null"]},"p50_response_latency_ms":{"type":["integer","null"],"minimum":0},"p95_response_latency_ms":{"type":["integer","null"],"minimum":0},"p99_response_latency_ms":{"type":["integer","null"],"minimum":0},"avg_response_latency_ms":{"type":["integer","null"],"minimum":0},"avg_eou_delay_ms":{"type":["integer","null"],"minimum":0},"p50_eou_delay_ms":{"type":["integer","null"],"minimum":0},"p95_eou_delay_ms":{"type":["integer","null"],"minimum":0},"avg_slm_ttft_ms":{"type":["integer","null"],"minimum":0},"p50_slm_ttft_ms":{"type":["integer","null"],"minimum":0},"p95_slm_ttft_ms":{"type":["integer","null"],"minimum":0},"avg_slm_duration_ms":{"type":["integer","null"],"minimum":0},"avg_tts_ttfb_ms":{"type":["integer","null"],"minimum":0},"p50_tts_ttfb_ms":{"type":["integer","null"],"minimum":0},"p95_tts_ttfb_ms":{"type":["integer","null"],"minimum":0},"avg_tts_duration_ms":{"type":["integer","null"],"minimum":0},"avg_stt_duration_ms":{"type":["integer","null"],"minimum":0},"avg_tool_latency_ms":{"type":["integer","null"],"minimum":0}},"required":["turn_count","duty_cycle","p50_response_latency_ms","p95_response_latency_ms","p99_response_latency_ms","avg_response_latency_ms","avg_eou_delay_ms","p50_eou_delay_ms","p95_eou_delay_ms","avg_slm_ttft_ms","p50_slm_ttft_ms","p95_slm_ttft_ms","avg_slm_duration_ms","avg_tts_ttfb_ms","p50_tts_ttfb_ms","p95_tts_ttfb_ms","avg_tts_duration_ms","avg_stt_duration_ms","avg_tool_latency_ms"]},"UserTurnAudio":{"type":"object","additionalProperties":false,"properties":{"segment_index":{"type":"integer","minimum":0,"description":"Zero-based consultation segment; for brief rows this is transfer.attempt minus one. Missing on older transcript rows means zero."},"turn_index":{"type":"integer","minimum":0},"leg":{"type":"string","enum":["caller","brief"]}},"required":["segment_index","turn_index","leg"]},"ContactE164":{"type":"string","pattern":"^(\\+[1-9][0-9]{7,14}|[0-9*#]{1,20})$","description":"An E.164 number with a non-zero country code and 7 to 15 digits, or a bare internal number/extension of 1 to 20 [0-9*#] characters (e.g. 103, 2770124)."},"ContactTagColor":{"type":"string","enum":["slate","blue","green","amber","red","purple","teal","pink"]},"ContactTagRef":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":40},"color":{"$ref":"#/components/schemas/ContactTagColor"}},"required":["id","name","color"]},"ContactTag":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":40},"color":{"$ref":"#/components/schemas/ContactTagColor"},"usage_count":{"type":"integer","minimum":0},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","color","usage_count","created_at","updated_at"]},"ContactTagListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactTag"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"ContactTagCreateRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":40,"description":"Case-insensitively unique name. Surrounding whitespace is trimmed; control characters are rejected."},"color":{"allOf":[{"$ref":"#/components/schemas/ContactTagColor"}],"default":"slate"}},"required":["name"]},"ContactTagPatchRequest":{"type":"object","minProperties":1,"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":40,"description":"Case-insensitively unique name. Surrounding whitespace is trimmed; control characters are rejected."},"color":{"$ref":"#/components/schemas/ContactTagColor"}}},"ContactListItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"e164":{"$ref":"#/components/schemas/ContactE164"},"display_name":{"type":"string","maxLength":120},"company":{"type":"string","maxLength":120},"timezone":{"type":"string","description":"Canonical IANA timezone name used for contact-local outbound policy evaluation."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ContactTagRef"}},"call_count":{"type":"integer","minimum":0},"last_contacted_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","e164","tags","call_count","created_at","updated_at"]},"ContactDetail":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"e164":{"$ref":"#/components/schemas/ContactE164"},"display_name":{"type":"string","maxLength":120},"company":{"type":"string","maxLength":120},"timezone":{"type":"string","description":"Canonical IANA timezone name used for contact-local outbound policy evaluation."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ContactTagRef"}},"call_count":{"type":"integer","minimum":0},"last_contacted_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"notes":{"type":"string","maxLength":10000}},"required":["id","e164","tags","call_count","created_at","updated_at"]},"ContactCreateRequest":{"type":"object","additionalProperties":false,"properties":{"e164":{"$ref":"#/components/schemas/ContactE164"},"display_name":{"type":"string","maxLength":120,"description":"Optional display label. Surrounding whitespace is trimmed; control characters are rejected."},"company":{"type":"string","maxLength":120,"description":"Optional company label. Surrounding whitespace is trimmed; control characters are rejected."},"notes":{"type":"string","maxLength":10000,"description":"Optional multiline notes. Surrounding whitespace is trimmed; NUL and unsupported control characters are rejected."},"timezone":{"type":"string","description":"Optional loadable IANA timezone name, such as Asia/Dubai. Local is rejected."},"tag_ids":{"type":"array","maxItems":50,"uniqueItems":true,"items":{"type":"string","format":"uuid"},"description":"Existing contact-tag IDs in this workspace, assigned atomically with creation."}},"required":["e164"]},"ContactPatchRequest":{"type":"object","minProperties":1,"additionalProperties":false,"properties":{"display_name":{"type":"string","maxLength":120,"description":"New display label, or an empty string to clear it."},"company":{"type":"string","maxLength":120,"description":"New company label, or an empty string to clear it."},"notes":{"type":"string","maxLength":10000,"description":"New multiline notes, or an empty string to clear them."},"timezone":{"type":"string","description":"New loadable IANA timezone name, or an empty string to clear it."}}},"ContactListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"ContactCallItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"agent_name":{"type":"string"},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":"string","format":"date-time"},"duration_sec":{"type":"number","minimum":0},"lifecycle_status":{"$ref":"#/components/schemas/CallLifecycleStatus"},"outcome":{"type":"string"},"direction":{"type":"string","description":"Direction recorded on the call. Legacy values are preserved rather than rewritten."}},"required":["id","started_at","lifecycle_status"]},"ContactCallListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactCallItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"ContactMemory":{"type":"object","additionalProperties":false,"properties":{"content":{"type":"string","maxLength":8000},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["content","updated_at"]},"ContactMemorySetRequest":{"type":"object","additionalProperties":false,"properties":{"content":{"type":"string","maxLength":8000,"description":"Complete replacement document. Surrounding whitespace is trimmed; multiline text and tabs are allowed, while NUL and unsupported control characters are rejected. An empty string clears memory."}},"required":["content"]},"ContactMemoryWriteResponse":{"type":"object","additionalProperties":false,"properties":{"content":{"type":"string","maxLength":8000},"updated_at":{"type":["string","null"],"format":"date-time"},"changed":{"type":"boolean"},"revision_id":{"type":["string","null"],"format":"uuid"}},"required":["content","updated_at","changed","revision_id"]},"ContactMemoryRevision":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"session_id":{"type":"string","format":"uuid"},"previous_content":{"type":"string"},"new_content":{"type":"string","maxLength":8000},"changed":{"type":"boolean"},"source":{"type":"string","enum":["manual","extraction"]},"agent_name":{"type":"string"},"summary":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","previous_content","new_content","changed","source","created_at"]},"ContactMemoryRevisionListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactMemoryRevision"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"CreateApiKeyRequest":{"type":"object","additionalProperties":false,"description":"Supply either expires_in_days or expires_at, not both. Omit both for a non-expiring credential.","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"scopes":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"string"}},"expires_in_days":{"type":"integer","minimum":1,"maximum":3650,"description":"Relative lifetime in whole days from creation; mutually exclusive with expires_at."},"expires_at":{"type":"string","format":"date-time","description":"RFC 3339 instant strictly after the request time and no more than 3650 days in the future; mutually exclusive with expires_in_days."}},"required":["name","scopes"],"not":{"required":["expires_in_days","expires_at"]}},"CreateApiKeyResponse":{"type":"object","additionalProperties":false,"description":"Complete safe metadata plus the one-time credential secret.","properties":{"id":{"type":"string","format":"uuid"},"prefix":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":120},"scopes":{"type":"array","minItems":1,"maxItems":256,"uniqueItems":true,"items":{"type":"string"}},"status":{"type":"string","enum":["active","expired","revoked"]},"created_by_user_id":{"type":["string","null"],"format":"uuid"},"created_by_api_key_id":{"type":["string","null"],"format":"uuid"},"last_used_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"version":{"type":"integer","format":"int64","minimum":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"key":{"type":"string","minLength":1,"readOnly":true,"x-sonus-one-time-secret":true,"x-kejue-one-time-secret":true}},"required":["id","prefix","name","scopes","status","created_by_user_id","created_by_api_key_id","last_used_at","expires_at","revoked_at","version","created_at","updated_at","key"]},"EvalGradeCallsRequest":{"type":"object","additionalProperties":false,"required":["suite_id"],"properties":{"suite_id":{"type":"string","format":"uuid","description":"The suite whose attached checks do the grading."},"call_ids":{"type":"array","maxItems":5000,"description":"Explicit calls to grade. Ids belonging to another org, or to calls that never finished, are dropped rather than failing the run.","items":{"type":"string","format":"uuid"}},"call_filter":{"description":"Used only when call_ids is empty. Matches finished calls, newest first, capped at 5000.","oneOf":[{"$ref":"#/components/schemas/EvalCallFilter"},{"type":"null"}]}}},"EvalCallFilter":{"type":"object","additionalProperties":false,"properties":{"agent_version_id":{"type":"string","format":"uuid"},"since":{"type":"string","format":"date-time"},"until":{"type":"string","format":"date-time"},"outcome":{"type":"string"}}},"EvalGradeCallsResponse":{"type":"object","additionalProperties":false,"required":["id","total"],"properties":{"id":{"type":"string","format":"uuid"},"total":{"type":"integer","description":"How many calls the selection resolved to."}}},"EvalCallerVoiceSettingsInput":{"type":"object","additionalProperties":false,"description":"Writable provider-specific override layered over the selected voice's catalog settings. The selected connector permits only its advertised subset and can impose narrower ranges; inspect voice_settings_schema in GET /providers before authoring. Send {} to clear every per-agent override. Dialect is intentionally absent because it belongs to the selected voice catalog entry.","properties":{"speed":{"type":"number","minimum":0.5,"maximum":2},"volume":{"type":"number","minimum":-20,"maximum":20},"temperature":{"type":"number","minimum":0,"maximum":1},"top_p":{"type":"number","minimum":0,"maximum":1},"stability":{"type":"number","minimum":0,"maximum":1},"expressiveness":{"type":"number","minimum":0,"maximum":1,"description":"Intonation variation (Bland). Higher is more varied; lower is flatter. Provider default 0.6."},"similarity_boost":{"type":"number","minimum":0,"maximum":1},"style":{"type":"number","minimum":0,"maximum":1},"use_speaker_boost":{"type":"boolean"},"normalize_text":{"type":"boolean","description":"Ask the provider to normalize numbers, dates and dialect spellings before synthesis (OpenAI-compatible TTS such as Sawtak)."}}},"EvalCallModels":{"type":"object","additionalProperties":false,"description":"Effective model selections expressed as public catalog references and display names. Missing or unavailable legacy identities are not guessed.","properties":{"agent_ref":{"type":"string","format":"uuid"},"agent_display_name":{"type":"string"},"agent_status":{"type":"string","enum":["unavailable"]},"caller_ref":{"type":"string","format":"uuid"},"caller_display_name":{"type":"string"},"caller_status":{"type":"string","enum":["unavailable"]},"scorer_ref":{"type":"string","format":"uuid"},"scorer_display_name":{"type":"string"},"scorer_status":{"type":"string","enum":["unavailable"]},"tool_policy":{"type":"string"},"runtime_profile":{"$ref":"#/components/schemas/EvalRuntimeProfile"}}},"EvalRuntimeProfileInput":{"type":"object","additionalProperties":true,"description":"Evaluation behavior and optional platform catalog references. Internal model, provider and upstream voice names are not accepted; select the corresponding catalog UUID.","properties":{"agent_model_ref":{"type":"string","format":"uuid","description":"Platform catalog reference for this selection."},"caller_model_ref":{"type":"string","format":"uuid","description":"Platform catalog reference for this selection."},"scorer_model_ref":{"type":"string","format":"uuid","description":"Platform catalog reference for this selection."},"caller_tts_provider_ref":{"type":"string","format":"uuid","description":"Platform catalog reference for this selection."},"caller_voice_ref":{"type":"string","format":"uuid","description":"Platform catalog reference for this selection."},"pass_threshold":{"type":"number"},"run_pass_threshold":{"type":"number"},"caller_language":{"type":"string"},"caller_stt_language":{"type":"string"},"caller_stt_lang":{"type":"string"},"tool_mocks":{"type":"object","additionalProperties":true},"max_turns":{"type":"integer"},"max_tokens":{"type":"integer"},"temperature":{"type":"number"},"timeout_seconds":{"type":"number"},"caller_voice_settings":{"$ref":"#/components/schemas/EvalCallerVoiceSettingsInput"}}},"EvalRuntimeProfile":{"type":"object","additionalProperties":false,"description":"Customer-facing effective evaluation profile. Model and voice selections use platform UUIDs and catalog display names; unresolved legacy selections are marked unavailable. Internal execution identities are not returned.","properties":{"agent_model_ref":{"type":"string","format":"uuid","description":"Platform catalog reference for this selection."},"caller_model_ref":{"type":"string","format":"uuid","description":"Platform catalog reference for this selection."},"scorer_model_ref":{"type":"string","format":"uuid","description":"Platform catalog reference for this selection."},"caller_tts_provider_ref":{"type":"string","format":"uuid","description":"Platform catalog reference for this selection."},"caller_voice_ref":{"type":"string","format":"uuid","description":"Platform catalog reference for this selection."},"agent_model_display_name":{"type":"string","readOnly":true},"agent_model_status":{"type":"string","enum":["unavailable"],"readOnly":true},"caller_model_display_name":{"type":"string","readOnly":true},"caller_model_status":{"type":"string","enum":["unavailable"],"readOnly":true},"scorer_model_display_name":{"type":"string","readOnly":true},"scorer_model_status":{"type":"string","enum":["unavailable"],"readOnly":true},"caller_tts_provider_display_name":{"type":"string","readOnly":true},"caller_tts_provider_status":{"type":"string","enum":["unavailable"],"readOnly":true},"caller_voice_display_name":{"type":"string","readOnly":true},"caller_voice_status":{"type":"string","enum":["unavailable"],"readOnly":true},"pass_threshold":{"type":"number"},"run_pass_threshold":{"type":"number"},"caller_language":{"type":"string"},"caller_stt_language":{"type":"string"},"caller_stt_lang":{"type":"string"},"tool_mocks":{"type":"object","additionalProperties":true},"max_turns":{"type":"integer"},"max_tokens":{"type":"integer"},"temperature":{"type":"number"},"timeout_seconds":{"type":"number"},"caller_voice_settings":{"$ref":"#/components/schemas/AgentProviderVoiceSettings"}}},"EvalJSONObject":{"type":"object","additionalProperties":true,"description":"Bounded product-defined JSON object. Its nested keys depend on the selected eval definition, worker, model, or rubric."},"EvalExecutionErrorCode":{"type":"string","enum":["eval_execution_failed","eval_timed_out","eval_agent_opening_failed","eval_persona_crashed"],"description":"Stable public classification. The worker's own message, scrubbed of credentials and personal data, is returned separately as error_detail."},"EvalGenerationErrorCode":{"type":"string","enum":["eval_generation_failed"],"description":"Stable public generation failure classification."},"EvalSuiteListItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{1,63}$"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"version":{"type":"integer","format":"int64","minimum":1},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","slug","name","description","version","archived_at","created_at","updated_at"],"example":{"id":"11111111-1111-4111-8111-111111111111","slug":"support_regression","name":"Support regression","description":"Core escalation and refund scenarios.","version":3,"archived_at":null,"created_at":"2026-07-21T08:00:00Z","updated_at":"2026-07-21T09:00:00Z"}},"EvalSuite":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{1,63}$"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"version":{"type":"integer","format":"int64","minimum":1},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"definition":{"$ref":"#/components/schemas/EvalJSONObject","description":"Open JSON object; the encoded value must be at most 1048576 bytes."}},"required":["id","slug","name","description","version","archived_at","created_at","updated_at","definition"],"example":{"id":"11111111-1111-4111-8111-111111111111","slug":"support_regression","name":"Support regression","description":"Core escalation and refund scenarios.","version":3,"archived_at":null,"created_at":"2026-07-21T08:00:00Z","updated_at":"2026-07-21T09:00:00Z","definition":{"schema_version":1}}},"EvalSuiteListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","maxItems":200,"items":{"$ref":"#/components/schemas/EvalSuiteListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"EvalSuiteCreateRequest":{"type":"object","additionalProperties":false,"properties":{"slug":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{1,63}$"},"name":{"type":"string","minLength":1,"maxLength":200,"description":"Limited to 200 UTF-8 encoded bytes; maxLength is a generator hint."},"description":{"type":["string","null"],"maxLength":2000,"description":"Limited to 2000 UTF-8 encoded bytes; maxLength is a generator hint."},"definition":{"$ref":"#/components/schemas/EvalJSONObject","description":"Optional; defaults to {}. Holds only the legacy (v1) suite fields; a v2 suite keeps its scenarios (/eval-suites/{id}/scenarios) and checks (/eval-suites/{id}/checks) as their own resources and needs nothing here. Recognised keys, all optional: rubric (array of at most 500 {name, description, ...} objects) — legacy LLM rubric criteria scored per conversation; assertions (object) — legacy structured assertions applied to every scenario (expected_path, expected_terminal_node, expected_tools_called, must_not_call_tools), overridden per scenario by the same key; personas (array of at most 5000 {id, label, persona, scenario, assertions} objects) — mirrored into first-class scenarios on write. Other keys are stored and ignored. The encoded value must be at most 1048576 bytes."}},"required":["slug","name"],"example":{"slug":"support_regression","name":"Support regression","description":"Core escalation and refund scenarios."}},"EvalSuitePatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Limited to 200 UTF-8 encoded bytes; maxLength is a generator hint."},"description":{"type":["string","null"],"maxLength":2000,"description":"Limited to 2000 UTF-8 encoded bytes; maxLength is a generator hint."},"definition":{"$ref":"#/components/schemas/EvalJSONObject","description":"Replaces the stored legacy definition; same keys as EvalSuiteCreateRequest.definition. Newly listed personas are mirrored into scenarios; existing scenarios are never removed by this field. The encoded value must be at most 1048576 bytes."}},"example":{"description":"Expanded regression coverage."}},"EvalScenario":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string","minLength":1,"description":"Stable stored handle. Historical compatibility rows predate the public create regex, so readers must not infer a character pattern."},"label":{"type":"string","maxLength":200,"description":"Limited to 200 UTF-8 encoded bytes; maxLength is a generator hint."},"persona_text":{"type":"string","maxLength":20000,"description":"Limited to 20000 UTF-8 encoded bytes; maxLength is a generator hint."},"scenario_text":{"type":"string","maxLength":20000,"description":"Limited to 20000 UTF-8 encoded bytes; maxLength is a generator hint."},"assertions":{"oneOf":[{"$ref":"#/components/schemas/EvalJSONObject"},{"type":"null"}],"description":"Stored assertion object; scenario mutation inputs are limited to 262144 encoded bytes."},"source":{"type":"string","enum":["manual","generated"]},"generation_job_id":{"type":["string","null"],"format":"uuid"},"position":{"type":"integer","minimum":0},"version":{"type":"integer","format":"int64","minimum":1},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","slug","label","persona_text","scenario_text","assertions","source","generation_job_id","position","version","archived_at","created_at","updated_at"],"example":{"id":"22222222-2222-4222-8222-222222222222","slug":"angry_refund","label":"Angry refund request","persona_text":"The caller is frustrated but cooperative.","scenario_text":"Request a refund, then ask for a supervisor if denied.","assertions":{"escalation_offered":true},"source":"manual","generation_job_id":null,"position":0,"version":1,"archived_at":null,"created_at":"2026-07-21T08:05:00Z","updated_at":"2026-07-21T08:05:00Z"}},"EvalScenarioListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","maxItems":200,"items":{"$ref":"#/components/schemas/EvalScenario"}},"next_cursor":{"type":["string","null"]},"total":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":1,"maximum":200},"offset":{"type":"integer","const":0,"description":"Public API cursor pagination always emits zero."}},"required":["data","next_cursor","total","limit","offset"]},"EvalScenarioCreateRequest":{"type":"object","additionalProperties":false,"properties":{"slug":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9_]{2,64}$"},"label":{"type":"string","maxLength":200,"default":"","description":"Limited to 200 UTF-8 encoded bytes; maxLength is a generator hint."},"persona_text":{"type":"string","minLength":1,"maxLength":20000,"description":"Limited to 20000 UTF-8 encoded bytes; maxLength is a generator hint."},"scenario_text":{"type":"string","minLength":1,"maxLength":20000,"description":"Limited to 20000 UTF-8 encoded bytes; maxLength is a generator hint."},"assertions":{"oneOf":[{"$ref":"#/components/schemas/EvalJSONObject"},{"type":"null"}],"description":"Optional assertion object limited to 262144 encoded bytes."}},"required":["slug","persona_text","scenario_text"],"example":{"slug":"angry_refund","label":"Angry refund request","persona_text":"The caller is frustrated but cooperative.","scenario_text":"Request a refund, then ask for a supervisor if denied.","assertions":{"escalation_offered":true}}},"EvalScenarioPatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"label":{"type":"string","maxLength":200,"description":"Limited to 200 UTF-8 encoded bytes; maxLength is a generator hint."},"persona_text":{"type":"string","minLength":1,"maxLength":20000,"description":"Limited to 20000 UTF-8 encoded bytes; maxLength is a generator hint."},"scenario_text":{"type":"string","minLength":1,"maxLength":20000,"description":"Limited to 20000 UTF-8 encoded bytes; maxLength is a generator hint."},"assertions":{"oneOf":[{"$ref":"#/components/schemas/EvalJSONObject"},{"type":"null"}],"description":"Nullable assertion object limited to 262144 encoded bytes when supplied."}},"example":{"label":"Escalating refund request"}},"EvalGenerationRequest":{"type":"object","additionalProperties":false,"properties":{"agent_id":{"type":"string","format":"uuid"},"count":{"type":"integer","minimum":1,"maximum":5000},"context_text":{"type":"string","maxLength":20000,"default":"","description":"Limited to 20000 UTF-8 encoded bytes; maxLength is a generator hint."}},"required":["agent_id","count"],"example":{"agent_id":"33333333-3333-4333-8333-333333333333","count":25,"context_text":"Focus on refund escalation and account verification."}},"EvalGenerationAccepted":{"type":"object","additionalProperties":false,"properties":{"job_id":{"type":"string","format":"uuid"},"requested_count":{"type":"integer","minimum":1,"maximum":5000}},"required":["job_id","requested_count"],"example":{"job_id":"77777777-7777-4777-8777-777777777777","requested_count":25}},"EvalGenerationJob":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"suite_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","running","done","failed","cancelled"]},"requested_count":{"type":"integer","minimum":1,"maximum":5000},"completed_count":{"type":"integer","minimum":0,"maximum":5000},"context_text":{"type":["string","null"],"maxLength":20000},"error":{"type":["string","null"],"enum":["generation failed",null],"description":"Sanitized public message; provider or prompt details are never returned."},"error_code":{"oneOf":[{"$ref":"#/components/schemas/EvalGenerationErrorCode"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"}},"required":["id","suite_id","agent_id","status","requested_count","completed_count","context_text","error","created_at","started_at","ended_at"],"example":{"id":"77777777-7777-4777-8777-777777777777","suite_id":"11111111-1111-4111-8111-111111111111","agent_id":"33333333-3333-4333-8333-333333333333","status":"running","requested_count":25,"completed_count":8,"context_text":"Focus on refund escalation and account verification.","error":null,"error_code":null,"created_at":"2026-07-21T09:10:00Z","started_at":"2026-07-21T09:10:01Z","ended_at":null}},"EvalRunMode":{"type":"string","description":"Mode of an existing run. `audio` appears only on historical runs and cannot be requested; new runs are always `text`.","enum":["audio","text"]},"EvalRunCreateMode":{"type":"string","description":"Mode to run. Only `text` is supported.","enum":["text"]},"EvalToolPolicy":{"type":"string","enum":["dry_run","mocked","live"]},"EvalRunStatus":{"type":"string","enum":["queued","running","done","failed","cancelled"]},"EvalRunListItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"suite_id":{"type":"string","format":"uuid"},"suite_slug":{"type":"string"},"suite_name":{"type":"string"},"agent_version_id":{"type":["string","null"],"format":"uuid"},"mode":{"$ref":"#/components/schemas/EvalRunMode"},"tool_policy":{"$ref":"#/components/schemas/EvalToolPolicy"},"status":{"$ref":"#/components/schemas/EvalRunStatus"},"total":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"started_at":{"type":["string","null"],"format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"duration_sec":{"type":["number","null"],"format":"float","minimum":0},"created_at":{"type":"string","format":"date-time"},"cancel_requested_at":{"type":["string","null"],"format":"date-time"},"score_weighted":{"description":"The run's weighted score, 0-100, as the worker computed it. Null while the run is still going or when no check scored it.","type":["number","null"],"format":"float","minimum":0,"maximum":100},"passed":{"description":"The run's verdict. Already accounts for blocking checks, so it is not derivable from score_weighted alone.","type":["boolean","null"]},"unmocked_tool_calls":{"description":"Tool calls that reached a real upstream. Non-zero on a run whose tool_policy asked for mocks means the result is not trustworthy.","type":"integer","minimum":0},"pass_rate":{"description":"Share of conversations that passed, 0-1. This is what `passed` is derived from — `score_weighted` is average partial credit and can be high on a run that failed.","type":["number","null"],"format":"float","minimum":0,"maximum":1}},"required":["id","suite_id","suite_slug","suite_name","mode","tool_policy","status","total","completed","created_at"],"example":{"id":"55555555-5555-4555-8555-555555555555","suite_id":"11111111-1111-4111-8111-111111111111","suite_slug":"support_regression","suite_name":"Support regression","pathway_name":"support_agent","agent_version_id":"44444444-4444-4444-8444-444444444444","mode":"text","tool_policy":"dry_run","status":"running","total":25,"completed":8,"started_at":"2026-07-21T09:15:00Z","ended_at":null,"duration_sec":null,"created_at":"2026-07-21T09:14:59Z","cancel_requested_at":null}},"EvalRunListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/EvalRunListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"EvalRunScenarioSummary":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":64},"label":{"type":["string","null"],"maxLength":200}},"required":["id"]},"EvalRunCallSummary":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"scenario_id":{"type":"string"},"scenario_label":{"type":["string","null"]},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"duration_sec":{"type":["number","null"],"format":"float","minimum":0},"overall_score":{"type":["number","null"],"format":"float"},"score_weighted":{"type":["number","null"],"format":"float","description":"The v2 weighted check score, 0-100. Null for a conversation no check scored."},"passed":{"type":["boolean","null"]},"timed_out":{"type":"boolean"},"end_reason":{"type":["string","null"]},"error":{"type":["string","null"],"enum":["eval execution failed","eval execution timed out","the agent failed to produce its opening turn","the simulated caller crashed",null]},"error_code":{"oneOf":[{"$ref":"#/components/schemas/EvalExecutionErrorCode"},{"type":"null"}]},"error_detail":{"type":["string","null"],"maxLength":2049,"description":"Internal worker diagnostics are withheld from customer responses. Use the classified error and support identifiers."},"checks_total":{"description":"Checks that produced a verdict for this conversation.","type":"integer","minimum":0},"checks_passed":{"description":"How many of those verdicts passed.","type":"integer","minimum":0},"failed_checks":{"description":"The checks this conversation failed, blocking ones first. Empty when it broke nothing. `passed` says how the conversation did; this says what did it.","type":"array","items":{"$ref":"#/components/schemas/EvalRunCallCheckMark"}},"abstained_checks":{"description":"Slugs of checks that could not apply to this conversation. Excluded from the score — not failures.","type":"array","items":{"type":"string"}}},"required":["id","scenario_id","started_at","timed_out","checks_total","checks_passed","failed_checks","abstained_checks"]},"EvalRunCallCheckMark":{"type":"object","additionalProperties":false,"properties":{"slug":{"type":"string"},"blocking":{"description":"A blocking failure fails the conversation whatever it scored.","type":"boolean"}},"required":["slug","blocking"]},"EvalCheck":{"type":"object","additionalProperties":false,"description":"One library check: the list projection plus its kind-specific config.","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{1,63}$"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"kind":{"type":"string","enum":["judge","tool","flow"]},"source_template_key":{"type":["string","null"],"maxLength":128},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"config":{"$ref":"#/components/schemas/EvalCheckStoredConfig"}},"required":["id","slug","name","description","kind","source_template_key","archived_at","created_at","updated_at","config"],"example":{"id":"11111111-1111-4111-8111-111111111111","slug":"never_cold_transfers","name":"Never cold-transfers","description":"The cold-transfer tool is never called.","kind":"tool","source_template_key":"never-cold-transfers","archived_at":null,"created_at":"2026-08-01T08:00:00Z","updated_at":"2026-08-01T09:00:00Z","config":{"rule":"not_called","tool":"transfer_to_human_cold"}}},"EvalCheckCreateRequest":{"type":"object","additionalProperties":false,"properties":{"slug":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{1,63}$"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"kind":{"type":"string","enum":["judge","tool","flow"]},"config":{"$ref":"#/components/schemas/EvalCheckConfigInput"},"template_key":{"type":["string","null"],"maxLength":128,"description":"Records which template the check started from. It does not copy the template's config — send config too (list_eval_check_templates returns it)."}},"required":["slug","name","kind","config"],"example":{"slug":"verifies_before_disclosing","name":"Verifies before disclosing","kind":"tool","config":{"rule":"called_before","tool":"verify_identity","other_tool":"lookup_policy"}}},"EvalCheckAttachment":{"type":"object","additionalProperties":false,"description":"One library check bound to a suite or a scenario. weight and blocking live on the binding rather than the check because the same assertion matters differently in different suites.","required":["check_id","slug","name","kind","weight","blocking","position"],"properties":{"check_id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["judge","tool","flow"]},"weight":{"type":"integer","minimum":0,"maximum":100},"blocking":{"type":"boolean","description":"A failure fails the whole conversation regardless of the score."},"position":{"type":"integer","description":"Display order. Always zero for scenario-level attachments."},"config":{"$ref":"#/components/schemas/EvalCheckStoredConfig"}}},"EvalCheckAttachmentListResponse":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EvalCheckAttachment"}}}},"EvalCheckAttachmentInput":{"type":"object","additionalProperties":false,"required":["check_id"],"properties":{"check_id":{"type":"string","format":"uuid"},"weight":{"type":["integer","null"],"minimum":0,"maximum":100,"description":"Defaults to 100 when omitted or null."},"blocking":{"type":["boolean","null"],"description":"Defaults to false when omitted or null."}}},"EvalCheckAttachmentsRequest":{"type":"object","additionalProperties":false,"required":["checks"],"properties":{"checks":{"type":"array","maxItems":100,"description":"The complete attachment set. An empty array detaches everything.","items":{"$ref":"#/components/schemas/EvalCheckAttachmentInput"}}}},"EvalCheckConfigInput":{"description":"A check's assertion. Exactly one shape applies: a judge check takes EvalCheckJudgeConfig (no rule); a tool or flow check takes the schema for its `rule`. Every key is closed — the server rejects an unknown key, a missing required key, or a wrong type with 422 validation_failed and the field path (for example config.expected), because the evaluator would otherwise ignore the key and silently grade against a default. Tool rules: called (tool, phase?, min?, max?), not_called (tool, phase?), called_with (tool, args, phase?, match?), called_before (tool, other_tool), succeeded (tool, phase?), failed (tool, phase?, error_kind?), result_matches (tool, expected, jsonpath?, phase?), no_unexpected_tools (allowlist), phase (tool, expected_phase). Flow rules: terminal_node (value), path_contains (value), slot_recorded (slot, expected?), max_turns (max), end_reason (value), transcript_matches (pattern, speaker?, expect?), pre_call_status (tool, status?), pre_call_var_set (value), pre_call_aborted (expect?). A few rules also accept a legacy spelling of their key (node, var, value) — send one spelling, not both.","oneOf":[{"$ref":"#/components/schemas/EvalCheckJudgeConfigInput"},{"$ref":"#/components/schemas/EvalCheckToolCalledConfig"},{"$ref":"#/components/schemas/EvalCheckToolNotCalledConfig"},{"$ref":"#/components/schemas/EvalCheckToolCalledWithConfig"},{"$ref":"#/components/schemas/EvalCheckToolCalledBeforeConfig"},{"$ref":"#/components/schemas/EvalCheckToolSucceededConfig"},{"$ref":"#/components/schemas/EvalCheckToolFailedConfig"},{"$ref":"#/components/schemas/EvalCheckToolResultMatchesConfig"},{"$ref":"#/components/schemas/EvalCheckToolNoUnexpectedToolsConfig"},{"$ref":"#/components/schemas/EvalCheckToolPhaseConfig"},{"$ref":"#/components/schemas/EvalCheckFlowTerminalNodeConfig"},{"$ref":"#/components/schemas/EvalCheckFlowPathContainsConfig"},{"$ref":"#/components/schemas/EvalCheckFlowSlotRecordedConfig"},{"$ref":"#/components/schemas/EvalCheckFlowMaxTurnsConfig"},{"$ref":"#/components/schemas/EvalCheckFlowEndReasonConfig"},{"$ref":"#/components/schemas/EvalCheckFlowTranscriptMatchesConfig"},{"$ref":"#/components/schemas/EvalCheckFlowPreCallStatusConfig"},{"$ref":"#/components/schemas/EvalCheckFlowPreCallVarSetConfig"},{"$ref":"#/components/schemas/EvalCheckFlowPreCallAbortedConfig"}],"example":{"rule":"not_called","tool":"transfer_to_human_cold"}},"EvalCheckJudgeConfigInput":{"type":"object","additionalProperties":false,"title":"judge","description":"An LLM grades the transcript and tool trace against an instruction.","properties":{"model_ref":{"type":"string","description":"Platform LLM catalog UUID for the judge. Omit to preserve an existing selection; an empty string clears it."},"instruction":{"type":"string","minLength":1,"description":"What to grade, in plain language. The judge grades only this dimension."},"levels":{"type":"array","maxItems":5,"items":{"$ref":"#/components/schemas/EvalCheckJudgeLevel"},"description":"Graded ladder, worst first: 2–5 objects {key, label?, description?} with unique keys. Omit (or send []) for pass/fail."},"target_levels":{"type":"array","items":{"type":"string","minLength":1},"description":"Level keys that count as passing. Each must be a key in levels (or pass/fail when levels is omitted). Defaults to the last level."},"modality":{"type":"string","minLength":1,"enum":["text","audio","any"],"description":"What the judge grades. audio abstains on runs with no recording. Defaults to any."},"model":{"type":"string","deprecated":true,"description":"Legacy operator-only override. Customer requests use model_ref."}},"required":["instruction"],"example":{"instruction":"Pass only if the agent read the recording disclosure before collecting any information.","modality":"text"}},"EvalCheckConfig":{"description":"A check's assertion. Exactly one shape applies: a judge check takes EvalCheckJudgeConfig (no rule); a tool or flow check takes the schema for its `rule`. Every key is closed — the server rejects an unknown key, a missing required key, or a wrong type with 422 validation_failed and the field path (for example config.expected), because the evaluator would otherwise ignore the key and silently grade against a default. Tool rules: called (tool, phase?, min?, max?), not_called (tool, phase?), called_with (tool, args, phase?, match?), called_before (tool, other_tool), succeeded (tool, phase?), failed (tool, phase?, error_kind?), result_matches (tool, expected, jsonpath?, phase?), no_unexpected_tools (allowlist), phase (tool, expected_phase). Flow rules: terminal_node (value), path_contains (value), slot_recorded (slot, expected?), max_turns (max), end_reason (value), transcript_matches (pattern, speaker?, expect?), pre_call_status (tool, status?), pre_call_var_set (value), pre_call_aborted (expect?). A few rules also accept a legacy spelling of their key (node, var, value) — send one spelling, not both.","oneOf":[{"$ref":"#/components/schemas/EvalCheckJudgeConfig"},{"$ref":"#/components/schemas/EvalCheckToolCalledConfig"},{"$ref":"#/components/schemas/EvalCheckToolNotCalledConfig"},{"$ref":"#/components/schemas/EvalCheckToolCalledWithConfig"},{"$ref":"#/components/schemas/EvalCheckToolCalledBeforeConfig"},{"$ref":"#/components/schemas/EvalCheckToolSucceededConfig"},{"$ref":"#/components/schemas/EvalCheckToolFailedConfig"},{"$ref":"#/components/schemas/EvalCheckToolResultMatchesConfig"},{"$ref":"#/components/schemas/EvalCheckToolNoUnexpectedToolsConfig"},{"$ref":"#/components/schemas/EvalCheckToolPhaseConfig"},{"$ref":"#/components/schemas/EvalCheckFlowTerminalNodeConfig"},{"$ref":"#/components/schemas/EvalCheckFlowPathContainsConfig"},{"$ref":"#/components/schemas/EvalCheckFlowSlotRecordedConfig"},{"$ref":"#/components/schemas/EvalCheckFlowMaxTurnsConfig"},{"$ref":"#/components/schemas/EvalCheckFlowEndReasonConfig"},{"$ref":"#/components/schemas/EvalCheckFlowTranscriptMatchesConfig"},{"$ref":"#/components/schemas/EvalCheckFlowPreCallStatusConfig"},{"$ref":"#/components/schemas/EvalCheckFlowPreCallVarSetConfig"},{"$ref":"#/components/schemas/EvalCheckFlowPreCallAbortedConfig"}],"example":{"rule":"not_called","tool":"transfer_to_human_cold"}},"EvalCheckStoredConfig":{"type":"object","additionalProperties":true,"description":"A check's config exactly as stored. Every check created or edited since config validation shipped conforms to EvalCheckConfig; a check last edited before that may still carry keys outside it until its config is next updated (the update is validated in full).","example":{"rule":"not_called","tool":"transfer_to_human_cold"}},"EvalCheckJudgeLevel":{"type":"object","additionalProperties":false,"description":"One rung of a graded judge's ladder.","properties":{"key":{"type":"string","minLength":1,"description":"Unique within the ladder; what target_levels and verdicts refer to."},"label":{"type":"string","description":"Display name. Defaults to key."},"description":{"type":"string","description":"What earns this level; shown to the judge."}},"required":["key"]},"EvalCheckJudgeConfig":{"type":"object","additionalProperties":false,"title":"judge","description":"An LLM grades the transcript and tool trace against an instruction.","properties":{"model_ref":{"type":"string","description":"Platform LLM catalog UUID for the judge. Omit to preserve an existing selection; an empty string clears it."},"model_display_name":{"type":"string","readOnly":true},"model_status":{"type":"string","enum":["unavailable"],"readOnly":true},"instruction":{"type":"string","minLength":1,"description":"What to grade, in plain language. The judge grades only this dimension."},"levels":{"type":"array","maxItems":5,"items":{"$ref":"#/components/schemas/EvalCheckJudgeLevel"},"description":"Graded ladder, worst first: 2–5 objects {key, label?, description?} with unique keys. Omit (or send []) for pass/fail."},"target_levels":{"type":"array","items":{"type":"string","minLength":1},"description":"Level keys that count as passing. Each must be a key in levels (or pass/fail when levels is omitted). Defaults to the last level."},"modality":{"type":"string","minLength":1,"enum":["text","audio","any"],"description":"What the judge grades. audio abstains on runs with no recording. Defaults to any."},"model":{"type":"string","deprecated":true,"description":"Legacy operator-only override. Customer requests use model_ref."}},"required":["instruction"],"example":{"instruction":"Pass only if the agent read the recording disclosure before collecting any information.","modality":"text"}},"EvalCheckToolCalledConfig":{"type":"object","additionalProperties":false,"title":"tool / called","description":"The tool was called between min and max times.","properties":{"rule":{"type":"string","enum":["called"]},"tool":{"type":"string","minLength":1,"description":"Tool name as it appears in the trace. Built-ins also match their per-destination variants."},"phase":{"type":"string","minLength":1,"enum":["pre_call","in_call"],"description":"Only count calls made in this phase. Omit to count every phase."},"min":{"type":"integer","minimum":0,"description":"Fewest calls that pass. Defaults to 1."},"max":{"type":"integer","minimum":0,"description":"Most calls that pass. Omit for no upper bound."}},"required":["rule","tool"],"example":{"max":2,"min":1,"rule":"called","tool":"lookup_policy"}},"EvalCheckToolNotCalledConfig":{"type":"object","additionalProperties":false,"title":"tool / not_called","description":"The tool was never called.","properties":{"rule":{"type":"string","enum":["not_called"]},"tool":{"type":"string","minLength":1,"description":"Tool that must never run."},"phase":{"type":"string","minLength":1,"enum":["pre_call","in_call"],"description":"Only count calls made in this phase. Omit to count every phase."}},"required":["rule","tool"],"example":{"rule":"not_called","tool":"transfer_to_human_cold"}},"EvalCheckToolCalledWithConfig":{"type":"object","additionalProperties":false,"title":"tool / called_with","description":"The tool was called at least once with the expected arguments.","properties":{"rule":{"type":"string","enum":["called_with"]},"tool":{"type":"string","minLength":1,"description":"Tool whose arguments are checked."},"phase":{"type":"string","minLength":1,"enum":["pre_call","in_call"],"description":"Only count calls made in this phase. Omit to count every phase."},"args":{"type":"object","minProperties":1,"additionalProperties":true,"description":"Expected arguments, compared as strings. At least one key."},"match":{"type":"string","minLength":1,"enum":["subset","exact"],"description":"subset (default): the listed arguments match; exact: the call's arguments equal args exactly."}},"required":["rule","tool","args"],"example":{"args":{"policy_number":"PN-1001"},"rule":"called_with","tool":"lookup_policy"}},"EvalCheckToolCalledBeforeConfig":{"type":"object","additionalProperties":false,"title":"tool / called_before","description":"The first call to tool came before the first call to other_tool.","properties":{"rule":{"type":"string","enum":["called_before"]},"tool":{"type":"string","minLength":1,"description":"Tool that must run first."},"other_tool":{"type":"string","minLength":1,"description":"Tool that must run after. If it never runs the check abstains."}},"required":["rule","tool","other_tool"],"example":{"other_tool":"lookup_policy","rule":"called_before","tool":"verify_identity"}},"EvalCheckToolSucceededConfig":{"type":"object","additionalProperties":false,"title":"tool / succeeded","description":"At least one call to the tool succeeded.","properties":{"rule":{"type":"string","enum":["succeeded"]},"tool":{"type":"string","minLength":1,"description":"Tool that must succeed."},"phase":{"type":"string","minLength":1,"enum":["pre_call","in_call"],"description":"Only count calls made in this phase. Omit to count every phase."}},"required":["rule","tool"],"example":{"rule":"succeeded","tool":"lookup_policy"}},"EvalCheckToolFailedConfig":{"type":"object","additionalProperties":false,"title":"tool / failed","description":"At least one call to the tool failed (optionally with a specific error kind).","properties":{"rule":{"type":"string","enum":["failed"]},"tool":{"type":"string","minLength":1,"description":"Tool that must fail."},"phase":{"type":"string","minLength":1,"enum":["pre_call","in_call"],"description":"Only count calls made in this phase. Omit to count every phase."},"error_kind":{"type":"string","minLength":1,"enum":["network","timeout","http_4xx","http_5xx","parse","auth","config","other"],"description":"Require this failure category. Omit for any failure."}},"required":["rule","tool"],"example":{"error_kind":"timeout","rule":"failed","tool":"lookup_policy"}},"EvalCheckToolResultMatchesConfig":{"type":"object","additionalProperties":false,"title":"tool / result_matches","description":"A call's result has expected at jsonpath.","properties":{"rule":{"type":"string","enum":["result_matches"]},"tool":{"type":"string","minLength":1,"description":"Tool whose result is inspected."},"phase":{"type":"string","minLength":1,"enum":["pre_call","in_call"],"description":"Only count calls made in this phase. Omit to count every phase."},"jsonpath":{"type":"string","minLength":1,"description":"Path into the result body, $-rooted ($.a.b[0]). Defaults to $."},"expected":{"type":["string","number","boolean"],"description":"Value to find at jsonpath, compared as a string."}},"required":["rule","tool","expected"],"example":{"expected":"active","jsonpath":"$.status","rule":"result_matches","tool":"lookup_policy"}},"EvalCheckToolNoUnexpectedToolsConfig":{"type":"object","additionalProperties":false,"title":"tool / no_unexpected_tools","description":"Every tool that ran is on the allowlist.","properties":{"rule":{"type":"string","enum":["no_unexpected_tools"]},"allowlist":{"type":"array","items":{"type":"string","minLength":1},"description":"Tool names allowed to run. An empty list fails as soon as any tool runs."}},"required":["rule","allowlist"],"example":{"allowlist":["verify_identity","lookup_policy"],"rule":"no_unexpected_tools"}},"EvalCheckToolPhaseConfig":{"type":"object","additionalProperties":false,"title":"tool / phase","description":"Every call to the tool ran in the expected phase.","properties":{"rule":{"type":"string","enum":["phase"]},"tool":{"type":"string","minLength":1,"description":"Tool whose phase is checked."},"expected_phase":{"type":"string","minLength":1,"enum":["pre_call","in_call"],"description":"Phase every call must run in."},"phase":{"type":"string","minLength":1,"enum":["pre_call","in_call"],"description":"Legacy spelling of expected_phase."}},"required":["rule","tool"],"oneOf":[{"required":["expected_phase"]},{"required":["phase"]}],"example":{"expected_phase":"pre_call","rule":"phase","tool":"lookup_account"}},"EvalCheckFlowTerminalNodeConfig":{"type":"object","additionalProperties":false,"title":"flow / terminal_node","description":"The pathway ended on this node. Abstains for prompt agents.","properties":{"rule":{"type":"string","enum":["terminal_node"]},"value":{"type":"string","minLength":1,"description":"Node id the conversation must end on."},"node":{"type":"string","minLength":1,"description":"Legacy spelling of value."}},"required":["rule"],"oneOf":[{"required":["value"]},{"required":["node"]}],"example":{"rule":"terminal_node","value":"resolved"}},"EvalCheckFlowPathContainsConfig":{"type":"object","additionalProperties":false,"title":"flow / path_contains","description":"The pathway visited this node. Abstains for prompt agents.","properties":{"rule":{"type":"string","enum":["path_contains"]},"value":{"type":"string","minLength":1,"description":"Node id that must be visited."},"node":{"type":"string","minLength":1,"description":"Legacy spelling of value."}},"required":["rule"],"oneOf":[{"required":["value"]},{"required":["node"]}],"example":{"rule":"path_contains","value":"verify_identity"}},"EvalCheckFlowSlotRecordedConfig":{"type":"object","additionalProperties":false,"title":"flow / slot_recorded","description":"A pathway slot was recorded (optionally with a specific value).","properties":{"rule":{"type":"string","enum":["slot_recorded"]},"slot":{"type":"string","minLength":1,"description":"Slot name that must be recorded."},"value":{"type":"string","minLength":1,"description":"Legacy spelling of slot."},"expected":{"type":["string","number","boolean"],"description":"Require this recorded value, compared as a string."}},"required":["rule"],"oneOf":[{"required":["slot"]},{"required":["value"]}],"example":{"rule":"slot_recorded","slot":"policy_number"}},"EvalCheckFlowMaxTurnsConfig":{"type":"object","additionalProperties":false,"title":"flow / max_turns","description":"The conversation ran at most max turns.","properties":{"rule":{"type":"string","enum":["max_turns"]},"max":{"type":"integer","minimum":1,"description":"Most transcript turns that pass."},"value":{"type":"integer","minimum":1,"description":"Legacy spelling of max."}},"required":["rule"],"oneOf":[{"required":["max"]},{"required":["value"]}],"example":{"max":20,"rule":"max_turns"}},"EvalCheckFlowEndReasonConfig":{"type":"object","additionalProperties":false,"title":"flow / end_reason","description":"The conversation ended for this reason.","properties":{"rule":{"type":"string","enum":["end_reason"]},"value":{"type":"string","minLength":1,"description":"How the conversation ended: agent_ended (the agent hung up or handed off), caller_ended (the simulated caller hung up), pathway_completed, timed_out, disconnected or pre_call_abort. Runs record the code with optional detail after a colon (caller_ended: goal achieved); the check matches the code. When grading real calls, the call's outcome."}},"required":["rule","value"],"example":{"rule":"end_reason","value":"agent_ended"}},"EvalCheckFlowTranscriptMatchesConfig":{"type":"object","additionalProperties":false,"title":"flow / transcript_matches","description":"A case-insensitive regular expression is (or is not) found in the transcript.","properties":{"rule":{"type":"string","enum":["transcript_matches"]},"pattern":{"type":"string","minLength":1,"description":"Python regular expression, matched case-insensitively per turn."},"speaker":{"type":"string","minLength":1,"description":"Only search turns by this speaker as recorded in the transcript. Omit for every turn."},"expect":{"type":"boolean","description":"true (default): the pattern must appear; false: it must not."}},"required":["rule","pattern"],"example":{"expect":true,"pattern":"\\brecorded\\b","rule":"transcript_matches"}},"EvalCheckFlowPreCallStatusConfig":{"type":"object","additionalProperties":false,"title":"flow / pre_call_status","description":"A pre-call tool finished with this status.","properties":{"rule":{"type":"string","enum":["pre_call_status"]},"tool":{"type":"string","minLength":1,"description":"Pre-call tool slug."},"status":{"type":"string","minLength":1,"enum":["success","failed","timeout","missing_vars","config"],"description":"Expected status. Defaults to success."},"value":{"type":"string","minLength":1,"enum":["success","failed","timeout","missing_vars","config"],"description":"Legacy spelling of status."}},"required":["rule","tool"],"not":{"required":["status","value"]},"example":{"rule":"pre_call_status","status":"success","tool":"lookup_account"}},"EvalCheckFlowPreCallVarSetConfig":{"type":"object","additionalProperties":false,"title":"flow / pre_call_var_set","description":"A pre-call variable rendered non-empty.","properties":{"rule":{"type":"string","enum":["pre_call_var_set"]},"value":{"type":"string","minLength":1,"description":"Variable as <tool_slug>.<name>, the part after tools. in {{tools.X.Y}}."},"var":{"type":"string","minLength":1,"description":"Legacy spelling of value."}},"required":["rule"],"oneOf":[{"required":["value"]},{"required":["var"]}],"example":{"rule":"pre_call_var_set","value":"lookup_account.first_name"}},"EvalCheckFlowPreCallAbortedConfig":{"type":"object","additionalProperties":false,"title":"flow / pre_call_aborted","description":"The pre-call batch did (or did not) abort the call.","properties":{"rule":{"type":"string","enum":["pre_call_aborted"]},"expect":{"type":"boolean","description":"true: the call must have been aborted; false (default): it must not."}},"required":["rule"],"example":{"expect":false,"rule":"pre_call_aborted"}},"EvalCheckListItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9_-]{1,63}$"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"kind":{"type":"string","enum":["judge","tool","flow"]},"source_template_key":{"type":["string","null"],"maxLength":128},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","slug","name","description","kind","source_template_key","archived_at","created_at","updated_at"],"example":{"id":"11111111-1111-4111-8111-111111111111","slug":"never_cold_transfers","name":"Never cold-transfers","description":"The cold-transfer tool is never called.","kind":"tool","source_template_key":"never-cold-transfers","archived_at":null,"created_at":"2026-08-01T08:00:00Z","updated_at":"2026-08-01T09:00:00Z"}},"EvalCheckListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EvalCheckListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"EvalCheckPatchRequest":{"type":"object","additionalProperties":false,"description":"Edits the check in place. The edit is live on the next run; verdicts already recorded keep their score and reasoning. kind, slug and template_key are fixed at creation: sending any of them returns 422 validation_failed with field code `immutable` — create a new check instead. A supplied config replaces the stored one and is validated in full against the check's kind and the config's rule.","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"config":{"$ref":"#/components/schemas/EvalCheckConfigInput"}},"example":{"name":"Never cold-transfers"}},"EvalCheckTemplate":{"type":"object","additionalProperties":false,"properties":{"key":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":200},"kind":{"type":"string","enum":["judge","tool","flow"]},"description":{"type":"string","maxLength":2000},"config":{"$ref":"#/components/schemas/EvalCheckConfig"}},"required":["key","name","kind","description","config"]},"EvalCheckTemplateListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EvalCheckTemplate"}}},"required":["data"]},"EvalRun":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"suite_id":{"type":"string","format":"uuid"},"suite_slug":{"type":"string"},"suite_name":{"type":"string"},"agent_version_id":{"type":["string","null"],"format":"uuid"},"mode":{"$ref":"#/components/schemas/EvalRunMode"},"tool_policy":{"$ref":"#/components/schemas/EvalToolPolicy"},"status":{"$ref":"#/components/schemas/EvalRunStatus"},"total":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"started_at":{"type":["string","null"],"format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"duration_sec":{"type":["number","null"],"format":"float","minimum":0},"created_at":{"type":"string","format":"date-time"},"cancel_requested_at":{"type":["string","null"],"format":"date-time"},"score_weighted":{"description":"The run's weighted score, 0-100, as the worker computed it. Null while the run is still going or when no check scored it.","type":["number","null"],"format":"float","minimum":0,"maximum":100},"passed":{"description":"The run's verdict. Already accounts for blocking checks, so it is not derivable from score_weighted alone.","type":["boolean","null"]},"unmocked_tool_calls":{"description":"Tool calls that reached a real upstream. Non-zero on a run whose tool_policy asked for mocks means the result is not trustworthy.","type":"integer","minimum":0},"pass_rate":{"description":"Share of conversations that passed, 0-1. This is what `passed` is derived from — `score_weighted` is average partial credit and can be high on a run that failed.","type":["number","null"],"format":"float","minimum":0,"maximum":1},"requested_concurrency":{"type":"integer","minimum":0,"maximum":1000},"effective_concurrency":{"type":"integer","minimum":1,"maximum":1000,"description":"Requested value after mode defaults and current workspace headroom clamping; the deployment cap is configurable."},"summary":{"$ref":"#/components/schemas/EvalJSONObject"},"runtime_profile":{"$ref":"#/components/schemas/EvalRuntimeProfile"},"error":{"type":["string","null"],"enum":["eval execution failed","the agent failed to produce its opening turn","the simulated caller crashed",null]},"error_code":{"oneOf":[{"$ref":"#/components/schemas/EvalExecutionErrorCode"},{"type":"null"}]},"error_detail":{"type":["string","null"],"maxLength":2049,"description":"Internal worker diagnostics are withheld from customer responses. Use the classified error and support identifiers."},"agent_id":{"type":["string","null"],"format":"uuid"},"agent_name":{"type":["string","null"]},"agent_version_number":{"type":["integer","null"],"minimum":1},"scenarios":{"type":"array","items":{"$ref":"#/components/schemas/EvalRunScenarioSummary"}},"calls":{"type":"array","items":{"$ref":"#/components/schemas/EvalRunCallSummary"}}},"required":["id","suite_id","suite_slug","suite_name","mode","tool_policy","status","total","completed","created_at","requested_concurrency","effective_concurrency","scenarios","calls"]},"EvalRunCreateRequest":{"type":"object","additionalProperties":false,"properties":{"agent_id":{"type":"string","format":"uuid"},"agent_version_id":{"type":"string","format":"uuid"},"suite_id":{"type":"string","format":"uuid"},"mode":{"$ref":"#/components/schemas/EvalRunCreateMode"},"concurrency":{"type":"integer","minimum":0,"maximum":1000,"default":0,"description":"Zero selects the mode default; the server clamps against current workspace headroom."},"tool_policy":{"type":"string","enum":["dry_run","mocked"],"default":"dry_run","description":"API keys must use create_live_eval_run for live tool execution."},"runtime_profile":{"$ref":"#/components/schemas/EvalRuntimeProfileInput"}},"required":["agent_id","suite_id","mode"],"example":{"agent_id":"33333333-3333-4333-8333-333333333333","agent_version_id":"44444444-4444-4444-8444-444444444444","suite_id":"11111111-1111-4111-8111-111111111111","mode":"text","concurrency":4,"tool_policy":"dry_run","runtime_profile":{}}},"LiveEvalRunCreateRequest":{"type":"object","additionalProperties":false,"properties":{"agent_id":{"type":"string","format":"uuid"},"agent_version_id":{"type":"string","format":"uuid"},"suite_id":{"type":"string","format":"uuid"},"mode":{"$ref":"#/components/schemas/EvalRunCreateMode"},"concurrency":{"type":"integer","minimum":0,"maximum":1000,"default":0},"tool_policy":{"type":"string","enum":["live"],"default":"live"},"runtime_profile":{"$ref":"#/components/schemas/EvalRuntimeProfileInput"}},"required":["agent_id","suite_id","mode"],"example":{"agent_id":"33333333-3333-4333-8333-333333333333","suite_id":"11111111-1111-4111-8111-111111111111","mode":"text","concurrency":1,"tool_policy":"live","runtime_profile":{}}},"EvalRunCreateResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"effective_concurrency":{"type":"integer","minimum":1,"maximum":1000,"description":"Requested value after mode defaults and current workspace headroom clamping; the deployment cap is configurable."},"total":{"type":"integer","minimum":1}},"required":["id","effective_concurrency","total"],"example":{"id":"55555555-5555-4555-8555-555555555555","effective_concurrency":4,"total":25}},"EvalRunCancelResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/EvalRunStatus"},"completed":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"cancel_requested_at":{"type":["string","null"],"format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"}},"required":["id","status","completed","total"],"example":{"id":"55555555-5555-4555-8555-555555555555","status":"running","completed":8,"total":25,"cancel_requested_at":"2026-07-21T09:16:00Z","ended_at":null}},"EvalVerdict":{"type":"object","additionalProperties":false,"description":"One check's answer about one conversation.","properties":{"check_id":{"type":"string","format":"uuid"},"check_slug":{"type":"string"},"check_kind":{"type":"string","enum":["judge","tool","flow"]},"selected_level_key":{"type":["string","null"],"description":"For a graded judge, the level the judge selected."},"score_0_100":{"type":["number","null"],"format":"float"},"is_target_match":{"type":["boolean","null"]},"passed":{"type":["boolean","null"]},"confidence":{"type":["number","null"],"format":"float"},"insufficient_evidence":{"type":"boolean","description":"The check could not be answered from this conversation. Excluded from the weighted mean rather than scored zero."},"reasoning":{"type":["string","null"]},"evidence":{"description":"Quoted spans supporting the verdict."},"weight":{"type":"integer"},"blocking":{"type":"boolean"}},"required":["check_id","check_slug","check_kind","insufficient_evidence","weight","blocking"]},"EvalCallListItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"run_id":{"type":["string","null"],"format":"uuid"},"suite_id":{"type":["string","null"],"format":"uuid"},"suite_name":{"type":"string"},"scenario_id":{"type":"string"},"scenario_label":{"type":["string","null"]},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"duration_sec":{"type":["number","null"],"format":"float","minimum":0},"end_reason":{"type":["string","null"]},"timed_out":{"type":"boolean"},"overall_score":{"type":["number","null"],"format":"float"},"score_weighted":{"type":["number","null"],"format":"float","description":"The v2 weighted check score, 0-100. Null for a conversation no check scored."},"passed":{"type":["boolean","null"],"description":"Whether the conversation cleared the suite threshold and every blocking check."},"error":{"type":["string","null"],"enum":["eval execution failed","eval execution timed out","the agent failed to produce its opening turn","the simulated caller crashed",null]},"error_code":{"oneOf":[{"$ref":"#/components/schemas/EvalExecutionErrorCode"},{"type":"null"}]},"error_detail":{"type":["string","null"],"maxLength":2049,"description":"Internal worker diagnostics are withheld from customer responses. Use the classified error and support identifiers."},"agent_version_id":{"type":["string","null"],"format":"uuid"},"session_id":{"type":["string","null"],"format":"uuid"},"tool_policy":{"oneOf":[{"$ref":"#/components/schemas/EvalToolPolicy"},{"type":"null"}]},"models":{"$ref":"#/components/schemas/EvalCallModels"}},"required":["id","suite_name","scenario_id","started_at","timed_out"],"example":{"id":"66666666-6666-4666-8666-666666666666","run_id":"55555555-5555-4555-8555-555555555555","suite_id":"11111111-1111-4111-8111-111111111111","suite_name":"Support regression","scenario_id":"angry_refund","scenario_label":"Angry refund request","pathway_name":"support_agent","started_at":"2026-07-21T09:15:02Z","ended_at":"2026-07-21T09:15:20Z","duration_sec":18,"end_reason":"completed","timed_out":false,"overall_score":0.92,"score_weighted":92.45,"passed":true,"error":null,"error_code":null,"agent_version_id":"44444444-4444-4444-8444-444444444444","session_id":null,"tool_policy":"dry_run","models":{}}},"EvalCall":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"run_id":{"type":["string","null"],"format":"uuid"},"suite_id":{"type":["string","null"],"format":"uuid"},"suite_name":{"type":"string"},"scenario_id":{"type":"string"},"scenario_label":{"type":["string","null"]},"agent_id":{"type":["string","null"],"format":"uuid"},"agent_name":{"type":["string","null"]},"agent_version_number":{"type":["integer","null"],"minimum":1},"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"duration_sec":{"type":["number","null"],"format":"float","minimum":0},"end_reason":{"type":["string","null"]},"timed_out":{"type":"boolean"},"overall_score":{"type":["number","null"],"format":"float"},"error":{"type":["string","null"],"enum":["eval execution failed","eval execution timed out","the agent failed to produce its opening turn","the simulated caller crashed",null]},"error_code":{"oneOf":[{"$ref":"#/components/schemas/EvalExecutionErrorCode"},{"type":"null"}]},"error_detail":{"type":["string","null"],"maxLength":2049,"description":"Internal worker diagnostics are withheld from customer responses. Use the classified error and support identifiers."},"agent_version_id":{"type":["string","null"],"format":"uuid"},"session_id":{"type":["string","null"],"format":"uuid"},"tool_policy":{"oneOf":[{"$ref":"#/components/schemas/EvalToolPolicy"},{"type":"null"}]},"transcript":{"description":"Stored structured transcript. It is authorized eval content, may contain model- or tool-generated values, and its shape depends on the worker version."},"agent_metrics_summary":{"description":"Agent-side metrics summary. JSON null when the worker recorded none.","oneOf":[{"$ref":"#/components/schemas/EvalJSONObject"},{"type":"null"}]},"caller_metrics_summary":{"description":"Simulated-caller metrics summary. JSON null when the worker recorded none.","oneOf":[{"$ref":"#/components/schemas/EvalJSONObject"},{"type":"null"}]},"structured_results":{"type":["array","null"],"description":"Per-assertion scorer results in evaluation order. An empty array when the conversation crashed before scoring; JSON null when the scorer produced no structured section.","items":{"$ref":"#/components/schemas/EvalJSONObject"}},"rubric_results":{"description":"The scorer's rubric output (every scorer key except the structured section). JSON null when the conversation was not rubric-scored, including crashed conversations.","oneOf":[{"$ref":"#/components/schemas/EvalJSONObject"},{"type":"null"}]},"models":{"$ref":"#/components/schemas/EvalCallModels"},"score_weighted":{"type":["number","null"],"format":"float","description":"Weighted mean of the attached checks' verdicts, excluding those that abstained. Null when the suite has no checks attached — distinct from a score of zero."},"passed":{"type":["boolean","null"],"description":"Whether this conversation cleared the pass threshold with no blocking failure. Always false when the conversation errored or timed out: a conversation that never happened satisfies every negative check trivially and must not pass on that basis."},"eval_tool_calls":{"description":"Ordered tool trace the checks were evaluated against, including which calls were mocked. Authorized eval content whose shape depends on the worker version."},"verdicts":{"type":"array","description":"One entry per attached check. Empty when none are attached.","items":{"$ref":"#/components/schemas/EvalVerdict"}}},"required":["id","suite_name","scenario_id","started_at","timed_out","verdicts"]},"EvalCallListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","maxItems":200,"items":{"$ref":"#/components/schemas/EvalCallListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"ExtractionFieldType":{"type":"string","enum":["string","integer","number","boolean","enum","array"],"description":"JSON value type produced for this field. `enum` produces a string restricted to enum_values; `array` uses item_type."},"ExtractionArrayItemType":{"type":"string","enum":["string","integer","number"]},"ExtractionField":{"type":"object","additionalProperties":false,"description":"Normalized output field. Optional configuration is emitted explicitly so clients never need to distinguish omission from defaults.","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"$ref":"#/components/schemas/ExtractionFieldType"},"description":{"type":["string","null"],"maxLength":1000},"required":{"type":"boolean"},"enum_values":{"type":"array","maxItems":100,"items":{"type":"string","minLength":1,"maxLength":200},"description":"Non-empty only when type is enum; otherwise an empty array."},"item_type":{"type":["string","null"],"enum":["string","integer","number",null],"description":"Element type when type is array; otherwise null. Omitted array item_type normalizes to string."}},"required":["name","type","description","required","enum_values","item_type"]},"ExtractionFieldInput":{"description":"A field definition. Field names are ASCII identifiers and are unique within an object under case-insensitive comparison. Type-specific properties are rejected on other field types.","oneOf":[{"title":"String extraction field","type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","const":"string"},"description":{"type":["string","null"],"maxLength":1000},"required":{"type":"boolean","default":false}},"required":["name","type"]},{"title":"Integer extraction field","type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","const":"integer"},"description":{"type":["string","null"],"maxLength":1000},"required":{"type":"boolean","default":false}},"required":["name","type"]},{"title":"Number extraction field","type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","const":"number"},"description":{"type":["string","null"],"maxLength":1000},"required":{"type":"boolean","default":false}},"required":["name","type"]},{"title":"Boolean extraction field","type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","const":"boolean"},"description":{"type":["string","null"],"maxLength":1000},"required":{"type":"boolean","default":false}},"required":["name","type"]},{"title":"Enum extraction field","type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","const":"enum"},"description":{"type":["string","null"],"maxLength":1000},"required":{"type":"boolean","default":false},"enum_values":{"type":"array","minItems":1,"maxItems":100,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":200}}},"required":["name","type","enum_values"]},{"title":"Array extraction field","type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"type":{"type":"string","const":"array"},"description":{"type":["string","null"],"maxLength":1000},"required":{"type":"boolean","default":false},"item_type":{"allOf":[{"$ref":"#/components/schemas/ExtractionArrayItemType"}],"default":"string"}},"required":["name","type"]}]},"ExtractionObjectDetail":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"fields":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/ExtractionField"}},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","fields","archived_at","created_at","updated_at"]},"ExtractionObjectListItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"field_count":{"type":"integer","minimum":1,"maximum":100},"fields":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/ExtractionField"},"description":"Present only when the request uses expand=fields."},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","field_count","archived_at","created_at","updated_at"]},"ExtractionObjectCreateRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":["string","null"],"maxLength":2000,"description":"Null or a blank string normalizes to null."},"fields":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/ExtractionFieldInput"}}},"required":["name","fields"]},"ExtractionObjectListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ExtractionObjectListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"ExtractionObjectPatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":["string","null"],"maxLength":2000,"description":"Null or a blank string clears the description."},"fields":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/ExtractionFieldInput"}}}},"FlowNode":{"type":"object","additionalProperties":false,"description":"One agent on the flow canvas. `id` is the node's own identity and stays stable across agent renames and re-pointing; `x` and `y` are canvas coordinates the API stores verbatim and never interprets. Each agent may appear at most once in a flow, because every handoff out of a node derives a tool named after the target agent's slug.","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"agent_id":{"type":"string","format":"uuid","description":"An un-archived agent in this workspace whose production version carries a prompt or a workflow. Anything else is rejected with 422, because the runtime could not dispatch to it."},"x":{"type":"number","default":0,"description":"Canvas coordinate. Always present in responses; defaults to 0 when omitted on write."},"y":{"type":"number","default":0,"description":"Canvas coordinate. Always present in responses; defaults to 0 when omitted on write."},"agent_slug":{"type":"string","readOnly":true,"description":"Read-only label so the canvas can render nodes without one request per agent. Accepted but ignored on write, so a body just read can be sent straight back. Absent when the referenced agent no longer resolves, which is how a broken node stays visible instead of disappearing."},"agent_name":{"type":"string","readOnly":true,"description":"Read-only label; see agent_slug."}},"required":["id","agent_id"]},"FlowEdge":{"type":"object","additionalProperties":false,"description":"One directed handoff. The runtime compiles each edge into a `transfer_to_agent__<target-slug>` tool on the source agent, so a flow may not contain self-edges or two edges with the same (source, target) pair.","properties":{"id":{"type":"string","description":"Client-assigned edge identity. Always present in responses; may be omitted on write, but ids that are supplied must be unique."},"source":{"type":"string","description":"The `id` of a node in this flow's graph."},"target":{"type":"string","description":"The `id` of a different node in this flow's graph. An agent cannot hand off to itself."},"label":{"type":"string","maxLength":120,"description":"Optional short caption for the canvas. Always present in responses, empty when unset."},"condition":{"type":"string","minLength":1,"maxLength":2000,"description":"Required. The operator's \"hand off when…\" text; it becomes the transfer tool's trigger and is the only thing telling the model which of several handoffs applies."}},"required":["source","target","condition"]},"FlowGraph":{"type":"object","additionalProperties":false,"description":"The flow canvas — the agents on it and the handoffs between them.","properties":{"nodes":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/FlowNode"}},"edges":{"type":"array","maxItems":200,"items":{"$ref":"#/components/schemas/FlowEdge"}}},"required":["nodes","edges"]},"FlowNodeInput":{"type":"object","additionalProperties":false,"description":"One agent on the canvas, as supplied on write. Identical to FlowNode except that the two derived labels are plain optional fields here: they are accepted and ignored, so a graph you just read can be sent straight back without stripping them.","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"agent_id":{"type":"string","format":"uuid","description":"An un-archived agent in this workspace whose production version carries a prompt or a workflow. Anything else is rejected with 422, because the runtime could not dispatch to it."},"x":{"type":"number","default":0,"description":"Canvas coordinate, stored verbatim and never interpreted."},"y":{"type":"number","default":0,"description":"Canvas coordinate, stored verbatim and never interpreted."},"agent_slug":{"type":"string","description":"Accepted and ignored; the server derives it on read."},"agent_name":{"type":"string","description":"Accepted and ignored; the server derives it on read."}},"required":["id","agent_id"]},"FlowGraphInput":{"type":"object","additionalProperties":false,"description":"The flow canvas as supplied on write. Sending it REPLACES the stored graph whole; it is never merged edge by edge.","properties":{"nodes":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/FlowNodeInput"}},"edges":{"type":"array","maxItems":200,"items":{"$ref":"#/components/schemas/FlowEdge"}}},"required":["nodes","edges"]},"Flow":{"type":"object","additionalProperties":false,"description":"A named graph of existing agents joined by agent-to-agent handoffs. The same representation is returned for a single flow and for each element of a list page. A flow owns the graph, the start agent and an after-call override; prompt, model and voice configuration stays on each member agent's own version. Flows are not versioned — `resource_version` feeds the strong ETag that PATCH's If-Match is checked against.","properties":{"id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid"},"slug":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000,"description":"Absent when no description is set."},"start_agent_id":{"type":"string","format":"uuid","description":"The agent that ANSWERS a call routed at this flow; the graph's edges take over from there. Must be one of the agents on the canvas. Absent when the flow has no start agent yet, in which case the flow cannot be targeted by a number, a job or a call."},"graph":{"$ref":"#/components/schemas/FlowGraph"},"agent_count":{"type":"integer","minimum":0,"description":"Derived count of graph.nodes, so a list page can show each flow's shape."},"handoff_count":{"type":"integer","minimum":0,"description":"Derived count of graph.edges."},"summary_enabled":{"type":"boolean","description":"After-call override. These four fields REPLACE every member agent's own after-call configuration for calls that run inside the flow."},"summary_prompt":{"type":"string","maxLength":50000,"description":"Absent when no override prompt is set."},"extraction_object_ids":{"type":"array","maxItems":100,"uniqueItems":true,"items":{"type":"string","format":"uuid"}},"webhook_config_ids":{"type":"array","maxItems":100,"uniqueItems":true,"items":{"type":"string","format":"uuid"}},"resource_version":{"type":"integer","format":"int64","minimum":0,"description":"Monotonic row version maintained by the database, never by the handler. It is the value behind the strong ETag."},"archived_at":{"type":"string","format":"date-time","description":"Absent unless the flow has been archived."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","org_id","slug","name","graph","agent_count","handoff_count","summary_enabled","extraction_object_ids","webhook_config_ids","resource_version","created_at","updated_at"]},"FlowListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Flow"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"FlowCloneRequest":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Display name for the copy."},"slug":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Unique routing identifier for the copy. Derived from the name when omitted."}}},"FlowCreateRequest":{"type":"object","additionalProperties":false,"description":"Creates a flow. Only `name` is required: a flow may be created empty and wired up afterwards, and an omitted `slug` is derived from the name. Maximum encoded body size is 1048576 bytes.","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"slug":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Unique per workspace. Lower-cased and trimmed before validation. Derived from `name` when omitted."},"description":{"type":["string","null"],"maxLength":2000},"start_agent_id":{"type":["string","null"],"format":"uuid","description":"Must be one of the agents in `graph.nodes`. Null leaves it unset."},"graph":{"$ref":"#/components/schemas/FlowGraphInput"},"summary_enabled":{"type":"boolean","default":true},"summary_prompt":{"type":["string","null"],"maxLength":50000},"extraction_object_ids":{"type":["array","null"],"maxItems":100,"uniqueItems":true,"description":"Null is accepted and stores an empty list.","items":{"type":"string","format":"uuid"}},"webhook_config_ids":{"type":["array","null"],"maxItems":100,"uniqueItems":true,"description":"Null is accepted and stores an empty list.","items":{"type":"string","format":"uuid"}}},"required":["name"]},"FlowPatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"description":"Omitted fields are unchanged; at least one field must be supplied. Explicit null clears description, start_agent_id and summary_prompt, and empties the two after-call id lists. `graph` and `summary_enabled` reject null. Supplying `graph` REPLACES the whole canvas. Cross-field rules are evaluated against the merged result, so a patch that only moves the start agent must still name an agent the stored graph contains. Maximum encoded body size is 1048576 bytes.","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"slug":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"type":["string","null"],"maxLength":2000},"start_agent_id":{"type":["string","null"],"format":"uuid"},"graph":{"$ref":"#/components/schemas/FlowGraphInput"},"summary_enabled":{"type":"boolean"},"summary_prompt":{"type":["string","null"],"maxLength":50000},"extraction_object_ids":{"type":["array","null"],"maxItems":100,"uniqueItems":true,"items":{"type":"string","format":"uuid"}},"webhook_config_ids":{"type":["array","null"],"maxItems":100,"uniqueItems":true,"items":{"type":"string","format":"uuid"}}}},"GroupMember":{"type":"object","additionalProperties":false,"description":"One live agent in a group. Removed members are not listed here (their past calls keep the member id and label; see GroupResults.members).","properties":{"id":{"type":"string","format":"uuid","description":"Stable member id, stamped on every call the member takes as group_member_id."},"agent_id":{"type":"string","format":"uuid"},"agent_name":{"type":"string"},"agent_slug":{"type":"string"},"label":{"type":"string","pattern":"^[A-Z]+$","description":"Stable display label (A, B, … Z, AA …), assigned in order of joining and never reused within the group."},"weight":{"type":"integer","minimum":0,"maximum":100},"position":{"type":"integer","minimum":0,"description":"Display and pick order, set by the order of the members array."},"share":{"type":"number","minimum":0,"maximum":100,"description":"This member's weight as a percentage of the live total, one decimal."},"dispatchable":{"type":"boolean","description":"False when the agent is archived or has no production version; such a member is skipped when calls are assigned."},"created_at":{"type":"string","format":"date-time"}},"required":["id","agent_id","agent_name","agent_slug","label","weight","position","share","dispatchable","created_at"]},"GroupMetric":{"type":"object","additionalProperties":false,"description":"One custom field measured on every call routed through the group, extracted after hangup by the group-owned extraction object and charted on the results page.","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","description":"Unique within the group. overall_score and outcome are reserved."},"type":{"type":"string","enum":["number","integer","boolean","enum"]},"description":{"type":"string","maxLength":1000,"description":"What the extractor should measure. Absent when not set."},"enum_values":{"type":"array","minItems":2,"maxItems":20,"items":{"type":"string","minLength":1,"maxLength":200},"description":"The allowed values of an enum metric. Absent for other types."}},"required":["name","type"]},"GroupMetricInput":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","description":"Lowercase letters, digits and underscores, starting with a letter; unique within the group. overall_score and outcome are reserved for Overall performance."},"type":{"type":"string","enum":["number","integer","boolean","enum"]},"description":{"type":["string","null"],"maxLength":1000},"enum_values":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":200},"description":"Required for an enum metric: 2–20 unique, non-empty values (compared case-insensitively). Rejected for every other type."}},"required":["name","type"]},"GroupMemberInput":{"type":"object","additionalProperties":false,"properties":{"agent_id":{"type":"string","format":"uuid","description":"An un-archived agent in this workspace with a production version. Each agent may appear at most once."},"weight":{"type":"integer","minimum":0,"maximum":100,"default":0,"description":"Relative traffic weight. Shares are weight / sum of weights; a member with weight 0 stays in the group but receives no new calls."}},"required":["agent_id"]},"GroupUsedByCounts":{"type":"object","additionalProperties":false,"description":"How many non-archived phone numbers and campaigns point at the group.","properties":{"phone_numbers":{"type":"integer","minimum":0},"campaigns":{"type":"integer","minimum":0}},"required":["phone_numbers","campaigns"]},"GroupUsedByDetail":{"type":"object","additionalProperties":false,"description":"Every non-archived phone number and campaign that points at the group — what has to be re-pointed before the group can be archived.","properties":{"phone_numbers":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"e164":{"type":"string"},"label":{"type":"string","description":"Absent when the number has no label."}},"required":["id","e164"]}},"campaigns":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string"}},"required":["id","name","status"]}}},"required":["phone_numbers","campaigns"]},"GroupRoutingStrategy":{"type":"string","enum":["sticky","random","prefer_new"],"description":"Chooses among eligible members in proportion to their weights. sticky assigns a number consistently while the eligible members and weights are unchanged. random draws independently for each new assignment. prefer_new draws from agents with no retained answered call for the number in this group, or from all eligible members once every eligible agent has answered it. When the number is unavailable, sticky and prefer_new use weighted random."},"Group":{"type":"object","additionalProperties":false,"description":"A set of existing agents with traffic weights. A phone number, outbound job or campaign can target a group instead of a single agent or a flow; each call is assigned to one member using routing_strategy and measured on the same metrics, so agents can be compared on real traffic. A group owns no prompt, model or voice configuration — those stay on each member agent's production version. Groups are not versioned: a save is live on the next call, and `resource_version` feeds the strong ETag that PATCH's If-Match is checked against.","properties":{"id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000,"description":"Absent when no description is set."},"routing_strategy":{"$ref":"#/components/schemas/GroupRoutingStrategy"},"overall_enabled":{"type":"boolean","description":"Whether every call is measured on the platform's Overall performance fields: overall_score (integer 1–10) and outcome (achieved, partial, not_achieved or escalated)."},"members":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/GroupMember"},"description":"The live members in position order."},"metrics":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/GroupMetric"}},"extraction_object_id":{"type":"string","format":"uuid","description":"The group-owned extraction object that measures overall_enabled and metrics. It runs after every call routed through the group, is hidden from GET /v1/extraction-objects, and PATCH/DELETE on it return 409 extraction_object_managed_by_group — change the group instead."},"used_by":{"$ref":"#/components/schemas/GroupUsedByCounts"},"used_by_detail":{"$ref":"#/components/schemas/GroupUsedByDetail","description":"Returned by the single-group endpoints (GET, POST, PATCH) only."},"resource_version":{"type":"integer","format":"int64","minimum":0,"description":"Monotonic row version maintained by the database, never by the handler. It is the value behind the strong ETag."},"archived_at":{"type":"string","format":"date-time","description":"Absent unless the group has been archived."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","org_id","name","overall_enabled","routing_strategy","members","metrics","used_by","resource_version","created_at","updated_at"]},"GroupListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Group"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"GroupCreateRequest":{"type":"object","additionalProperties":false,"description":"Creates a group. name and members are required. overall_enabled defaults to true, routing_strategy to sticky, and metrics to an empty list. Maximum encoded body size is 262144 bytes.","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Unique among the workspace's non-archived groups. Trimmed."},"description":{"type":["string","null"],"maxLength":2000},"overall_enabled":{"type":"boolean","default":true},"routing_strategy":{"$ref":"#/components/schemas/GroupRoutingStrategy","default":"sticky"},"members":{"type":"array","minItems":1,"maxItems":10,"description":"1–10 distinct agents; at least one weight must be above 0. Array order sets position and the labels (A, B, …).","items":{"$ref":"#/components/schemas/GroupMemberInput"}},"metrics":{"type":["array","null"],"maxItems":20,"description":"Custom metrics. Null is accepted and stores an empty list.","items":{"$ref":"#/components/schemas/GroupMetricInput"}}},"required":["name","members"]},"GroupPatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"description":"Omitted fields are unchanged; at least one field must be supplied. Explicit null clears description and empties metrics. name, overall_enabled, routing_strategy and members reject null. members REPLACES the live member set, matched by agent_id (existing agents keep their member id and label; agents left out are removed). metrics REPLACES the custom metric list. Maximum encoded body size is 262144 bytes.","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"overall_enabled":{"type":"boolean"},"routing_strategy":{"$ref":"#/components/schemas/GroupRoutingStrategy"},"members":{"type":"array","minItems":1,"maxItems":10,"items":{"$ref":"#/components/schemas/GroupMemberInput"}},"metrics":{"type":["array","null"],"maxItems":20,"items":{"$ref":"#/components/schemas/GroupMetricInput"}}}},"GroupChangeMember":{"type":"object","additionalProperties":false,"properties":{"member_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"label":{"type":"string"},"weight":{"type":"integer","minimum":0,"maximum":100}},"required":["member_id","agent_id","label","weight"]},"GroupChange":{"type":"object","additionalProperties":false,"description":"The live member set right after one member or weight change.","properties":{"changed_at":{"type":"string","format":"date-time"},"changed_by":{"type":"string","format":"uuid","description":"The user who saved the change. Absent for API-key and system writes."},"members":{"type":"array","items":{"$ref":"#/components/schemas/GroupChangeMember"}}},"required":["changed_at","members"]},"GroupChangeListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/GroupChange"}}},"required":["data"]},"GroupResultsMember":{"type":"object","additionalProperties":false,"properties":{"member_id":{"type":"string","format":"uuid"},"label":{"type":"string"},"agent_id":{"type":"string","format":"uuid"},"agent_name":{"type":"string"},"weight":{"type":"integer","minimum":0,"maximum":100,"description":"The current weight; 0 for a removed member."},"removed":{"type":"boolean","description":"True for a member removed from the group that still took calls in the window."}},"required":["member_id","label","agent_id","agent_name","weight","removed"]},"GroupResultValue":{"type":"object","additionalProperties":false,"description":"One member's value for one metric.","properties":{"member_id":{"type":"string","format":"uuid"},"n":{"type":"integer","format":"int64","minimum":0,"description":"Sample size the value is computed over."},"value":{"type":["number","null"],"description":"Count, rate (0–1), mean or median depending on the metric kind. Null when the member has no sample, and always null for enum metrics."},"ci_low":{"type":["number","null"],"description":"Lower bound of the 95% interval (Wilson for rates, normal for means)."},"ci_high":{"type":["number","null"]},"distribution":{"type":"object","additionalProperties":{"type":"integer","format":"int64","minimum":0},"description":"Enum metrics only — the count of calls per value."}},"required":["member_id","n","value","ci_low","ci_high"]},"GroupVerdict":{"type":"object","additionalProperties":false,"description":"insufficient_data while fewer than two members have traffic or any member with traffic has fewer than 30 calls; otherwise the best two members are compared (two-proportion z-test for rates, Welch z-test for means) and the status is leader when p < 0.05, else no_difference.","properties":{"status":{"type":"string","enum":["leader","no_difference","insufficient_data"]},"member_id":{"type":"string","format":"uuid","description":"The leading member. Present only when status is leader."},"confidence":{"type":"number","minimum":0,"maximum":1,"description":"1 − p of the comparison, rounded to three decimals and capped at 0.999; absent when no comparison was made."}},"required":["status"]},"GroupBuiltinMetric":{"type":"object","additionalProperties":false,"properties":{"key":{"type":"string","enum":["calls","answer_rate","avg_duration_sec","transfer_rate","failure_rate","tool_failure_rate","early_hangup_rate","p50_latency_ms"],"description":"answer_rate is present only when the window contains outbound calls."},"label":{"type":"string"},"kind":{"type":"string","enum":["count","rate","mean","median"]},"unit":{"type":["string","null"],"description":"seconds or ms for durations and latencies; null otherwise."},"higher_is_better":{"type":["boolean","null"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/GroupResultValue"}},"verdict":{"$ref":"#/components/schemas/GroupVerdict"}},"required":["key","label","kind","unit","higher_is_better","values","verdict"]},"GroupMetricResult":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["number","integer","boolean","enum"]},"source":{"type":"string","enum":["overall","custom"],"description":"overall for overall_score / outcome, custom for the group's own metrics."},"description":{"type":"string"},"enum_values":{"type":"array","items":{"type":"string"}},"higher_is_better":{"type":["boolean","null"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/GroupResultValue"}},"verdict":{"$ref":"#/components/schemas/GroupVerdict"}},"required":["name","label","type","source","higher_is_better","values","verdict"]},"GroupTrendPoint":{"type":"object","additionalProperties":false,"properties":{"date":{"type":"string","format":"date"},"member_id":{"type":"string","format":"uuid"},"calls":{"type":"integer","format":"int64","minimum":0},"overall_score":{"type":["number","null"],"description":"Mean overall_score that day; null without scored calls."}},"required":["date","member_id","calls","overall_score"]},"GroupTrend":{"type":"object","additionalProperties":false,"properties":{"bucket":{"type":"string","const":"day"},"points":{"type":"array","items":{"$ref":"#/components/schemas/GroupTrendPoint"}}},"required":["bucket","points"]},"GroupResults":{"type":"object","additionalProperties":false,"description":"Per-member comparison of the calls routed through a group in one window.","properties":{"group_id":{"type":"string","format":"uuid"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"members":{"type":"array","items":{"$ref":"#/components/schemas/GroupResultsMember"}},"builtin":{"type":"array","items":{"$ref":"#/components/schemas/GroupBuiltinMetric"}},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/GroupMetricResult"}},"trend":{"$ref":"#/components/schemas/GroupTrend"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/GroupChange"},"description":"Member/weight snapshots saved inside the window."}},"required":["group_id","from","to","members","builtin","metrics","trend","changes"]},"GuardrailSetCreateRequest":{"type":"object","additionalProperties":false,"description":"Creates one immutable-slug catalog resource. slug, name, description, rule identifiers, rule names, and severity are trimmed. Control characters are rejected in single-line fields. Omitted description becomes null and omitted definition becomes the canonical empty definition. A JSON request body over 4,194,304 encoded bytes returns 413; a definition over its narrower 1,048,576 byte limit returns 422 with a definition field error.","properties":{"slug":{"$ref":"#/components/schemas/GuardrailSetSlugInput"},"name":{"$ref":"#/components/schemas/GuardrailSetName"},"description":{"$ref":"#/components/schemas/GuardrailSetDescription"},"definition":{"$ref":"#/components/schemas/GuardrailDefinitionInput"}},"required":["slug","name"]},"GuardrailSetSlugInput":{"type":"string","minLength":2,"maxLength":64,"pattern":"^\\p{Z}*[a-z0-9_-]{2,64}\\p{Z}*$","description":"Immutable workspace-unique slug on create. The complete raw value contains at most 64 Unicode characters. Surrounding Unicode separator characters are accepted and removed; the normalized value contains 2–64 lowercase ASCII letters, digits, hyphens, or underscores. Controls, internal whitespace, uppercase letters, and unpaired Unicode surrogate escapes are rejected."},"GuardrailSetSlug":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9_-]+$","description":"Canonical immutable workspace-unique slug emitted after input normalization. It contains only lowercase ASCII letters, digits, hyphens, and underscores and never includes surrounding whitespace."},"GuardrailSetName":{"type":"string","minLength":1,"maxLength":200,"description":"Human label after trimming. The raw and normalized value must each contain 1–200 Unicode characters and no control characters."},"GuardrailSetDescription":{"type":["string","null"],"maxLength":2000,"description":"Optional authored description. Leading/trailing whitespace is removed; null or a blank string normalizes to null. The raw and normalized value must contain at most 2000 Unicode characters. Newline, carriage return, and tab are accepted; other control characters and unpaired Unicode surrogate escapes are rejected."},"GuardrailRuleInput":{"description":"One ordered rule. kind=llm and kind=static have disjoint closed shapes; fields belonging to the other variant are rejected rather than ignored.","oneOf":[{"$ref":"#/components/schemas/LLMGuardrailInput"},{"$ref":"#/components/schemas/StaticGuardrailInput"}]},"LLMGuardrailInput":{"type":"object","additionalProperties":false,"description":"A model-judged constraint. Omitted kind is accepted as llm. The server trims instruction and emits kind=llm explicitly in the canonical response.","properties":{"id":{"$ref":"#/components/schemas/GuardrailLocalIdInput"},"name":{"type":"string","maxLength":200,"description":"Optional trimmed label. Blank input normalizes to omission; control characters and unpaired Unicode surrogate escapes are rejected."},"severity":{"$ref":"#/components/schemas/GuardrailSeverityInput"},"kind":{"$ref":"#/components/schemas/LLMGuardrailKindInput"},"instruction":{"type":"string","minLength":1,"maxLength":20000,"description":"Natural-language constraint judged against each drafted response. Leading and trailing whitespace is removed. The raw and normalized value must each contain 1–20000 Unicode characters. Newline, carriage return, and tab are accepted; other control characters and unpaired surrogate escapes are rejected. This is literal policy text; prompt-variable syntax is never expanded."}},"required":["id","instruction"]},"StaticGuardrailInput":{"type":"object","additionalProperties":false,"description":"A deterministic case-insensitive phrase gate. kind=static is required.","properties":{"id":{"$ref":"#/components/schemas/GuardrailLocalIdInput"},"name":{"type":"string","maxLength":200,"description":"Optional trimmed label. Blank input normalizes to omission; control characters and unpaired Unicode surrogate escapes are rejected."},"severity":{"$ref":"#/components/schemas/GuardrailSeverityInput"},"kind":{"$ref":"#/components/schemas/StaticGuardrailKindInput"},"phrases":{"type":"array","minItems":1,"maxItems":100,"description":"Ordered phrases. Every run of Unicode whitespace normalizes to one ASCII space and leading/trailing whitespace is removed. Duplicate phrases within this rule are rejected after that whitespace normalization, Unicode NFKC compatibility normalization, and Unicode case folding. Phrases are literal; prompt-variable syntax is never expanded.","items":{"type":"string","minLength":1,"maxLength":500,"description":"The raw and normalized phrase must each contain 1–500 Unicode characters. Newline, carriage return, and tab normalize as whitespace; other controls and unpaired surrogate escapes are rejected."}}},"required":["id","kind","phrases"]},"GuardrailDefinitionInput":{"type":"object","additionalProperties":false,"description":"Complete ordered set replacement. Omission of this object on create, or omission of guardrails within it, normalizes to guardrails:[]. The encoded definition and its normalized form must each be at most 1,048,576 bytes. One definition may contain at most 100 rules; a larger array reports too_many_items at definition.guardrails. Once shape-valid, a single set is admitted only when it contains at most 40,000 LLM-instruction characters, 1,000 static phrases, and 100,000 static-phrase characters, reported respectively as guardrail_instruction_budget_exceeded, guardrail_phrase_budget_exceeded, and guardrail_phrase_character_budget_exceeded. An agent's ordered aggregate of assigned sets has those same limits plus the 100-rule limit; the first set ID that crosses a limit reports guardrail_rule_budget_exceeded or the corresponding character/phrase code at behavior.guardrails.guardrail_set_ids[i]. A live definition PATCH uses the analogous assigned_agent_guardrail_* code at definition and names the affected agent and deployment stage.","properties":{"guardrails":{"type":"array","maxItems":100,"default":[],"description":"Ordered rules. Rule ids must be unique after trimming within this array; duplicate comparison is case-sensitive. Empty sets are valid and useful while building a policy incrementally.","items":{"$ref":"#/components/schemas/GuardrailRuleInput"}}}},"GuardrailDefinition":{"type":"object","additionalProperties":false,"description":"Canonical response definition. guardrails is always present and preserves authored rule order.","properties":{"guardrails":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/GuardrailRule"}}},"required":["guardrails"]},"GuardrailRule":{"description":"Canonical rule with an explicit kind discriminator.","oneOf":[{"$ref":"#/components/schemas/LLMGuardrail"},{"$ref":"#/components/schemas/StaticGuardrail"}]},"LLMGuardrail":{"type":"object","additionalProperties":false,"properties":{"id":{"$ref":"#/components/schemas/CatalogLocalId"},"name":{"type":"string","minLength":1,"maxLength":200},"severity":{"$ref":"#/components/schemas/GuardrailSeverity"},"kind":{"type":"string","const":"llm"},"instruction":{"type":"string","minLength":1,"maxLength":20000}},"required":["id","kind","instruction"]},"StaticGuardrail":{"type":"object","additionalProperties":false,"properties":{"id":{"$ref":"#/components/schemas/CatalogLocalId"},"name":{"type":"string","minLength":1,"maxLength":200},"severity":{"$ref":"#/components/schemas/GuardrailSeverity"},"kind":{"type":"string","const":"static"},"phrases":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","minLength":1,"maxLength":500}}},"required":["id","kind","phrases"]},"GuardrailSeverityInput":{"type":"string","minLength":1,"maxLength":32,"pattern":"^\\p{Z}*[A-Za-z0-9_-]+\\p{Z}*$","description":"Optional machine-readable policy label on input. The complete raw value contains at most 32 Unicode characters. Surrounding Unicode separator characters are removed and ASCII letters are normalized to lowercase; the normalized value contains 1–32 ASCII letters, digits, hyphens, or underscores. Controls, internal whitespace, blank input, and unpaired Unicode surrogate escapes are rejected."},"LLMGuardrailKindInput":{"type":"string","pattern":"^\\p{Z}*[Ll][Ll][Mm]\\p{Z}*$","default":"llm","description":"Optional llm discriminator on input. ASCII case is ignored and surrounding Unicode separator characters are removed; the canonical response always emits llm."},"StaticGuardrailKindInput":{"type":"string","pattern":"^\\p{Z}*[Ss][Tt][Aa][Tt][Ii][Cc]\\p{Z}*$","description":"Required static discriminator on input. ASCII case is ignored and surrounding Unicode separator characters are removed; the canonical response always emits static."},"GuardrailSeverity":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9_-]+$","description":"Canonical machine-readable policy label such as warn, block, low, medium, or high. Responses contain only lowercase ASCII letters, digits, hyphens, and underscores and never include surrounding whitespace."},"GuardrailLocalIdInput":{"type":"string","minLength":1,"maxLength":128,"pattern":"^\\p{Z}*[A-Za-z0-9][A-Za-z0-9._:-]*\\p{Z}*$","description":"Stable identifier on input, unique within the containing definition after normalization. The complete raw value contains at most 128 Unicode characters. Surrounding Unicode separator characters are removed; the normalized value starts with an ASCII letter or digit and then uses only ASCII letters, digits, dots, colons, hyphens, or underscores. Controls, internal whitespace, and unpaired Unicode surrogate escapes are rejected."},"CatalogLocalId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]*$","description":"Canonical stable identifier emitted after input normalization. It starts with an ASCII letter or digit, continues with only ASCII letters, digits, dots, colons, hyphens, or underscores, and never includes surrounding whitespace."},"GuardrailSetDetail":{"type":"object","additionalProperties":false,"description":"Complete normalized resource. configuration_errors is omitted for canonical rows. When present, it identifies legacy stored fields/rules that were unsafe to emit or an aggregate runtime budget exceeded by the stored definition. When the root and guardrails array are representable, invalid rules are omitted independently. A malformed or missing root/array, a stored definition above the 1,048,576-byte encoded limit, or an oversized normalized safe view returns the canonical empty definition instead. A legacy array above 100 rules is truncated to its first 100 entries and reports too_many_items; those entries are then normalized independently. Aggregate-only diagnostics retain every individually valid rule among those first 100, so this object always remains schema-valid and can be repaired with one complete-definition PATCH.","properties":{"id":{"type":"string","format":"uuid"},"slug":{"$ref":"#/components/schemas/GuardrailSetSlug"},"name":{"$ref":"#/components/schemas/GuardrailSetName"},"description":{"$ref":"#/components/schemas/GuardrailSetDescription"},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"definition":{"$ref":"#/components/schemas/GuardrailDefinition"},"configuration_errors":{"type":"array","minItems":1,"readOnly":true,"description":"Exact legacy-repair diagnostics. Replace the complete definition using the current ETag; do not assume an omitted invalid rule or a rule beyond the 100-entry response boundary still executes. When the returned definition is empty because its root/array could not be represented safely or the stored definition exceeded the encoded-size limit, do not infer that any stored rule executes. An oversized legacy array uses too_many_items. Container/rule diagnostics use stored_value_invalid, too_large, invalid_type, unknown, required, too_many_items, too_few_items, too_long, invalid, invalid_unicode, invalid_format, invalid_enum, duplicate, or not_allowed as applicable. Aggregate diagnostics can use guardrail_instruction_budget_exceeded, guardrail_phrase_budget_exceeded, or guardrail_phrase_character_budget_exceeded without omitting individually valid rules from the returned definition.","items":{"$ref":"#/components/schemas/FieldError"}}},"required":["id","slug","name","description","archived_at","created_at","updated_at","definition"]},"GuardrailSetListItem":{"type":"object","additionalProperties":false,"description":"Guardrail-set metadata only; definition is never included in a list.","properties":{"id":{"type":"string","format":"uuid"},"slug":{"$ref":"#/components/schemas/GuardrailSetSlug"},"name":{"$ref":"#/components/schemas/GuardrailSetName"},"description":{"$ref":"#/components/schemas/GuardrailSetDescription"},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","slug","name","description","archived_at","created_at","updated_at"]},"GuardrailSetListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","maxItems":200,"items":{"$ref":"#/components/schemas/GuardrailSetListItem"}},"next_cursor":{"type":["string","null"],"minLength":1,"description":"Opaque cursor for the same endpoint and filter set, or null when this is the final page."}},"required":["data","next_cursor"]},"GuardrailSetPatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"description":"Partial metadata update with complete replacement semantics for definition. slug is not patchable. At least one supported field must be present. A JSON request body over 4,194,304 encoded bytes returns 413; a definition over its narrower 1,048,576 byte limit returns 422 with a definition field error.","properties":{"name":{"$ref":"#/components/schemas/GuardrailSetName"},"description":{"$ref":"#/components/schemas/GuardrailSetDescription"},"definition":{"$ref":"#/components/schemas/GuardrailDefinitionInput"}}},"GuardrailSetActiveDependency":{"type":"object","additionalProperties":false,"description":"One active agent pointer that must stop referencing the set before archive can succeed.","properties":{"kind":{"type":"string","const":"agent_version"},"agent_id":{"type":"string","format":"uuid"},"agent_slug":{"type":"string","minLength":2,"maxLength":48,"pattern":"^[a-z0-9_]+$"},"agent_name":{"type":"string","minLength":1,"maxLength":200},"agent_version_id":{"type":"string","format":"uuid"},"agent_version":{"type":["integer","null"],"minimum":1,"description":"Immutable snapshot number, or null for the mutable draft."},"deployment_stage":{"type":"string","enum":["draft","staging","production"]},"reference":{"type":"string","const":"behavior.guardrails.guardrail_set_ids"}},"required":["kind","agent_id","agent_slug","agent_name","agent_version_id","agent_version","deployment_stage","reference"]},"GuardrailSetInUseDetails":{"type":"object","additionalProperties":false,"properties":{"dependencies":{"type":"array","minItems":1,"description":"Complete deterministic dependency list for the transaction snapshot.","items":{"$ref":"#/components/schemas/GuardrailSetActiveDependency"}},"dependency_count":{"type":"integer","minimum":1,"description":"Exact number of entries in dependencies."}},"required":["dependencies","dependency_count"]},"GuardrailSetInUseErrorVariant":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string","const":"guardrail_set_in_use"},"message":{"type":"string","minLength":1},"request_id":{"type":"string","minLength":1,"maxLength":128},"details":{"$ref":"#/components/schemas/GuardrailSetInUseDetails"}},"required":["code","message","request_id","details"]},"Insight":{"type":"object","additionalProperties":false,"description":"A normalized saved analysis insight.","properties":{"id":{"type":"string","format":"uuid"},"board_id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"chart_type":{"$ref":"#/components/schemas/AnalysisChartType"},"time_range":{"$ref":"#/components/schemas/AnalysisTimeRange"},"bucket":{"$ref":"#/components/schemas/AnalysisBucket"},"group_by":{"$ref":"#/components/schemas/AnalysisGroupBy"},"config":{"$ref":"#/components/schemas/InsightConfig"},"position":{"type":"integer","minimum":0,"maximum":10000},"layout":{"$ref":"#/components/schemas/AnalysisInsightLayout"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","board_id","name","chart_type","time_range","bucket","group_by","config","position","layout","created_at","updated_at"]},"InsightCreateRequest":{"type":"object","additionalProperties":false,"description":"Creates a saved insight. Presentation fields use the documented defaults when omitted. Omit position to append after the board's current highest position. The request body is limited to 65536 bytes.","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"chart_type":{"allOf":[{"$ref":"#/components/schemas/AnalysisChartType"}],"default":"bar"},"time_range":{"allOf":[{"$ref":"#/components/schemas/AnalysisTimeRange"}],"default":"7d"},"bucket":{"allOf":[{"$ref":"#/components/schemas/AnalysisBucket"}],"default":"day"},"group_by":{"allOf":[{"$ref":"#/components/schemas/AnalysisGroupBy"}],"default":"time"},"config":{"$ref":"#/components/schemas/InsightConfigInput"},"position":{"type":"integer","minimum":0,"maximum":10000},"layout":{"$ref":"#/components/schemas/AnalysisInsightLayout"}},"required":["name","config"]},"InsightPatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"description":"A true partial update. The server merges supplied fields into the saved definition, validates the complete result, and returns the normalized insight.","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"chart_type":{"$ref":"#/components/schemas/AnalysisChartType"},"time_range":{"$ref":"#/components/schemas/AnalysisTimeRange"},"bucket":{"$ref":"#/components/schemas/AnalysisBucket"},"group_by":{"$ref":"#/components/schemas/AnalysisGroupBy"},"config":{"$ref":"#/components/schemas/InsightConfigInput"},"position":{"type":"integer","minimum":0,"maximum":10000},"layout":{"$ref":"#/components/schemas/AnalysisInsightLayout"}}},"InsightPreviewRequest":{"type":"object","additionalProperties":false,"description":"Computes an unsaved strict JSON definition. name and position are not part of this shape and are rejected. The request body is limited to 65536 bytes.","properties":{"chart_type":{"allOf":[{"$ref":"#/components/schemas/AnalysisChartType"}],"default":"bar"},"time_range":{"allOf":[{"$ref":"#/components/schemas/AnalysisTimeRange"}],"default":"7d"},"bucket":{"allOf":[{"$ref":"#/components/schemas/AnalysisBucket"}],"default":"day"},"group_by":{"allOf":[{"$ref":"#/components/schemas/AnalysisGroupBy"}],"default":"time"},"config":{"$ref":"#/components/schemas/InsightConfigInput"}},"required":["config"]},"InsightConfigInput":{"type":"object","additionalProperties":false,"description":"Query configuration. formula is a closed arithmetic expression over query names using numbers, +, -, *, /, and parentheses. group_by_2 requires one query, a primary grouping dimension other than none, and a different secondary dimension. formula and group_by_2 cannot be combined.","properties":{"queries":{"type":"array","minItems":1,"maxItems":6,"items":{"$ref":"#/components/schemas/AnalysisQueryInput"}},"formula":{"type":"string","maxLength":256,"description":"Blank input is normalized away; otherwise every referenced identifier must be a query name."},"group_by_2":{"$ref":"#/components/schemas/AnalysisSecondaryGroupBy"},"range_from":{"type":"string","format":"date-time","description":"Start of the window when time_range is custom. Required with range_to, must be before it, and the span may not exceed 400 days. Inclusive RFC3339 instant with an explicit timezone offset or Z. Fractional seconds are preserved. Rejected for any other time_range."},"range_to":{"type":"string","format":"date-time","description":"Exclusive RFC3339 end of the custom window, with an explicit timezone offset or Z. Fractional seconds are preserved; saved bounds are normalized to UTC. For complete calendar days, pass midnight after the last selected day in the desired timezone."},"display":{"$ref":"#/components/schemas/AnalysisInsightDisplay"}},"required":["queries"],"not":{"required":["formula","group_by_2"]}},"InsightConfig":{"type":"object","additionalProperties":false,"description":"Normalized query configuration returned for a saved insight.","properties":{"queries":{"type":"array","minItems":1,"maxItems":6,"items":{"$ref":"#/components/schemas/AnalysisQuery"}},"formula":{"type":"string","minLength":1,"maxLength":256},"group_by_2":{"$ref":"#/components/schemas/AnalysisSecondaryGroupBy"},"range_from":{"type":"string","format":"date-time","description":"Inclusive custom window start, normalized to UTC with fractional seconds preserved."},"range_to":{"type":"string","format":"date-time","description":"Exclusive custom window end, normalized to UTC with fractional seconds preserved."},"display":{"$ref":"#/components/schemas/AnalysisInsightDisplay"}},"required":["queries"],"not":{"required":["formula","group_by_2"]}},"HumanCallIngestStatus":{"type":"string","description":"queued accepted, waiting for a worker; transcribing fetching the audio and running the platform's batch speech-to-text with speaker diarization; analyzing transcript stored and analysis jobs dispatched; done analysis is under way on the resulting call; error gave up, see error. Transcription polls to completion and may take minutes on a long recording.","enum":["queued","transcribing","analyzing","done","error"]},"HumanCallTranscriptSegment":{"type":"object","additionalProperties":false,"description":"One attributed line of an already-produced transcript. role is accepted as a synonym for speaker, since that is what most transcription vendors emit.","properties":{"speaker":{"type":"string","maxLength":200,"description":"Who spoke. Free text, used verbatim. unknown is used when the segment is unattributed. When Kejue Voice transcribes a recording itself, diarized speakers are labelled speaker_N using the provider's own numbering, and an undiarized recording yields a single unknown speaker rather than invented turns."},"role":{"type":"string","maxLength":200,"description":"Synonym for speaker. Ignored when speaker is supplied."},"text":{"type":"string","minLength":1,"maxLength":10000}},"required":["text"]},"HumanCallIngestRequest":{"type":"object","additionalProperties":false,"description":"Supply exactly one of recording_url or transcript. The recording is fetched server-side through an SSRF-guarded client that refuses private address ranges, and is subject to a size limit.","properties":{"recording_url":{"type":"string","format":"uri","maxLength":2048,"description":"http or https URL the platform fetches the recording from. Must resolve to a public address; private ranges are refused. The audio is transcribed with speaker diarization and is not retained by the transcription provider — the uploaded file and the finished job are both deleted once the transcript is read."},"transcript":{"type":"array","minItems":1,"maxItems":5000,"description":"An already-produced transcript, for telephony that transcribes on its own. Skips speech-to-text and goes straight to analysis.","items":{"$ref":"#/components/schemas/HumanCallTranscriptSegment"}},"human_agent":{"type":"string","minLength":1,"maxLength":200,"description":"Identifier for the human who handled the call. Free text owned by the caller's own systems. Boards can group by it."},"direction":{"type":"string","enum":["inbound","outbound"],"default":"inbound"},"started_at":{"type":"string","format":"date-time","description":"When the call started. Must not be in the future."},"ended_at":{"type":"string","format":"date-time","description":"When the call ended. Used to derive duration when the recording does not report one."},"caller_number":{"type":"string","maxLength":32,"description":"The external party's number in E.164 form."},"external_ref":{"type":"string","maxLength":200,"description":"The caller's own identifier for this call. Unique per workspace: re-posting the same value returns the original ingest with 200 rather than creating a second call."},"extraction_object_ids":{"type":"array","maxItems":20,"uniqueItems":true,"description":"Extraction objects to run against the transcript. Each must exist and be unarchived in this workspace.","items":{"type":"string","format":"uuid"}},"metadata":{"type":"object","description":"Free-form JSON stored on the resulting call. The keys human_agent, ingest_source, and transcript_segments are written by the platform and are rejected here."},"key_terms":{"type":"array","maxItems":100,"description":"Words and phrases the transcriber should favor for this recording — product names, brands, people, jargon. Terms are trimmed, blanks are dropped, and case-insensitive duplicates are removed (the first spelling wins); at most 100 distinct terms of at most 100 characters each, with no control characters. They are merged with the platform's default key terms (this request's terms first) and capped to the transcription model's own limit; terms over that limit are not sent and the ingest gets a key_terms_truncated warning. Only used when Kejue Voice transcribes a recording_url. If the platform's transcription model does not support key terms, or a transcript is supplied, the request still succeeds, the terms are ignored, and the response's warnings say so (key_terms_unsupported / key_terms_not_applicable).","items":{"type":"string","minLength":1,"maxLength":100}}},"required":["human_agent","started_at"]},"HumanCallIngest":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"session_id":{"type":"string","format":"uuid","description":"The call this ingest created. Readable through the calls API as soon as the ingest is accepted."},"status":{"$ref":"#/components/schemas/HumanCallIngestStatus"},"source_kind":{"type":"string","enum":["url","upload","transcript"]},"external_ref":{"type":["string","null"],"maxLength":200},"human_agent":{"type":"string","maxLength":200},"key_terms":{"type":"array","maxItems":100,"description":"The key terms this request supplied, after normalization (trimmed, de-duplicated). Empty when none were sent. Platform default terms are not listed here.","items":{"type":"string","maxLength":100}},"warnings":{"type":"array","maxItems":20,"description":"Non-fatal conditions on this ingest, each with a stable code. Empty when there are none. A warning never changes status: the call is still transcribed and analyzed. Present on the 202 for conditions known at accept time, and added while the worker transcribes for the rest, so read the ingest again to see the full list.","items":{"$ref":"#/components/schemas/HumanCallIngestWarning"}},"error":{"type":["string","null"],"maxLength":500,"description":"A stable, bounded reason when status is error. Never a raw provider message, so it is safe to surface to an end user. The reasons are the recording URL was rejected, the recording could not be transcribed, the recording is larger than the limit, the recording produced no transcribable speech, the transcription provider timed out, the transcript could not be stored for analysis, speech-to-text is not configured for this deployment, and transcription did not succeed after repeated attempts."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}},"required":["id","session_id","status","source_kind","external_ref","human_agent","key_terms","warnings","error","created_at","updated_at","completed_at"]},"HumanCallIngestWarning":{"type":"object","additionalProperties":false,"description":"One non-fatal condition on a human-call ingest. Branch on code; message is human-readable and may change.","properties":{"code":{"type":"string","description":"key_terms_unsupported — key_terms were sent but the platform's human-call transcription model does not support key terms, so they were ignored. key_terms_not_applicable — key_terms were sent with a transcript, so no speech-to-text ran and they were ignored. key_terms_truncated — the request's terms plus the platform's default terms exceeded the transcription model's key-term limit, so the excess (platform defaults first, then the last request terms) was not sent. New codes may be added; treat an unknown code as informational.","examples":["key_terms_unsupported"]},"message":{"type":"string","maxLength":500}},"required":["code","message"]},"HumanCallIngestListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","maxItems":200,"items":{"$ref":"#/components/schemas/HumanCallIngest"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"InviteMemberRequest":{"type":"object","additionalProperties":false,"properties":{"email":{"type":"string","format":"email","maxLength":320},"role_id":{"type":"string","format":"uuid"}},"required":["email"]},"InviteMemberResponse":{"type":"object","additionalProperties":false,"properties":{"invitation_id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"role_id":{"type":"string","format":"uuid"},"role":{"type":"string","minLength":1},"invited_by_user_id":{"type":["string","null"],"format":"uuid"},"invited_by_email":{"type":["string","null"],"format":"email"},"status":{"type":"string","enum":["pending","expired","accepted","revoked"]},"version":{"type":"integer","format":"int64","minimum":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"invite_url":{"type":"string","minLength":1},"email_sent":{"type":"boolean"},"email_error":{"type":["string","null"]}},"required":["invitation_id","user_id","email","role_id","role","invited_by_user_id","invited_by_email","status","version","created_at","updated_at","expires_at","accepted_at","revoked_at","invite_url","email_sent","email_error"]},"SecretName":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]{1,63}$","description":"Stable name of an active workspace secret. The referenced plaintext is never returned through the API."},"MCPAuthMode":{"type":"string","enum":["none","bearer","oauth2"]},"MCPToolName":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.:/-]{0,255}$"},"MCPToolHashes":{"type":"object","additionalProperties":{"type":"string","pattern":"^[a-f0-9]{64}$"},"description":"Map of remote MCP tool name to SHA-256 of the sanitized description and input schema."},"MCPStoredTool":{"type":"object","additionalProperties":false,"description":"Bounded sanitized tool snapshot. Approved snapshots define agent admission; observed snapshots remain untrusted until drift approval.","properties":{"name":{"$ref":"#/components/schemas/MCPToolName"},"description":{"type":"string","maxLength":4000},"input_schema":{"type":"object","additionalProperties":true,"description":"Model-facing object schema with untrusted annotations removed and schema prose sanitized."},"hash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["name","description","input_schema","hash"]},"MCPAttachmentStatus":{"type":"string","description":"Machine-readable readiness of this registration for agent attachment.","enum":["not_introspected","hash_enforcement_disabled","approved_catalog_invalid","ready_with_drift","ready","archived"]},"MCPApproveDriftResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["no_drift","drift_approved"]},"pinned_tool_hashes":{"$ref":"#/components/schemas/MCPToolHashes"}},"required":["id","status","pinned_tool_hashes"]},"MCPIntrospectResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"tools":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/MCPIntrospectedTool"}},"removed_tools":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/MCPToolName"}},"has_drift":{"type":"boolean"},"pinned_tool_hashes":{"$ref":"#/components/schemas/MCPToolHashes"},"observed_tool_hashes":{"$ref":"#/components/schemas/MCPToolHashes"},"last_introspected_at":{"type":"string","format":"date-time"},"last_introspection_error":{"type":["string","null"],"description":"Always null after a successful introspection."}},"required":["id","slug","tools","removed_tools","has_drift","pinned_tool_hashes","observed_tool_hashes","last_introspected_at","last_introspection_error"]},"MCPIntrospectedTool":{"type":"object","additionalProperties":false,"properties":{"name":{"$ref":"#/components/schemas/MCPToolName"},"description":{"type":"string","maxLength":4000,"description":"Sanitized LLM-facing description prefixed with the MCP server slug."},"input_schema":{"type":"object","additionalProperties":true,"description":"Remote JSON Schema after structural validation; root type is object when specified."},"hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"allowed":{"type":"boolean","description":"False when tool_allowlist is non-empty and does not include this name."},"pinned_hash":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$"},"drift_status":{"type":"string","enum":["new","unchanged","changed"]},"blocked_by_hash":{"type":"boolean","description":"True when hash enforcement prevents this new or changed tool from being exposed to agents."}},"required":["name","description","input_schema","hash","allowed","pinned_hash","drift_status","blocked_by_hash"]},"MCPServerCreateRequest":{"type":"object","additionalProperties":false,"description":"auth_mode=none forbids every credential field; bearer requires auth_secret_ref; oauth2 uses a pre-registered client-credentials grant, requires both OAuth credential refs, and forbids auth_secret_ref. Every OAuth token request includes an RFC 8707 resource indicator. Empty optional strings normalize to null.","properties":{"slug":{"type":"string","minLength":2,"maxLength":48,"pattern":"^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$","description":"Immutable public identifier."},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"url":{"type":"string","format":"uri","maxLength":4096,"pattern":"^https://","description":"Public HTTPS Streamable HTTP MCP endpoint. Userinfo, fragments, private DNS/IP targets, and redirects to unsafe targets are rejected."},"auth_mode":{"allOf":[{"$ref":"#/components/schemas/MCPAuthMode"}],"default":"none"},"auth_secret_ref":{"type":["string","null"],"pattern":"^[A-Za-z_][A-Za-z0-9_]{1,63}$"},"tool_allowlist":{"type":"array","maxItems":500,"uniqueItems":true,"default":[],"description":"Empty means all successfully discovered tools are allowed, subject to hash enforcement.","items":{"$ref":"#/components/schemas/MCPToolName"}},"timeout_ms":{"type":"integer","minimum":500,"maximum":60000,"default":10000},"enforce_hashes":{"type":"boolean","default":true},"oauth_token_url":{"type":["string","null"],"format":"uri","maxLength":4096,"pattern":"^https://","description":"Public HTTPS token endpoint. Null enables MCP 2025-11-25 endpoint-specific/root protected-resource discovery followed by RFC 8414 or OpenID Connect discovery."},"oauth_client_id_ref":{"type":["string","null"],"pattern":"^[A-Za-z_][A-Za-z0-9_]{1,63}$"},"oauth_client_secret_ref":{"type":["string","null"],"pattern":"^[A-Za-z_][A-Za-z0-9_]{1,63}$"},"oauth_scope":{"type":["string","null"],"maxLength":2000,"description":"Space-separated OAuth scope tokens; at most 100 unique printable ASCII tokens."},"oauth_audience":{"type":["string","null"],"format":"uri","maxLength":4096,"pattern":"^https://","description":"RFC 8707 resource indicator sent in every token request. When null, the discovered canonical resource or configured MCP URL is used automatically."}},"required":["slug","name","url"]},"MCPServerListItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"url":{"type":"string","format":"uri"},"auth_mode":{"$ref":"#/components/schemas/MCPAuthMode"},"timeout_ms":{"type":"integer"},"enforce_hashes":{"type":"boolean"},"last_introspected_at":{"type":["string","null"],"format":"date-time"},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","slug","name","description","url","auth_mode","timeout_ms","enforce_hashes","last_introspected_at","archived_at","created_at","updated_at"]},"MCPServerDetail":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"url":{"type":"string","format":"uri"},"auth_mode":{"$ref":"#/components/schemas/MCPAuthMode"},"auth_secret_ref":{"type":["string","null"]},"tool_allowlist":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/MCPToolName"}},"timeout_ms":{"type":"integer"},"enforce_hashes":{"type":"boolean"},"pinned_tool_hashes":{"$ref":"#/components/schemas/MCPToolHashes"},"observed_tool_hashes":{"$ref":"#/components/schemas/MCPToolHashes"},"approved_tools":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/MCPStoredTool"}},"observed_tools":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/MCPStoredTool"}},"attachment_status":{"$ref":"#/components/schemas/MCPAttachmentStatus"},"oauth_token_url":{"type":["string","null"],"format":"uri"},"oauth_client_id_ref":{"type":["string","null"]},"oauth_client_secret_ref":{"type":["string","null"]},"oauth_scope":{"type":["string","null"]},"oauth_audience":{"type":["string","null"],"format":"uri","description":"Explicit resource override, or null when the runtime derives it from discovery/the MCP URL."},"last_introspected_at":{"type":["string","null"],"format":"date-time"},"last_introspection_error":{"type":["string","null"],"description":"Sanitized machine reason for the last failed introspection; never contains an upstream body or secret."},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","slug","name","description","url","auth_mode","auth_secret_ref","tool_allowlist","timeout_ms","enforce_hashes","pinned_tool_hashes","observed_tool_hashes","approved_tools","observed_tools","attachment_status","oauth_token_url","oauth_client_id_ref","oauth_client_secret_ref","oauth_scope","oauth_audience","last_introspected_at","last_introspection_error","archived_at","created_at","updated_at"]},"MCPServerListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MCPServerListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"MCPServerPatchRequest":{"type":"object","minProperties":1,"additionalProperties":false,"description":"Partial replacement fields. The complete resulting configuration must satisfy the same auth and safety invariants as creation. Slug is not patchable.","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"url":{"type":"string","format":"uri","maxLength":4096,"pattern":"^https://"},"auth_mode":{"$ref":"#/components/schemas/MCPAuthMode"},"auth_secret_ref":{"type":["string","null"],"pattern":"^[A-Za-z_][A-Za-z0-9_]{1,63}$"},"tool_allowlist":{"type":"array","maxItems":500,"uniqueItems":true,"items":{"$ref":"#/components/schemas/MCPToolName"}},"timeout_ms":{"type":"integer","minimum":500,"maximum":60000},"enforce_hashes":{"type":"boolean"},"oauth_token_url":{"type":["string","null"],"format":"uri","maxLength":4096,"pattern":"^https://"},"oauth_client_id_ref":{"type":["string","null"],"pattern":"^[A-Za-z_][A-Za-z0-9_]{1,63}$"},"oauth_client_secret_ref":{"type":["string","null"],"pattern":"^[A-Za-z_][A-Za-z0-9_]{1,63}$"},"oauth_scope":{"type":["string","null"],"maxLength":2000},"oauth_audience":{"type":["string","null"],"format":"uri","maxLength":4096,"pattern":"^https://","description":"Null restores automatic RFC 8707 resource derivation."}}},"Member":{"type":"object","additionalProperties":false,"properties":{"membership_id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"display_name":{"type":"string"},"role_id":{"type":"string","format":"uuid"},"role":{"type":"string","minLength":1},"version":{"type":"integer","format":"int64","minimum":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"is_protected":{"type":"boolean","description":"True for the platform's protected owner account. It can never be removed, demoted, disabled or have its credentials reset by another member."}},"required":["membership_id","user_id","email","display_name","role_id","role","version","created_at","updated_at","is_protected"]},"MemberInvitation":{"type":"object","additionalProperties":false,"properties":{"invitation_id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"role_id":{"type":"string","format":"uuid"},"role":{"type":"string","minLength":1},"invited_by_user_id":{"type":["string","null"],"format":"uuid"},"invited_by_email":{"type":["string","null"],"format":"email"},"status":{"type":"string","enum":["pending","expired","accepted","revoked"]},"version":{"type":"integer","format":"int64","minimum":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"}},"required":["invitation_id","user_id","email","role_id","role","invited_by_user_id","invited_by_email","status","version","created_at","updated_at","expires_at","accepted_at","revoked_at"]},"MemberListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"next_cursor":{"type":["string","null"],"description":"Cursor for the next membership page, or null after the final page."}},"required":["data","next_cursor"]},"MemberInvitationListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MemberInvitation"}},"next_cursor":{"type":["string","null"],"description":"Cursor for the next unresolved-invitation page, or null after the final page."}},"required":["data","next_cursor"]},"MemberRemovalResponse":{"type":"object","additionalProperties":false,"properties":{"membership_id":{"type":"string","format":"uuid"},"removed_user_id":{"type":"string","format":"uuid"},"revoked_api_keys":{"type":"integer","format":"int64","minimum":0},"revoked_sessions":{"type":"integer","format":"int64","minimum":0}},"required":["membership_id","removed_user_id","revoked_api_keys","revoked_sessions"]},"ObserveTokenResponse":{"type":"object","properties":{"token":{"type":"string"},"url":{"type":"string"},"room_name":{"type":"string"}},"required":["token","url","room_name"]},"OutboundE164":{"type":"string","pattern":"^(\\+[1-9][0-9]{7,14}|[0-9*#]{1,20}|sips?:[^@\\s]+@[A-Za-z0-9._-]+(:[0-9]{1,5})?(;\\S*)?)$","description":"A dial target: an E.164 number, a bare internal number/extension of 1 to 20 [0-9*#] characters (e.g. 103, 2770124), or a sip:/sips: URI (e.g. sip:103@pbx.example.com)."},"OutboundTransport":{"type":"string","enum":["livekit_sip","twilio_media_streams"]},"OutboundCallingWindow":{"type":"object","additionalProperties":false,"description":"Recurring lead-local interval. Weekdays use ISO numbering (Monday=1 through Sunday=7); start is inclusive and end is exclusive. Windows may be adjacent but may not overlap on the same day.","properties":{"weekdays":{"type":"array","minItems":1,"maxItems":7,"uniqueItems":true,"items":{"type":"integer","minimum":1,"maximum":7}},"start":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$","examples":["09:00"]},"end":{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$","examples":["17:00"]}},"required":["weekdays","start","end"]},"OutboundPolicySource":{"type":"string","enum":["organization","call_override","legacy_default"]},"OutboundTimingPolicySnapshot":{"type":"object","additionalProperties":false,"description":"Immutable contact-hours decision stored on a job at creation time.","properties":{"schema_version":{"type":"integer","const":1},"source":{"$ref":"#/components/schemas/OutboundPolicySource"},"org_policy_version":{"type":"integer","format":"int64","minimum":0},"timezone":{"type":"string","description":"Canonical IANA timezone used to interpret windows."},"windows":{"type":"array","minItems":1,"maxItems":32,"items":{"$ref":"#/components/schemas/OutboundCallingWindow"}}},"required":["schema_version","source","org_policy_version","timezone","windows"]},"OutboundCapacityRetry":{"type":"object","additionalProperties":false,"properties":{"minimum_seconds":{"type":"integer","minimum":1},"maximum_seconds":{"type":"integer","minimum":1},"jitter":{"type":"boolean"}},"required":["minimum_seconds","maximum_seconds","jitter"]},"OutboundRetryPolicySnapshot":{"type":"object","additionalProperties":false,"description":"Immutable retry decision stored on a job at creation time. Capacity waits never consume a call attempt. A carrier or route failure (a SIP 5xx, or a call that could not be placed on the route) first gets a few retries that do not consume an attempt, with growing waits; we redial at once only when another trunk that has not yet failed this job is available. After that, each route failure consumes an attempt, so the job ends at max_attempts. A carrier's Retry-After is honored as the minimum wait, up to one hour.","properties":{"version":{"type":"integer","const":1},"source":{"$ref":"#/components/schemas/OutboundPolicySource"},"org_policy_version":{"type":"integer","format":"int64","minimum":0},"destination_busy_backoff_seconds":{"$ref":"#/components/schemas/OutboundRetryDelays"},"destination_unavailable_backoff_seconds":{"$ref":"#/components/schemas/OutboundRetryDelays"},"destination_declined_backoff_seconds":{"$ref":"#/components/schemas/OutboundRetryDelays"},"retry_declined":{"type":"boolean"},"capacity_retry":{"$ref":"#/components/schemas/OutboundCapacityRetry"},"ambiguous_provider_result":{"type":"string","const":"reconcile_before_retry"}},"required":["version","source","org_policy_version","destination_busy_backoff_seconds","destination_unavailable_backoff_seconds","destination_declined_backoff_seconds","retry_declined","capacity_retry","ambiguous_provider_result"]},"OutboundRetryDelays":{"type":"array","minItems":1,"maxItems":9,"items":{"type":"integer","minimum":1,"maximum":604800}},"OutboundPolicyOverrides":{"type":"object","additionalProperties":false,"description":"Per-job overrides. The organization policy may disable all overrides, and overridden windows must fit inside organization guardrails. `timezone` is accepted only with `timezone_mode=custom`; custom mode requires it.","allOf":[{"if":{"required":["timezone"]},"then":{"required":["timezone_mode"],"properties":{"timezone_mode":{"const":"custom"}}}},{"if":{"required":["timezone_mode"],"properties":{"timezone_mode":{"const":"custom"}}},"then":{"required":["timezone"]}}],"properties":{"timezone_mode":{"type":"string","enum":["contact","organization","custom"]},"timezone":{"type":"string","description":"Canonical IANA timezone. Required for custom mode and rejected for contact or organization mode."},"windows":{"type":"array","minItems":1,"maxItems":32,"items":{"$ref":"#/components/schemas/OutboundCallingWindow"}},"max_attempts":{"type":"integer","minimum":1,"maximum":10},"destination_busy_backoff_seconds":{"$ref":"#/components/schemas/OutboundRetryDelays"},"destination_unavailable_backoff_seconds":{"$ref":"#/components/schemas/OutboundRetryDelays"},"destination_declined_backoff_seconds":{"$ref":"#/components/schemas/OutboundRetryDelays"},"retry_declined":{"type":"boolean"}}},"OutboundJobStatus":{"type":"string","enum":["scheduled","queued","claimed","reserving","dialing","ringing","active","retry_wait","completed","failed","canceled","expired","provider_unknown"]},"OutboundJobCreateRequest":{"type":"object","additionalProperties":false,"description":"Maximum encoded body size is 262144 bytes. `max_attempts` is a compatibility shorthand for `policy_overrides.max_attempts`; supplying both with different values is rejected.","properties":{"agent_id":{"type":"string","format":"uuid"},"agent_version":{"type":"string","enum":["production","staging"],"default":"production","description":"Which of the agent's versions the call runs. `production` (the default) dials the deployed version; `staging` dials the version last promoted to staging so a change can be heard on a real call before it is deployed, and fails 409 `no_staging_version` when the agent has none. The resolved version id is stored on the job, so a later promote or deploy does not change what it dials. `staging` is only accepted with agent_id."},"flow_id":{"type":"string","format":"uuid","description":"Schedule the job against a flow instead of a single agent. The flow's start agent is resolved at create time and stored as the job's agent_id, with flow_id kept alongside as the annotation the dialer forwards at placement. Exactly one of agent_id and flow_id is required. Requires the `flows` entitlement, and the flow must be dispatchable now or the create fails 422 on `flow_id`."},"group_id":{"type":"string","format":"uuid","description":"Schedule the job against a group of agents. One member is picked at create time for the destination number (the contact's stored number when contact_id is given) using the group's routing strategy. It is stored as the job's agent_id, with group_id and group_member_id alongside; placement and every retry dial that member, always on its production version (agent_version `staging` is rejected with 422 `unsupported_with_group`). Exactly one of agent_id, flow_id and group_id is required (422 `exactly_one_required` on `group_id`). Requires the `groups` entitlement, and the group must have a member that can take calls now or the create fails 422 on `group_id` (not_found, archived, no_members)."},"contact_id":{"type":"string","format":"uuid"},"to_number":{"$ref":"#/components/schemas/OutboundE164"},"number_pool_id":{"type":"string","format":"uuid"},"phone_number_id":{"type":"string","format":"uuid"},"trunk_id":{"type":"string","format":"uuid","description":"Optional route constraint. A forced phone number must belong to this trunk; a pool must have an eligible member on it."},"transport":{"$ref":"#/components/schemas/OutboundTransport"},"scheduled_at":{"type":"string","format":"date-time","description":"Requested schedule instant. Past values are accepted and evaluated from the current instant for contact hours."},"contact_timezone":{"type":"string","description":"Legacy per-call IANA timezone override. Prefer policy_overrides for new clients."},"expires_at":{"type":"string","format":"date-time","description":"Explicit expiry must be after scheduled_at and the next permitted contact-hours instant, and no more than 90 days after scheduled_at. When omitted, the policy TTL is added to the current evaluation instant for a past schedule, or to scheduled_at for a future schedule."},"max_attempts":{"type":"integer","minimum":1,"maximum":10},"policy_overrides":{"$ref":"#/components/schemas/OutboundPolicyOverrides"},"priority":{"type":"integer","minimum":-100,"maximum":100,"default":0,"description":"Higher values are claimed first among otherwise-due jobs."},"variables":{"type":"object","maxProperties":50,"propertyNames":{"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,63}$"},"additionalProperties":{"type":"string","description":"Maximum 2000 UTF-8 bytes per value."}},"metadata":{"type":"object","additionalProperties":true},"dncr":{"$ref":"#/components/schemas/DNCROptions"}},"allOf":[{"oneOf":[{"required":["agent_id"],"not":{"anyOf":[{"required":["flow_id"]},{"required":["group_id"]}]}},{"required":["flow_id"],"not":{"anyOf":[{"required":["agent_id"]},{"required":["group_id"]}]}},{"required":["group_id"],"not":{"anyOf":[{"required":["agent_id"]},{"required":["flow_id"]}]}}]},{"oneOf":[{"required":["number_pool_id"],"not":{"required":["phone_number_id"]}},{"required":["phone_number_id"],"not":{"required":["number_pool_id"]}}]},{"anyOf":[{"required":["contact_id"]},{"required":["to_number"]}]}]},"OutboundJobAccepted":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/OutboundJobStatus"},"scheduled_at":{"type":"string","format":"date-time"},"not_before":{"type":"string","format":"date-time","description":"Earliest instant after applying contact hours. Capacity may delay execution further."},"expires_at":{"type":"string","format":"date-time"},"contact_timezone":{"type":"string"},"policy_context":{"$ref":"#/components/schemas/OutboundTimingPolicySnapshot"},"retry_policy":{"$ref":"#/components/schemas/OutboundRetryPolicySnapshot"},"max_attempts":{"type":"integer","minimum":1,"maximum":10},"dncr":{"anyOf":[{"$ref":"#/components/schemas/DNCRSnapshot"},{"type":"object","additionalProperties":false,"properties":{}}]}},"required":["id","status","scheduled_at","not_before","expires_at","contact_timezone","policy_context","retry_policy","max_attempts"]},"OutboundJob":{"type":"object","additionalProperties":false,"description":"Stable job-owned state and resource identifiers. Mutable agent, pool, phone-number, and trunk display enrichment is intentionally resolved through each canonical resource so it cannot change beneath this representation.","properties":{"id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"flow_id":{"type":"string","format":"uuid","description":"The flow this job targets, absent for a job that targets a single agent. agent_id is then the flow's start agent as resolved when the job was created."},"group_id":{"type":"string","format":"uuid","description":"The group this job targets, absent otherwise. agent_id is then the agent of the member picked when the job was created."},"group_member_id":{"type":"string","format":"uuid","description":"The group member picked for this job, absent unless group_id is set."},"agent_version_id":{"type":"string","format":"uuid"},"contact_id":{"type":"string","format":"uuid"},"destination_e164":{"$ref":"#/components/schemas/OutboundE164"},"number_pool_id":{"type":"string","format":"uuid"},"phone_number_id":{"type":"string","format":"uuid"},"trunk_id":{"type":"string","format":"uuid"},"transport":{"$ref":"#/components/schemas/OutboundTransport"},"status":{"$ref":"#/components/schemas/OutboundJobStatus"},"priority":{"type":"integer","minimum":-100,"maximum":100},"scheduled_at":{"type":"string","format":"date-time"},"not_before":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"contact_timezone":{"type":"string"},"attempt_count":{"type":"integer","minimum":0},"consumed_attempt_count":{"type":"integer","minimum":0},"max_attempts":{"type":"integer","minimum":1,"maximum":10},"variables":{"type":"object","additionalProperties":{"type":"string"}},"metadata":{"type":"object","additionalProperties":true},"policy_context":{"$ref":"#/components/schemas/OutboundTimingPolicySnapshot"},"retry_policy":{"$ref":"#/components/schemas/OutboundRetryPolicySnapshot"},"last_failure_class":{"type":"string"},"last_provider_code":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"dncr":{"anyOf":[{"$ref":"#/components/schemas/DNCRSnapshot"},{"type":"object","additionalProperties":false,"properties":{}}]},"dncr_result":{"$ref":"#/components/schemas/DNCRResult"}},"required":["id","org_id","agent_id","destination_e164","status","priority","scheduled_at","not_before","contact_timezone","attempt_count","consumed_attempt_count","max_attempts","variables","metadata","policy_context","retry_policy","created_at","updated_at"]},"OutboundAttemptStatus":{"type":"string","enum":["reserved","dial_requesting","dialing","ringing","active","completed","failed","canceled","provider_unknown"]},"OutboundAttempt":{"type":"object","additionalProperties":false,"description":"Sanitized attempt state. Raw provider status text is never public; branch on the normalized failure_class, provider_status_code, and status.","properties":{"id":{"type":"string","format":"uuid"},"attempt_number":{"type":"integer","minimum":1},"session_id":{"type":"string","format":"uuid"},"phone_number_id":{"type":"string","format":"uuid"},"trunk_id":{"type":"string","format":"uuid"},"transport":{"$ref":"#/components/schemas/OutboundTransport"},"status":{"$ref":"#/components/schemas/OutboundAttemptStatus"},"provider_call_id":{"type":"string"},"sip_call_id":{"type":"string"},"failure_class":{"type":"string"},"provider_status_code":{"type":"string"},"requested_at":{"type":"string","format":"date-time"},"ringing_at":{"type":"string","format":"date-time"},"answered_at":{"type":"string","format":"date-time"},"ended_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","attempt_number","transport","status","created_at","updated_at"]},"OutboundJobDetailResponse":{"type":"object","additionalProperties":false,"properties":{"job":{"$ref":"#/components/schemas/OutboundJob"},"attempts":{"type":"array","items":{"$ref":"#/components/schemas/OutboundAttempt"}}},"required":["job","attempts"]},"OutboundJobListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OutboundJob"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"OutboundJobCancelRequest":{"type":"object","additionalProperties":false,"properties":{"reason":{"type":"string","minLength":8,"maxLength":500,"description":"Optional audit reason. Leading/trailing whitespace is removed and control characters are rejected."}}},"OutboundJobCancelResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","const":"canceled"},"changed":{"type":"boolean"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","status","changed","updated_at"]},"OutboundNumberPoolSelectionPolicy":{"type":"string","enum":["sticky_least_loaded","least_loaded","weighted_round_robin"]},"OutboundNumberPoolStatus":{"type":"string","enum":["active","archived"]},"OutboundNumberPoolMemberInput":{"type":"object","additionalProperties":false,"properties":{"phone_number_id":{"type":"string","format":"uuid"},"priority":{"type":"integer","minimum":0,"maximum":1000000,"default":100,"description":"Lower priorities are considered first. Explicit zero is meaningful and is not treated as omitted."},"weight":{"type":"integer","minimum":1,"maximum":1000000,"default":100},"enabled":{"type":"boolean","default":true}},"required":["phone_number_id"]},"OutboundNumberPoolMember":{"type":"object","additionalProperties":false,"description":"Stable membership and selection settings. Read the phone-number resource for current routing metadata and the capacity endpoint for draining state.","properties":{"phone_number_id":{"type":"string","format":"uuid"},"priority":{"type":"integer","minimum":0},"weight":{"type":"integer","minimum":1},"enabled":{"type":"boolean"}},"required":["phone_number_id","priority","weight","enabled"]},"OutboundNumberPool":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"selection_policy":{"$ref":"#/components/schemas/OutboundNumberPoolSelectionPolicy"},"status":{"$ref":"#/components/schemas/OutboundNumberPoolStatus"},"members":{"type":"array","items":{"$ref":"#/components/schemas/OutboundNumberPoolMember"}},"archived_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","selection_policy","status","members","created_at","updated_at"]},"OutboundNumberPoolCreateRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"selection_policy":{"allOf":[{"$ref":"#/components/schemas/OutboundNumberPoolSelectionPolicy"}],"default":"sticky_least_loaded"},"members":{"type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/components/schemas/OutboundNumberPoolMemberInput"}}},"required":["name","members"]},"OutboundNumberPoolPatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"selection_policy":{"$ref":"#/components/schemas/OutboundNumberPoolSelectionPolicy"},"status":{"$ref":"#/components/schemas/OutboundNumberPoolStatus"},"members":{"type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/components/schemas/OutboundNumberPoolMemberInput"}}}},"OutboundNumberPoolListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OutboundNumberPool"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"OutboundCapacityScopeType":{"type":"string","enum":["provider_account","provider_profile","campaign"]},"OutboundCapacitySharingMode":{"type":"string","enum":["org","physical"]},"OutboundCapacityMode":{"type":"string","enum":["unknown","fixed","unlimited"]},"OutboundCapacityProfileSource":{"type":"string","enum":["manual","provider_discovered"]},"OutboundCapacityProfileRequest":{"type":"object","additionalProperties":false,"description":"Maximum encoded body size is 65536 bytes. Campaign profiles must use org sharing. Limit fields are allowed only in fixed mode; fixed mode requires max_concurrent or max_cps, and cps_burst requires max_cps.","properties":{"scope_type":{"$ref":"#/components/schemas/OutboundCapacityScopeType"},"scope_key":{"type":"string","minLength":1,"maxLength":200,"description":"Stable provider-native or logical identifier. Never place credentials here."},"sharing_mode":{"allOf":[{"$ref":"#/components/schemas/OutboundCapacitySharingMode"}],"default":"org"},"capacity_mode":{"allOf":[{"$ref":"#/components/schemas/OutboundCapacityMode"}],"default":"unknown"},"max_concurrent":{"type":"integer","minimum":1,"maximum":1000000},"max_cps":{"type":"number","exclusiveMinimum":0,"maximum":100000},"cps_burst":{"type":"integer","minimum":1,"maximum":1000000}},"required":["scope_type","scope_key"],"oneOf":[{"properties":{"capacity_mode":{"const":"fixed"}},"required":["capacity_mode"],"anyOf":[{"required":["max_concurrent"]},{"required":["max_cps"]}]},{"properties":{"capacity_mode":{"enum":["unknown","unlimited"]}},"not":{"anyOf":[{"required":["max_concurrent"]},{"required":["max_cps"]},{"required":["cps_burst"]}]}}]},"OutboundCapacityProfileCore":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"scope_type":{"$ref":"#/components/schemas/OutboundCapacityScopeType"},"scope_key":{"type":"string","minLength":1,"maxLength":200},"sharing_mode":{"$ref":"#/components/schemas/OutboundCapacitySharingMode"},"capacity_mode":{"$ref":"#/components/schemas/OutboundCapacityMode"},"max_concurrent":{"type":"integer","minimum":1},"max_cps":{"type":"number","exclusiveMinimum":0},"cps_burst":{"type":"integer","minimum":1},"source":{"$ref":"#/components/schemas/OutboundCapacityProfileSource"},"observed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","scope_type","scope_key","sharing_mode","capacity_mode","source","created_at","updated_at"]},"OutboundCapacityProfile":{"allOf":[{"$ref":"#/components/schemas/OutboundCapacityProfileCore"}],"unevaluatedProperties":false},"OutboundCapacityProfileListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OutboundCapacityProfile"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"OutboundCapacityState":{"type":"string","enum":["available","available_unverified","busy","draining"]},"OutboundCapacityStatusCore":{"type":"object","properties":{"scope_type":{"type":"string"},"scope_id":{"type":"string"},"name":{"type":"string"},"capacity_mode":{"type":"string","enum":["unknown","inherit","fixed","unlimited"]},"max_concurrent":{"type":"integer","minimum":1},"max_cps":{"type":"number","exclusiveMinimum":0},"cps_burst":{"type":"integer","minimum":1},"active":{"type":"integer","minimum":0},"available":{"type":"integer","minimum":0},"state":{"$ref":"#/components/schemas/OutboundCapacityState"},"draining":{"type":"boolean"},"sharing_mode":{"$ref":"#/components/schemas/OutboundCapacitySharingMode"},"source":{"$ref":"#/components/schemas/OutboundCapacityProfileSource"},"capacity_profile_id":{"type":"string","format":"uuid"}},"required":["scope_type","scope_id","capacity_mode","active","state"]},"OutboundCapacityStatus":{"allOf":[{"$ref":"#/components/schemas/OutboundCapacityStatusCore"}],"unevaluatedProperties":false},"OutboundNumberCapacityStatus":{"allOf":[{"$ref":"#/components/schemas/OutboundCapacityStatusCore"},{"type":"object","properties":{"e164":{"$ref":"#/components/schemas/OutboundE164"},"trunk_id":{"type":"string","format":"uuid"},"active_calls":{"type":"integer","minimum":0},"effective_available":{"type":"integer","minimum":0}},"required":["e164","trunk_id","active_calls"]}],"unevaluatedProperties":false},"OutboundCapacityProfileStatus":{"allOf":[{"$ref":"#/components/schemas/OutboundCapacityProfileCore"},{"type":"object","properties":{"active":{"type":"integer","minimum":0},"available":{"type":"integer","minimum":0},"state":{"$ref":"#/components/schemas/OutboundCapacityState"}},"required":["active","state"]}],"unevaluatedProperties":false},"OutboundCapacityOverview":{"type":"object","additionalProperties":false,"properties":{"org":{"$ref":"#/components/schemas/OutboundCapacityStatus"},"account":{"$ref":"#/components/schemas/OutboundCapacityStatus"},"trunks":{"type":"array","items":{"$ref":"#/components/schemas/OutboundCapacityStatus"}},"phone_numbers":{"type":"array","items":{"$ref":"#/components/schemas/OutboundNumberCapacityStatus"}},"profiles":{"type":"array","items":{"$ref":"#/components/schemas/OutboundCapacityProfileStatus"}},"observed_at":{"type":"string","format":"date-time"}},"required":["org","trunks","phone_numbers","profiles","observed_at"]},"OutboundPolicyCore":{"type":"object","properties":{"schema_version":{"type":"integer","const":1},"default_timezone_mode":{"type":"string","enum":["contact","organization"]},"default_windows":{"type":"array","minItems":1,"maxItems":32,"items":{"$ref":"#/components/schemas/OutboundCallingWindow"}},"guardrail_windows":{"type":"array","minItems":1,"maxItems":32,"items":{"$ref":"#/components/schemas/OutboundCallingWindow"}},"default_max_attempts":{"type":"integer","minimum":1,"maximum":10},"destination_busy_backoff_seconds":{"$ref":"#/components/schemas/OutboundRetryDelays"},"destination_unavailable_backoff_seconds":{"$ref":"#/components/schemas/OutboundRetryDelays"},"destination_declined_backoff_seconds":{"$ref":"#/components/schemas/OutboundRetryDelays"},"retry_declined":{"type":"boolean"},"default_job_ttl_seconds":{"type":"integer","minimum":300,"maximum":7776000},"allow_call_overrides":{"type":"boolean"},"dncr":{"$ref":"#/components/schemas/DNCROrganizationPolicy"}},"required":["schema_version","default_timezone_mode","default_windows","guardrail_windows","default_max_attempts","destination_busy_backoff_seconds","destination_unavailable_backoff_seconds","destination_declined_backoff_seconds","retry_declined","default_job_ttl_seconds","allow_call_overrides"]},"OutboundPolicyDocument":{"allOf":[{"$ref":"#/components/schemas/OutboundPolicyCore"},{"type":"object","properties":{"policy_version":{"type":"integer","format":"int64","minimum":0},"organization_version":{"type":"integer","format":"int64","minimum":1},"organization_timezone":{"type":"string","description":"Canonical IANA timezone."},"updated_at":{"type":"string","format":"date-time"}},"required":["policy_version","organization_version","organization_timezone","updated_at"]}],"unevaluatedProperties":false},"OutboundPolicyUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/OutboundPolicyCore"},{"type":"object","properties":{"organization_timezone":{"type":"string","description":"IANA timezone such as Asia/Dubai."}},"required":["organization_timezone"]}],"unevaluatedProperties":false},"OutboundCallRequest":{"type":"object","properties":{"agent_id":{"type":"string","description":"Required unless flow_id or group_id is given; exactly one of the three is allowed."},"flow_id":{"type":"string","description":"Place the call with a flow instead of a single agent. The flow's start agent places it and the graph's handoffs take over. Mutually exclusive with agent_id — exactly one of the two is required, and naming neither or both is a 400. Requires the `flows` entitlement."},"group_id":{"type":"string","format":"uuid","description":"Place the call with a group of agents. The group's routing strategy picks a member for to_number, and that agent's production version places the call. The call records group_id and group_member_id. Exactly one of agent_id, flow_id and group_id. Requires the `groups` entitlement."},"trunk_id":{"type":"string"},"to_number":{"type":"string"},"caller_id":{"type":"string"},"metadata":{"type":"string"},"variables":{"type":"object","additionalProperties":true},"dncr":{"$ref":"#/components/schemas/DNCROptions"}},"required":["trunk_id","to_number","caller_id","variables"]},"OutboundCallResponse":{"type":"object","properties":{"call_id":{"type":"string"},"room_name":{"type":"string"},"sip_call_id":{"type":"string"},"participant_id":{"type":"string"},"agent_dispatch_id":{"type":"string"}},"required":["call_id","room_name","sip_call_id","participant_id","agent_dispatch_id"]},"CurrentOrganization":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"retention_days":{"type":"integer","minimum":1,"maximum":3650},"default_timezone":{"type":"string","minLength":1,"description":"Canonical IANA timezone."},"mfa_policy":{"type":"string","enum":["off","optional","required"],"description":"Second-factor requirement for PASSWORD sign-in to this organization. `off` asks for no second factor, `optional` lets members enrol and challenges those who have, `required` obliges every member to enrol before using the dashboard. Federated (OIDC) identities are governed by the upstream identity provider instead. Changing this requires the `mfa` entitlement; reading it never does."},"pii_access_mode":{"type":"string","enum":["open","reason","approval"],"description":"How much friction stands in front of an un-redacted read of call data. `open` asks for nothing, `reason` requires a written justification per read, `approval` requires a request another member approves before any read is allowed. It never changes WHICH permission is required — `pii-access:unmask` still gates raw transcripts and raw tool I/O, `calls:download-recording` still gates audio. Changing this requires the `pii_redaction_config` entitlement; reading it never does."},"pii_access_grant_days":{"type":"integer","minimum":0,"maximum":365,"description":"How many days an approved break-glass request stays usable. `0` means it never expires. Stamped onto a request when it is approved, so shortening this later never cuts short an approval already granted. Only meaningful when `pii_access_mode` is `approval`."},"pii_masking":{"type":"string","enum":["enabled","disabled"],"description":"Whether calls are PII-masked when they are stored. `enabled` masks the built-in identifier set plus the organization's custom terms. `disabled` (the default for new organizations) stores transcripts, tool input/output, guardrail reasons and context messages as spoken; credentials in tool I/O (authorization headers, tokens, passwords, API keys, PINs, card security codes) stay masked. Applies to calls recorded after the change — stored calls are never rewritten. Changing this requires the `pii_redaction_config` entitlement; reading it never does."},"ai_connectors":{"$ref":"#/components/schemas/AIConnectorsMode"},"version":{"type":"integer","format":"int64","minimum":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","slug","name","retention_days","default_timezone","mfa_policy","pii_access_mode","pii_access_grant_days","pii_masking","ai_connectors","version","created_at","updated_at"]},"PatchMemberInvitationRequest":{"type":"object","additionalProperties":false,"properties":{"role_id":{"type":"string","format":"uuid"}},"required":["role_id"]},"PatchMemberRequest":{"type":"object","additionalProperties":false,"properties":{"role_id":{"type":"string","format":"uuid"}},"required":["role_id"]},"PatchOrgRequest":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"retention_days":{"type":"integer","minimum":1,"maximum":3650},"default_timezone":{"type":"string","minLength":1,"description":"Canonical IANA timezone, for example Asia/Dubai."},"mfa_policy":{"type":"string","enum":["off","optional","required"],"description":"Second-factor requirement for password sign-in. Requires the `mfa` entitlement to CHANGE; a write of the current value is always permitted so automation can converge without the add-on."},"pii_access_mode":{"type":"string","enum":["open","reason","approval"],"description":"Friction in front of un-redacted reads of call data — `open`, `reason`, or `approval`. Requires the `pii_redaction_config` entitlement to CHANGE; a write of the current value is always permitted so automation can converge without the add-on."},"pii_access_grant_days":{"type":"integer","minimum":0,"maximum":365,"description":"Lifetime in days of an approved break-glass request; `0` never expires. Same entitlement rule as `pii_access_mode`."},"pii_masking":{"type":"string","enum":["enabled","disabled"],"description":"`enabled` masks PII when calls are stored; `disabled` stores calls as spoken (credentials in tool I/O stay masked). Applies to calls recorded after the change. Same entitlement rule as `pii_access_mode`."},"ai_connectors":{"$ref":"#/components/schemas/AIConnectorsMode"}}},"PIIAccessRequestStatus":{"type":"string","description":"Effective status. `expired` is computed, not stored: an approval whose lifetime has elapsed remains `approved` in the database, because the decision did happen and rewriting it on a clock tick would be dishonest.","enum":["pending","approved","rejected","revoked","expired"]},"PIIAccessRequest":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"call_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The call covered by this request, or null for an Inference transcription job. Exactly one subject is non-null."},"requested_by":{"type":"string","format":"uuid"},"requester_email":{"description":"Null for a member whose home workspace is elsewhere; the id is always present.","oneOf":[{"type":"string"},{"type":"null"}]},"requester_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"reason":{"type":"string","description":"The requester's written justification."},"status":{"$ref":"#/components/schemas/PIIAccessRequestStatus"},"decided_by":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"decided_by_email":{"oneOf":[{"type":"string"},{"type":"null"}]},"decided_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"decision_note":{"oneOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"description":"When the granted access lapses, or null when the organization set `pii_access_grant_days` to 0 (never expires).","oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"inference_job_id":{"type":"string","format":"uuid","description":"The Inference transcription job covered by a browser queue request. Omitted for call requests; Voice API keys return call requests only."}},"required":["id","call_id","requested_by","requester_email","requester_name","reason","status","decided_by","decided_by_email","decided_at","decision_note","expires_at","created_at","updated_at"],"oneOf":[{"properties":{"call_id":{"type":"string","format":"uuid"}},"not":{"required":["inference_job_id"]}},{"required":["inference_job_id"],"properties":{"call_id":{"type":"null"},"inference_job_id":{"type":"string","format":"uuid"}}}]},"PIIAccessRequestList":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PIIAccessRequest"}},"next_cursor":{"description":"Opaque cursor for the next page, or null at the end.","oneOf":[{"type":"string"},{"type":"null"}]},"pending_count":{"type":"integer","minimum":0,"description":"Requests awaiting a decision across the whole organization, independent of this page's filters. Always 0 for a caller without `pii-access:approve`, who only ever sees their own requests."},"self_decision_allowed":{"type":"boolean","description":"This caller is the organization's only approver, so the API will let them decide their own request rather than leave it undecidable. False everywhere else."}},"required":["data","next_cursor","pending_count","self_decision_allowed"]},"PIIAccessDecisionRequest":{"type":"object","additionalProperties":false,"properties":{"decision":{"type":"string","enum":["approve","reject"]},"note":{"type":"string","maxLength":500,"description":"Optional context shown to the requester in the decision notification."}},"required":["decision"]},"PIIAccessRevokeRequest":{"type":"object","additionalProperties":false,"properties":{"note":{"type":"string","maxLength":500,"description":"Optional context shown to the requester."}}},"PhoneNumberDirection":{"type":"string","enum":["inbound","outbound","both"]},"PhoneNumberTransport":{"type":"string","enum":["livekit_sip","twilio_media_streams"]},"PhoneNumberStatus":{"type":"string","enum":["provisioning","active","error","archived"]},"PhoneNumberOutboundCapacityMode":{"type":"string","enum":["inherit","fixed","unlimited"]},"E164PhoneNumber":{"type":"string","pattern":"^(\\+[1-9][0-9]{7,14}|[0-9*#]{1,20})$","description":"An E.164 number with a non-zero country code and 7 to 15 digits, or a bare internal number/extension of 1 to 20 [0-9*#] characters (e.g. 103, 2770124)."},"InboundRoutingRules":{"type":"array","maxItems":32,"description":"Ordered SIP-header routes. First matching route wins; agent_id on the phone number is the required default. A route may use one legacy condition or a conditions group matched with all (AND) or any (OR). At most 8 conditions are allowed per route and 64 across the number. Requires livekit_sip transport and inbound or both direction. Omit on PATCH to preserve; [] removes all routes; null is invalid. Changes provision header mappings automatically and return provisioning until reconciled. Values ignore case unless case_sensitive is true. Missing headers match only not_exists, never negative comparisons. An archived matching agent falls back to the default agent. Only new calls use changes; existing calls continue with their selected agent.","items":{"$ref":"#/components/schemas/InboundRoutingRule"}},"InboundRoutingRule":{"oneOf":[{"$ref":"#/components/schemas/InboundRoutingLegacyRule"},{"$ref":"#/components/schemas/InboundRoutingGroupedRule"}]},"InboundRoutingCondition":{"type":"object","additionalProperties":false,"required":["header","operator"],"properties":{"header":{"type":"string","minLength":1,"maxLength":128,"description":"Case-insensitive SIP header name, such as X-Language or Accept-Language. Authentication headers are not supported."},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","starts_with","ends_with","exists","not_exists"]},"value":{"type":"string","maxLength":1024,"description":"Non-empty comparison value (at most 1024 UTF-8 bytes). Omit or send an empty string for exists and not_exists. CR, LF, and NUL are forbidden."},"case_sensitive":{"type":"boolean","default":false,"description":"Compare header values with case sensitivity. Header names always ignore case."}}},"InboundRoutingLegacyRule":{"type":"object","additionalProperties":false,"required":["header","operator","agent_id"],"properties":{"header":{"type":"string","minLength":1,"maxLength":128},"operator":{"type":"string","enum":["equals","not_equals","contains","not_contains","starts_with","ends_with","exists","not_exists"]},"value":{"type":"string","maxLength":1024},"case_sensitive":{"type":"boolean","default":false},"agent_id":{"type":"string","format":"uuid","description":"Active agent in the same organization."}}},"InboundRoutingGroupedRule":{"type":"object","additionalProperties":false,"required":["conditions","agent_id"],"properties":{"match":{"type":"string","enum":["all","any"],"default":"all","description":"all requires every condition (AND); any requires at least one condition (OR)."},"conditions":{"type":"array","minItems":1,"maxItems":8,"items":{"$ref":"#/components/schemas/InboundRoutingCondition"}},"agent_id":{"type":"string","format":"uuid","description":"Active agent in the same organization selected when this route matches."}}},"PhoneNumberCreateRequest":{"type":"object","additionalProperties":false,"description":"Connects a purchased or BYO number to an active SIP trunk. livekit_sip is the default transport. twilio_media_streams is available only on an active twilio_automated trunk and configures Twilio Programmable Voice instead of LiveKit SIP.\n\ndirection defaults to inbound. outbound_capacity_mode defaults to inherit; fixed requires max_concurrent_outbound, while that limit is forbidden for inherit and unlimited. agent_id may be omitted to create an unassigned route. At most one of agent_id, flow_id and group_id may be set.","properties":{"inbound_routing_rules":{"$ref":"#/components/schemas/InboundRoutingRules"},"trunk_id":{"type":"string","format":"uuid"},"e164":{"$ref":"#/components/schemas/E164PhoneNumber"},"label":{"type":"string","maxLength":160},"agent_id":{"type":"string","format":"uuid"},"flow_id":{"type":"string","format":"uuid","description":"Answer inbound calls with a flow instead of a single agent. The flow's start agent takes the call and the graph's handoffs take over. Mutually exclusive with agent_id, and rejected with 422 unless the flow is dispatchable now (un-archived, at least one agent on the canvas, and a start agent with a published version). Requires the `flows` entitlement."},"group_id":{"type":"string","format":"uuid","description":"Answer inbound calls with a group of agents. The group's routing strategy picks a member for the caller's number. Mutually exclusive with agent_id, flow_id and inbound_routing_rules (422 `conflict`). Rejected on twilio_media_streams numbers (422 `unsupported_transport`) and unless the group exists (`not_found`), is not archived (`archived`) and has a member that can take calls now (`no_members`). Requires the `groups` entitlement (403 entitlement_required)."},"direction":{"$ref":"#/components/schemas/PhoneNumberDirection"},"transport":{"$ref":"#/components/schemas/PhoneNumberTransport"},"outbound_capacity_mode":{"$ref":"#/components/schemas/PhoneNumberOutboundCapacityMode"},"max_concurrent_outbound":{"type":"integer","minimum":1},"outbound_weight":{"type":"integer","minimum":1,"maximum":10000,"default":1},"outbound_draining":{"type":"boolean","default":false}},"required":["trunk_id","e164"]},"PhoneNumber":{"type":"object","additionalProperties":false,"description":"Complete safe phone-number configuration and provider state. Raw provider errors are never present in the public representation.","properties":{"inbound_routing_rules":{"$ref":"#/components/schemas/InboundRoutingRules"},"id":{"type":"string","format":"uuid"},"trunk_id":{"type":"string","format":"uuid"},"trunk_name":{"type":"string"},"e164":{"$ref":"#/components/schemas/E164PhoneNumber"},"label":{"type":["string","null"]},"agent_id":{"type":["string","null"],"format":"uuid"},"agent_slug":{"type":["string","null"]},"flow_id":{"type":["string","null"],"format":"uuid","description":"The flow this number answers with, or null when it answers with a single agent. Exactly one of the agent_id/agent_slug pair and the flow_id/flow_slug pair is ever non-null. The agent that actually answers a flow-targeted number is the flow's start agent; it is deliberately not mirrored into agent_slug, so this read model keeps reporting what the operator configured."},"flow_slug":{"type":["string","null"]},"group_id":{"type":["string","null"],"format":"uuid","description":"The group this number answers with, or null. When set, agent_id and agent_slug read null: the agent that answers is picked per call from the group's members, and the session records it (group_member_id on the call). At most one of agent_id, flow_id and group_id is non-null."},"group_name":{"type":["string","null"]},"direction":{"$ref":"#/components/schemas/PhoneNumberDirection"},"transport":{"$ref":"#/components/schemas/PhoneNumberTransport"},"livekit_inbound_trunk_id":{"type":["string","null"]},"livekit_dispatch_rule_id":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/PhoneNumberStatus"},"last_error":{"type":["string","null"],"description":"Sanitized recovery-oriented message."},"last_error_code":{"type":["string","null"],"description":"Stable machine-readable provider/provisioning error code."},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outbound_capacity_mode":{"$ref":"#/components/schemas/PhoneNumberOutboundCapacityMode"},"max_concurrent_outbound":{"type":["integer","null"]},"outbound_weight":{"type":"integer","minimum":1},"outbound_draining":{"type":"boolean"}},"required":["id","trunk_id","trunk_name","e164","label","agent_id","agent_slug","flow_id","flow_slug","group_id","group_name","direction","transport","livekit_inbound_trunk_id","livekit_dispatch_rule_id","status","last_error","last_error_code","archived_at","created_at","updated_at","outbound_capacity_mode","max_concurrent_outbound","outbound_weight","outbound_draining"]},"PhoneNumberListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumber"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"PhoneNumberProvisioningResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","const":"provisioning"},"resource_url":{"type":"string","pattern":"^/v1/phone-numbers/[0-9a-f-]+$"},"poll_after_seconds":{"type":"integer","minimum":1},"provisioning_async":{"type":"boolean","const":true}},"required":["id","status","resource_url","poll_after_seconds","provisioning_async"]},"PhoneNumberPatchRequest":{"type":"object","minProperties":1,"additionalProperties":false,"description":"Omitted fields are unchanged. Explicit null clears label, agent, flow or group assignment, or max_concurrent_outbound. Setting capacity mode to inherit or unlimited also clears the fixed limit. A number answers with one target, so assigning any of agent_id, flow_id or group_id implicitly clears the other two; naming more than one in the same request is rejected with 422.","properties":{"inbound_routing_rules":{"$ref":"#/components/schemas/InboundRoutingRules"},"label":{"type":["string","null"],"maxLength":160},"agent_id":{"type":["string","null"],"format":"uuid"},"flow_id":{"type":["string","null"],"format":"uuid","description":"Re-point the number at a flow. Setting it clears agent_id; null clears the flow assignment. Setting a flow requires the `flows` entitlement and a dispatchable flow; clearing it never does, so a workspace that lost the entitlement can always un-stick a number."},"group_id":{"type":["string","null"],"format":"uuid","description":"Re-point the number at a group of agents. Setting it clears agent_id and flow_id; it cannot be combined with inbound_routing_rules and is refused on twilio_media_streams numbers. Setting a group requires the `groups` entitlement and a group with a member that can take calls now (422 on `group_id`: not_found, archived, no_members, conflict, unsupported_transport); null clears it and is never gated."},"direction":{"$ref":"#/components/schemas/PhoneNumberDirection"},"outbound_capacity_mode":{"$ref":"#/components/schemas/PhoneNumberOutboundCapacityMode"},"max_concurrent_outbound":{"type":["integer","null"],"minimum":1},"outbound_weight":{"type":"integer","minimum":1,"maximum":10000},"outbound_draining":{"type":"boolean"}}},"PiiConfigPutRequest":{"type":"object","additionalProperties":false,"properties":{"custom_entities":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/PiiCustomEntity"}}},"required":["custom_entities"]},"PiiConfigResponse":{"type":"object","additionalProperties":false,"properties":{"custom_entities":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/PiiCustomEntity"}},"builtin_entities":{"type":"array","minItems":8,"maxItems":8,"uniqueItems":true,"items":{"type":"string","enum":["SSN","CREDIT_CARD","EMAIL","PHONE","DOB","POLICY_NUMBER","MRN","ACCOUNT_NUMBER"]}},"version":{"type":"integer","format":"int64","minimum":0},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["custom_entities","builtin_entities","version","updated_at"]},"PiiCustomEntity":{"type":"object","additionalProperties":false,"properties":{"label":{"type":"string","minLength":2,"maxLength":32,"pattern":"^[A-Z][A-Z0-9_]{1,31}$"},"terms":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"string","minLength":1,"maxLength":200}}},"required":["label","terms"]},"PronunciationTableCreateRequest":{"type":"object","additionalProperties":false,"properties":{"slug":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9_-]+$","description":"Immutable workspace-unique slug."},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000,"description":"Blank strings normalize to null."},"definition":{"$ref":"#/components/schemas/PronunciationDefinitionInput"}},"required":["slug","name"]},"PronunciationEntryInput":{"type":"object","additionalProperties":false,"properties":{"id":{"$ref":"#/components/schemas/PronunciationLocalIdInput"},"from":{"type":"string","minLength":1,"maxLength":500,"description":"Literal source text. The complete raw value and normalized value are each at most 500 Unicode characters. Surrounding Unicode whitespace is removed; controls and an empty normalized value are rejected. In word mode, a match is rejected only when immediately adjacent to a Unicode letter, number, or underscore, so punctuation-bearing terms such as C++ and .NET work."},"to":{"type":"string","maxLength":1000,"description":"Literal replacement sent to TTS. Controls are rejected. An empty string intentionally removes matched text from spoken output; prompt variables, SSML, and phoneme syntax are not interpreted."},"match":{"type":"string","pattern":"^\\p{Z}*(?:[Ww][Oo][Rr][Dd]|[Aa][Nn][Yy][Ww][Hh][Ee][Rr][Ee])\\p{Z}*$","default":"word","description":"word or anywhere. ASCII case is ignored and surrounding Unicode separator characters are removed; responses always emit the lowercase canonical value."},"case_sensitive":{"type":"boolean","default":false}},"required":["id","from","to"]},"PronunciationEntry":{"type":"object","additionalProperties":false,"properties":{"id":{"$ref":"#/components/schemas/CatalogLocalId"},"from":{"type":"string","minLength":1,"maxLength":500},"to":{"type":"string","maxLength":1000},"match":{"type":"string","enum":["word","anywhere"]},"case_sensitive":{"type":"boolean"}},"required":["id","from","to","match","case_sensitive"]},"PronunciationDefinitionInput":{"type":"object","additionalProperties":false,"properties":{"entries":{"type":"array","maxItems":250,"default":[],"description":"Ordered substitutions. Entry ids must be unique. Duplicate effective matches with the same match mode and case-sensitivity are rejected using Unicode case folding when case_sensitive is false. At one input position, the earlier entry wins an overlap; replacement output is never rescanned, so rules do not cascade. Omitting entries produces an explicit empty array in responses.","items":{"$ref":"#/components/schemas/PronunciationEntryInput"}}}},"PronunciationDefinition":{"type":"object","additionalProperties":false,"properties":{"entries":{"type":"array","maxItems":250,"items":{"$ref":"#/components/schemas/PronunciationEntry"}}},"required":["entries"]},"PronunciationLocalIdInput":{"type":"string","minLength":1,"maxLength":128,"pattern":"^\\p{Z}*[A-Za-z0-9][A-Za-z0-9._:-]*\\p{Z}*$","description":"Stable entry identifier on input, unique within the table after normalization. The complete raw value contains at most 128 Unicode characters. Surrounding Unicode separator characters are removed; the canonical response starts with an ASCII letter or digit and then uses only ASCII letters, digits, dots, colons, hyphens, or underscores. Controls and unpaired surrogate escapes are rejected."},"PronunciationTableDetail":{"type":"object","additionalProperties":false,"description":"Complete normalized table. configuration_errors is omitted for canonical rows. When present, it identifies invalid legacy or out-of-band stored fields and entries omitted from the safe definition. A malformed root/container or an encoded definition above 1,048,576 bytes returns the canonical empty definition; a legacy array above 250 entries is truncated before entries are normalized. Repair by replacing the complete definition with the current ETag.","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"definition":{"$ref":"#/components/schemas/PronunciationDefinition"},"configuration_errors":{"type":"array","minItems":1,"readOnly":true,"description":"Exact repair diagnostics for legacy stored content. Invalid entries are not assumed to execute at call time. Correct every field and PATCH one complete definition using the current ETag.","items":{"$ref":"#/components/schemas/FieldError"}}},"required":["id","slug","name","description","archived_at","created_at","updated_at","definition"]},"PronunciationTableListItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","slug","name","description","archived_at","created_at","updated_at"]},"PronunciationTableListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PronunciationTableListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"PronunciationTablePatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000,"description":"Null or a blank string clears the description."},"definition":{"$ref":"#/components/schemas/PronunciationDefinitionInput"}}},"ProviderCatalogEntry":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"display_name":{"type":"string","minLength":1,"maxLength":300,"description":"The provider's product name — the only name this catalog carries. Select models and voices by their id; the upstream engine behind a product, its wire protocol and its connector are platform implementation detail and are not part of this API."},"type":{"type":["string","null"],"enum":["stt","llm","tts","slm","sts","embedding","endpointing",null]},"beta":{"type":"boolean"},"key_terms_enabled":{"type":"boolean","description":"True when this speech-to-text provider accepts the agent's key terms as a recognition prompt."},"agent_text_input_enabled":{"type":"boolean","description":"True when this speech-to-text provider relays the agent's own spoken words to the transcriber next to the caller audio (agent text input), so the transcriber can separate the caller's reply from the agent's echo. Only providers whose integration lists an agent-text model can have it on."},"sort_order":{"type":"integer","description":"Picker ordering (lower first). Providers arrive sorted by this."},"available":{"type":"boolean","description":"True when this model service can currently run requests. Choose an available model or contact support when false."},"availability_reason":{"type":["string","null"],"enum":["temporarily_unavailable",null],"description":"Why available is false; null when the provider is available."},"models":{"type":"array","items":{"$ref":"#/components/schemas/ProviderModel"}},"voices":{"type":"array","items":{"$ref":"#/components/schemas/ProviderVoice"}},"voice_settings_schema":{"type":"array","description":"Valid per-agent tts_voice_settings keys for this provider's connector. Empty means non-empty overrides are not supported.","items":{"$ref":"#/components/schemas/ProviderSettingField"}},"stt_capabilities":{"oneOf":[{"$ref":"#/components/schemas/ProviderSTTCapabilities"},{"type":"null"}],"description":"Which agent speech settings this transcriber honors. null for a provider that is not a transcriber, and for a transcriber whose capabilities the platform does not publish."}},"required":["id","display_name","type","beta","available","availability_reason","models","voices","voice_settings_schema","stt_capabilities"]},"ProviderSTTCapabilities":{"type":"object","additionalProperties":false,"description":"One transcriber's agent-visible capabilities: which agent settings it honors and within what limits. Capability fields can be added over time; ignore unknown ones.","properties":{"two_stage_only":{"type":"boolean","description":"The transcriber only runs under a speech-model pipeline, so it cannot be selected for a cascaded one."},"async":{"type":"boolean","description":"The transcriber returns one result per turn rather than a live stream."},"vocabulary":{"type":"boolean","description":"Accepts stt_vocabulary (custom terms and context)."},"vocabulary_limits":{"oneOf":[{"$ref":"#/components/schemas/STTVocabularyLimits"},{"type":"null"}],"description":"Tighter caps on stt_vocabulary.terms for this transcriber, or null when the generic limits apply."},"language_hints":{"type":"boolean","description":"Accepts stt_language_hints, a list of expected languages."},"languages":{"oneOf":[{"$ref":"#/components/schemas/STTLanguageCatalog"},{"type":"null"}],"description":"Accepted stt_language / stt_language_hints codes, or null when the transcriber has no language setting."},"endpointing":{"$ref":"#/components/schemas/STTEndpointingCapability"}},"required":["two_stage_only","async","vocabulary","vocabulary_limits","language_hints","languages","endpointing"]},"STTVocabularyLimits":{"type":"object","additionalProperties":false,"description":"Caps on a recognition vocabulary, tighter than the stored shape.","properties":{"max_terms":{"type":"integer","description":"Most terms accepted."},"max_term_length":{"type":"integer","description":"Longest accepted term, in characters."}},"required":["max_terms","max_term_length"]},"ProviderListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProviderCatalogEntry"}}},"required":["data"]},"ProviderPublicProjection":{"type":"object","additionalProperties":false,"description":"Describes the fail-closed projection applied to legacy operator-managed JSON before it is returned by the public catalog.","properties":{"public_schema_version":{"type":"integer","const":1},"status":{"type":"string","enum":["complete","filtered","defaulted"]},"dropped_fields_count":{"type":"integer","minimum":1,"description":"Present when unknown fields were omitted from a filtered object."},"reason_code":{"type":"string","enum":["legacy_null"],"description":"Present when a legacy null object was replaced by an empty object."}},"required":["public_schema_version","status"]},"ProviderModelCapabilities":{"type":"object","additionalProperties":false,"properties":{"streaming":{"type":"boolean"},"tool_calls":{"type":"boolean"},"barge_in":{"type":"boolean"},"multilingual":{"type":"boolean"},"context_window":{"type":"integer","minimum":1,"maximum":10000000},"sample_rate":{"type":"integer","minimum":1,"maximum":384000},"dimensions":{"type":"integer","minimum":1,"maximum":1000000},"languages":{"type":"array","maxItems":64,"items":{"type":"string","minLength":1,"maxLength":35,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{1,8}){0,7}$"}},"format":{"type":"string","enum":["pcm_s16le","pcm_f32le","mulaw","alaw","mp3","opus","wav"]},"gender":{"type":"string","enum":["female","male","neutral"]}}},"ProviderVoiceSettings":{"type":"object","additionalProperties":false,"description":"Safe union of connector-declared voice setting keys. The companion voice_settings_schema on the provider gives the exact per-connector subset, ranges, defaults, and options.","properties":{"volume":{"type":"number","minimum":-20,"maximum":20},"speed":{"type":"number","minimum":0.5,"maximum":2},"temperature":{"type":"number","minimum":0,"maximum":1},"top_p":{"type":"number","minimum":0,"maximum":1},"stability":{"type":"number","minimum":0,"maximum":1},"similarity_boost":{"type":"number","minimum":0,"maximum":1},"style":{"type":"number","minimum":0,"maximum":1},"expressiveness":{"type":"number","minimum":0,"maximum":1},"use_speaker_boost":{"type":"boolean"},"normalize_text":{"type":"boolean"}}},"ProviderModel":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["llm","stt","tts","speechlm","s2s","embedding"]},"display_name":{"type":"string","minLength":1,"maxLength":300},"capabilities":{"$ref":"#/components/schemas/ProviderModelCapabilities"},"projection":{"$ref":"#/components/schemas/ProviderPublicProjection"}},"required":["id","kind","display_name","capabilities","projection"]},"ProviderVoice":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"display_name":{"type":"string","minLength":1,"maxLength":300},"description":{"type":["string","null"],"minLength":1,"maxLength":1000},"language":{"type":["string","null"],"minLength":1,"maxLength":1000},"gender":{"type":["string","null"],"minLength":1,"maxLength":1000,"description":"Stable value from GET /voice-attributes, or null for a legacy/unclassified voice."},"dialect":{"type":["string","null"],"minLength":1,"maxLength":1000,"description":"Stable parent dialect/accent value from GET /voice-attributes, or null when not applicable."},"sub_dialect":{"type":["string","null"],"minLength":1,"maxLength":1000,"description":"Optional refinement whose parent is identified by the voice-attribute catalog."},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"settings":{"$ref":"#/components/schemas/ProviderVoiceSettings"},"projection":{"$ref":"#/components/schemas/ProviderPublicProjection"},"supported_dialects":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120}}},"required":["id","display_name","description","language","gender","dialect","sub_dialect","tags","settings","projection","supported_dialects"]},"ProviderSettingField":{"type":"object","additionalProperties":false,"properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["number","select","boolean","text"]},"default":{"description":"Provider default scalar value."},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","exclusiveMinimum":0},"options":{"type":"array","items":{"$ref":"#/components/schemas/ProviderSettingOption"}},"description":{"type":"string"}},"required":["key","label","type"]},"ProviderSettingOption":{"type":"object","additionalProperties":false,"properties":{"label":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["label","value"]},"VoiceLanguageOption":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string","minLength":1,"maxLength":35},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["code","label"]},"VoiceGenderOption":{"type":"object","additionalProperties":false,"properties":{"value":{"type":"string","minLength":1,"maxLength":120},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["value","label"]},"VoiceDialectOption":{"type":"object","additionalProperties":false,"properties":{"value":{"type":"string","minLength":1,"maxLength":120},"label":{"type":"string","minLength":1,"maxLength":200},"language":{"type":"string","minLength":1,"maxLength":35},"country_code":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2 origin mark, or the AR/EN language fallback used for cross-country dialects."}},"required":["value","label","language","country_code"]},"VoiceSubDialectOption":{"type":"object","additionalProperties":false,"properties":{"value":{"type":"string","minLength":1,"maxLength":120},"label":{"type":"string","minLength":1,"maxLength":200},"dialect":{"type":"string","minLength":1,"maxLength":120,"description":"Parent VoiceDialectOption.value."}},"required":["value","label","dialect"]},"BackgroundNoiseListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BackgroundNoiseOption"}}},"required":["data"]},"BackgroundNoiseOption":{"type":"object","additionalProperties":false,"properties":{"key":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","maxLength":64,"description":"Value for behavior.background_noise.sound."},"name":{"type":"string","description":"Display name."},"description":{"type":["string","null"]},"builtin":{"type":"boolean","description":"True for a clip bundled with the platform; false for an operator-uploaded library sound."},"preview_available":{"type":"boolean","description":"Whether an audio preview of the sound can be streamed. Always false for bundled clips."}},"required":["key","name","description","builtin","preview_available"]},"STTLanguageCatalog":{"type":"object","additionalProperties":false,"properties":{"select":{"type":"string","enum":["single","multi"],"description":"single pins one language (or auto-detect); multi allows several, where one pick sets stt_language and two or more set stt_language_hints with stt_language auto."},"auto":{"type":"string","description":"Display label of the auto-detect choice."},"options":{"type":"array","items":{"$ref":"#/components/schemas/STTLanguageOption"}}},"required":["select","auto","options"]},"STTLanguageOption":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string","description":"Lower-case language code sent as stt_language or a stt_language_hints entry, such as ar or ar-eg."},"label":{"type":"string"},"group":{"type":"string","description":"Optional section label for grouping options."}},"required":["code","label"]},"STTEndpointingCapability":{"type":"object","additionalProperties":false,"properties":{"capable":{"type":"boolean","description":"The recognizer emits a native end-of-turn signal."},"reliable":{"type":"boolean","description":"Its end-of-turn signal is usable mid-stream, so endpointing_mode stt can drive turns."},"window_min_ms":{"type":["integer","null"],"description":"Smallest accepted silence window, or null when there is no window setting."},"window_max_ms":{"type":["integer","null"],"description":"Largest accepted silence window, or null when there is no window setting."},"window_default_ms":{"type":["integer","null"],"description":"Default silence window, or null when not applicable."},"stt_driven_default_ms":{"type":["integer","null"],"description":"Silence window used for STT-driven turns when the agent sets none, or null when not applicable."},"sensitivity":{"type":"boolean","description":"The recognizer exposes an end-of-turn sensitivity setting."},"auto":{"type":"boolean","description":"With endpointing_mode auto on a cascaded pipeline, the recognizer's own turn detection decides when the caller has finished; otherwise auto uses the agent's own endpointer."}},"required":["capable","reliable","window_min_ms","window_max_ms","window_default_ms","stt_driven_default_ms","sensitivity","auto"]},"VoiceAttributeCatalog":{"type":"object","additionalProperties":false,"properties":{"languages":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/VoiceLanguageOption"}},"genders":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/VoiceGenderOption"}},"dialects":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/VoiceDialectOption"}},"sub_dialects":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/VoiceSubDialectOption"}}},"required":["languages","genders","dialects","sub_dialects"]},"RBACAction":{"type":"string","enum":["create","read","update","delete","deploy","promote","execute-live-tools","listen-live","download-recording","inject-context","hangup","legal-hold","place-outbound","start-web","read-sip-pcap","unmask","approve","read-internal","cancel","manage-memory","test","reset-password"]},"RBACCatalogResource":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"actions":{"type":"array","minItems":1,"uniqueItems":true,"items":{"$ref":"#/components/schemas/RBACAction"}},"api_key_scope_available":{"type":"boolean"}},"required":["name","label","actions","api_key_scope_available"]},"RBACCatalogResponse":{"type":"object","additionalProperties":false,"properties":{"resources":{"type":"array","items":{"$ref":"#/components/schemas/RBACCatalogResource"}},"action_descriptions":{"type":"object","additionalProperties":{"type":"string","minLength":1}}},"required":["resources","action_descriptions"]},"Role":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":1000},"is_system":{"type":"boolean"},"is_locked":{"type":"boolean"},"permissions":{"type":"array","maxItems":256,"uniqueItems":true,"items":{"type":"string","minLength":1}},"member_count":{"type":"integer","format":"int64","minimum":0},"version":{"type":"integer","format":"int64","minimum":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","is_system","is_locked","permissions","member_count","version","created_at","updated_at"]},"RoleListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"next_cursor":{"type":["string","null"],"description":"Cursor for the next role page, or null after the final page."}},"required":["data","next_cursor"]},"RoleCreateRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":1000},"permissions":{"type":"array","maxItems":256,"items":{"type":"string","minLength":1}}},"required":["name","permissions"]},"RolePatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":1000},"permissions":{"type":"array","maxItems":256,"items":{"type":"string","minLength":1}}}},"QueryResult":{"type":"object","additionalProperties":false,"description":"Complete computed result. The server returns 422 instead of truncating when rows, series, or cells exceed the limits object.","properties":{"group_by":{"$ref":"#/components/schemas/AnalysisGroupBy"},"series":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1}},"rows":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/QueryResultRow"}},"stacked":{"type":"boolean"},"generated_at":{"type":"string","format":"date-time"},"limits":{"$ref":"#/components/schemas/AnalysisResultLimits"},"previous":{"type":["number","null"],"description":"The first query's value over the window immediately preceding the selected one, measured with the identical joins, filters, and aggregate. Present only for number_delta insights, and null when the range has no comparable predecessor."}},"required":["group_by","series","rows","stacked","generated_at","limits"]},"QueryResultRow":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"string","maxLength":500,"description":"Primary dimension label. Empty string is used by an ungrouped empty result."},"values":{"type":"object","maxProperties":50,"additionalProperties":{"type":"number"},"description":"Finite numeric values keyed by the names in series."}},"required":["x","values"]},"AnalysisResultLimits":{"type":"object","additionalProperties":false,"properties":{"rows":{"type":"integer","const":500},"series":{"type":"integer","const":50},"cells":{"type":"integer","const":10000}},"required":["rows","series","cells"]},"RawTranscriptResponse":{"type":"object","additionalProperties":false,"properties":{"session_id":{"type":"string","format":"uuid"},"transcript_id":{"type":"string","format":"uuid"},"leg":{"type":"string","enum":["caller","brief"]},"segments":{"type":"array","items":{"$ref":"#/components/schemas/TranscriptSegment"}}},"required":["session_id","transcript_id","leg","segments"]},"RawToolIOResponse":{"type":"object","additionalProperties":false,"properties":{"session_id":{"type":"string","format":"uuid"},"tool_id":{"type":"string","format":"uuid"},"request":{"description":"Original unredacted JSON request value."},"response":{"description":"Original unredacted JSON response value."}},"required":["session_id","tool_id","request","response"]},"RecordingSummary":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["agent","caller","mixed"]},"leg":{"type":"string","enum":["caller","brief"]},"segment_index":{"type":"integer","minimum":0},"status":{"type":"string","enum":["recording","encrypting","ready","failed"]},"format":{"type":"string","enum":["ogg_opus"]},"duration_sec":{"type":["number","null"],"minimum":0},"size_bytes":{"type":["integer","null"],"format":"int64","minimum":0},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error_kind":{"type":["string","null"],"description":"Stable failure class for a failed recording (start_signal_missing, pipeline_early_stop, egress_failed, mix_failed, upload_failed, encrypt_failed, other)."},"channels":{"type":["integer","null"],"enum":[1,2,null],"description":"2 for a stereo mix (caller left, agent right), 1 for mono."},"has_peaks":{"type":"boolean","description":"True when precomputed waveform peaks are available."},"egress_started_at":{"type":["string","null"],"format":"date-time","description":"Wall-clock start of the recording, for aligning audio with the call timeline."}},"required":["id","role","leg","segment_index","status","format","duration_sec","size_bytes","error","created_at","completed_at","error_kind","channels","has_peaks","egress_started_at"]},"SecretCreateRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"$ref":"#/components/schemas/SecretName"},"description":{"type":["string","null"],"maxLength":2000,"description":"Optional operator note. Whitespace-only values normalize to null."},"value":{"type":"string","minLength":1,"writeOnly":true,"description":"Write-only UTF-8 value, at most 16384 encoded bytes. It is encrypted before storage and never echoed."}},"required":["name","value"]},"SecretDetail":{"type":"object","additionalProperties":false,"description":"Safe write-only secret metadata. No plaintext, ciphertext, data-key ID, or wrapped key is ever included.","properties":{"id":{"type":"string","format":"uuid"},"name":{"$ref":"#/components/schemas/SecretName"},"description":{"type":["string","null"]},"fingerprint_suffix":{"type":["string","null"],"maxLength":4,"description":"Up to the final four characters of the submitted value, for operator identification only."},"last_used_at":{"type":["string","null"],"format":"date-time"},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","description","fingerprint_suffix","last_used_at","archived_at","created_at","updated_at"]},"SecretListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SecretDetail"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"SecretPatchRequest":{"type":"object","minProperties":1,"additionalProperties":false,"description":"Secret names are immutable and therefore absent. Send description:null to clear the note; send value to rotate the encrypted value.","properties":{"description":{"type":["string","null"],"maxLength":2000},"value":{"type":"string","minLength":1,"writeOnly":true,"description":"Write-only replacement value, at most 16384 encoded UTF-8 bytes."}}},"SipTrunkProvider":{"type":"string","enum":["sip","twilio_automated"],"description":"sip uses customer-managed carrier/PBX configuration; twilio_automated provisions Twilio resources from stored account credentials."},"SipSignalingMode":{"type":"string","enum":["static_peer","registered_peer","remote_registered_peer"]},"SipAuthMode":{"type":"string","enum":["ip_allowlist","credentials"]},"SipTransport":{"type":"string","enum":["udp","tcp","tls"]},"SipTrunkStatus":{"type":"string","enum":["provisioning","active","error","archived"]},"SipRegistrationStatus":{"type":"string","description":"Registration state, interpreted for the trunk's signaling mode. `not_applicable` is every `static_peer` trunk. `unregistered` and `expired` describe the `registered_peer` direction (the PBX registers to Kejue Voice), where a Contact expiry really exists. `registering`, `failed`, `disabled` and `unknown` describe the `remote_registered_peer` direction (Kejue Voice registers to the PBX) and come from the SIP registrar's periodic report — `unknown` means no recent report, not a failure.","enum":["not_applicable","unregistered","registered","expired","registering","failed","disabled","unknown"]},"SipMediaEncryption":{"type":"string","enum":["disable","allow","require"]},"SipIncludeHeaders":{"type":"string","enum":["none","x","all"]},"SipOutboundCapacityMode":{"type":"string","enum":["unknown","fixed","unlimited"]},"SipInboundAdvancedCreate":{"type":"object","additionalProperties":false,"description":"Optional LiveKit inbound-leg settings. Omitted fields use provider defaults.","properties":{"allowed_numbers":{"type":"array","maxItems":100,"items":{"type":"string","minLength":1,"pattern":"^\\S+$"}},"media_encryption":{"$ref":"#/components/schemas/SipMediaEncryption"},"ringing_timeout_ms":{"type":"integer","minimum":0,"description":"Zero or omission uses the provider default."},"max_call_duration_ms":{"type":"integer","minimum":0,"description":"Zero or omission uses the provider default."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Replacement SIP header map, capped at 4096 encoded bytes."},"headers_to_attributes":{"type":"object","additionalProperties":{"type":"string"},"description":"Replacement SIP-header to participant-attribute map, capped at 4096 encoded bytes."},"attributes_to_headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Replacement participant-attribute to SIP-header map, capped at 4096 encoded bytes."},"include_headers":{"$ref":"#/components/schemas/SipIncludeHeaders"}}},"SipInboundAdvancedPatch":{"type":"object","minProperties":1,"additionalProperties":false,"description":"Presence-aware inbound settings. Empty arrays/maps clear collections; explicit null clears nullable durations.","properties":{"allowed_numbers":{"type":"array","maxItems":100,"items":{"type":"string","minLength":1,"pattern":"^\\S+$"}},"media_encryption":{"$ref":"#/components/schemas/SipMediaEncryption"},"ringing_timeout_ms":{"type":["integer","null"],"minimum":1},"max_call_duration_ms":{"type":["integer","null"],"minimum":1},"headers":{"type":"object","additionalProperties":{"type":"string"}},"headers_to_attributes":{"type":"object","additionalProperties":{"type":"string"}},"attributes_to_headers":{"type":"object","additionalProperties":{"type":"string"}},"include_headers":{"$ref":"#/components/schemas/SipIncludeHeaders"}}},"SipOutboundAdvancedCreate":{"type":"object","additionalProperties":false,"description":"Optional LiveKit outbound-leg settings plus Kejue Voice toll-fraud destination allowlists.","properties":{"metadata":{"type":"string","description":"Provider metadata, capped at 16384 encoded bytes."},"destination_country":{"type":"string","minLength":2,"maxLength":2,"description":"ISO 3166-1 alpha-2 country code; normalized to uppercase."},"media_encryption":{"$ref":"#/components/schemas/SipMediaEncryption"},"from_host":{"type":"string","maxLength":512},"headers":{"type":"object","additionalProperties":{"type":"string"}},"headers_to_attributes":{"type":"object","additionalProperties":{"type":"string"}},"attributes_to_headers":{"type":"object","additionalProperties":{"type":"string"}},"include_headers":{"$ref":"#/components/schemas/SipIncludeHeaders"},"allowed_prefixes":{"type":"array","maxItems":100,"items":{"type":"string","pattern":"^\\+?[0-9*#]{1,20}$"},"description":"Allowed outbound dial prefixes, external (+44) or internal (277). When non-empty, unmatched PSTN destinations are denied."},"allowed_sip_hosts":{"type":"array","maxItems":100,"items":{"type":"string","minLength":1},"description":"Allowed SIP hosts or host:port values, without a URI scheme."},"via_proxy":{"type":"boolean","default":false,"description":"Send outbound INVITEs through the Kejue Voice SIP edge so the carrier sees them from port 5060 instead of 5062. Only for static_peer trunks with an outbound_transport of udp or tcp. twilio_automated trunks set it themselves, so do not send it for them."}}},"SipOutboundAdvancedPatch":{"type":"object","minProperties":1,"additionalProperties":false,"description":"Presence-aware outbound settings. Empty arrays/maps clear collections; explicit null clears nullable country/from-host values.","properties":{"metadata":{"type":"string","description":"Provider metadata, capped at 16384 encoded bytes. Send an empty string to clear."},"destination_country":{"type":["string","null"],"minLength":2,"maxLength":2},"media_encryption":{"$ref":"#/components/schemas/SipMediaEncryption"},"from_host":{"type":["string","null"],"maxLength":512},"headers":{"type":"object","additionalProperties":{"type":"string"}},"headers_to_attributes":{"type":"object","additionalProperties":{"type":"string"}},"attributes_to_headers":{"type":"object","additionalProperties":{"type":"string"}},"include_headers":{"$ref":"#/components/schemas/SipIncludeHeaders"},"allowed_prefixes":{"type":"array","maxItems":100,"items":{"type":"string","pattern":"^\\+?[0-9*#]{1,20}$"}},"allowed_sip_hosts":{"type":"array","maxItems":100,"items":{"type":"string","minLength":1}},"via_proxy":{"type":"boolean","description":"Send outbound INVITEs through the Kejue Voice SIP edge so the carrier sees them from port 5060 instead of 5062. Only for static_peer trunks with an outbound_transport of udp or tcp. twilio_automated trunks set it themselves, so do not send it for them."}}},"SipPcapSummaryResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"call_id":{"type":"string","format":"uuid"},"packet_count":{"type":"integer","minimum":0},"byte_size":{"type":"integer","format":"int64","minimum":0},"captured_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","encrypting","ready","failed"]},"completed_at":{"type":["string","null"],"format":"date-time"}},"required":["id","call_id","packet_count","byte_size","captured_at","status"]},"SipRuntimeInfo":{"type":"object","additionalProperties":false,"description":"Deployment-specific SIP endpoints needed to configure a carrier or PBX. Unconfigured scalar values are explicit nulls.","properties":{"sip_egress_cidrs":{"type":"array","items":{"type":"string"},"description":"Source IP addresses or CIDRs a carrier must allow for Kejue Voice-originated SIP traffic."},"public_sip_uri":{"type":["string","null"],"description":"Canonical public SIP URI carriers use to originate traffic toward Kejue Voice. This is the first entry of public_sip_uris; prefer that list when configuring a carrier."},"public_sip_uris":{"type":"array","items":{"type":"string"},"description":"Every public SIP edge carriers should originate toward. The SIP tier runs one independent stack per edge, so a carrier pointed at only one of them loses inbound while that edge restarts. Point the carrier at all of them, with equal priority and weight."},"registration_domain":{"type":["string","null"],"description":"Domain registered_peer clients use in SIP digest registration."},"registrar_sip_address":{"type":["string","null"],"description":"Internal SIP-edge address used for registered-peer outbound routing."}},"required":["sip_egress_cidrs","public_sip_uri","public_sip_uris","registration_domain","registrar_sip_address"]},"SipTrunkCreateRequest":{"type":"object","additionalProperties":false,"description":"Creates either a customer-managed SIP trunk or an automated Twilio trunk. Credentials are write-only and never appear in responses.\n\nWorkflow rules:\n* provider=twilio_automated requires account_sid and auth_token and forbids all BYO signaling, address, and auth fields; Kejue Voice derives those values.\n* provider=sip defaults sip_signaling_mode to static_peer. static_peer requires inbound_auth_mode. ip_allowlist requires inbound_allowed_addresses; credentials requires auth_username and auth_password.\n* registered_peer requires auth_username and auth_password and derives inbound auth/address configuration. If outbound_auth_mode is supplied it must be ip_allowlist.\n* remote_registered_peer requires auth_username, auth_password, and remote_registrar_address; it derives inbound and outbound routing. Other remote registration values have documented defaults.\n* A static outbound_address defaults outbound_transport to tls and outbound_auth_mode to credentials. Credential auth requires auth_username and auth_password; ip_allowlist forbids them unless registered_peer also needs them for registration.\n* outbound_capacity_mode defaults to unknown. fixed requires max_concurrent_outbound or max_outbound_cps; burst requires max_outbound_cps. Limits are forbidden for unknown and unlimited modes.","properties":{"name":{"type":"string","minLength":2,"maxLength":80,"description":"Unique display name within the organization. Leading and trailing whitespace is removed."},"provider":{"$ref":"#/components/schemas/SipTrunkProvider"},"sip_signaling_mode":{"$ref":"#/components/schemas/SipSignalingMode"},"inbound_auth_mode":{"$ref":"#/components/schemas/SipAuthMode"},"inbound_allowed_addresses":{"type":"array","maxItems":100,"uniqueItems":true,"items":{"type":"string","minLength":1},"description":"IPv4/IPv6 addresses or CIDRs. Values are canonicalized and duplicates removed."},"outbound_address":{"type":"string","maxLength":512,"description":"SIP host or host:port without a username or URI scheme."},"outbound_transport":{"$ref":"#/components/schemas/SipTransport"},"outbound_auth_mode":{"$ref":"#/components/schemas/SipAuthMode"},"auth_username":{"type":"string","maxLength":256,"description":"Write-only SIP digest username. Limited to 256 encoded UTF-8 bytes."},"auth_password":{"type":"string","maxLength":1024,"description":"Write-only SIP digest password. Limited to 1024 encoded UTF-8 bytes."},"remote_registrar_address":{"type":"string","maxLength":512,"description":"Remote PBX/carrier SIP host or host:port. Required for remote_registered_peer."},"remote_registrar_transport":{"allOf":[{"$ref":"#/components/schemas/SipTransport"}],"description":"Defaults to udp."},"remote_registrar_domain":{"type":"string","minLength":1,"description":"Digest domain; derived from remote_registrar_address when omitted."},"remote_register_realm":{"type":"string","minLength":1,"description":"Digest realm; defaults to remote_registrar_domain."},"remote_register_expires_seconds":{"type":"integer","minimum":60,"maximum":3600,"default":300},"account_sid":{"type":"string","maxLength":128,"description":"Write-only Twilio account SID for provider=twilio_automated."},"auth_token":{"type":"string","maxLength":1024,"description":"Write-only Twilio auth token for provider=twilio_automated."},"inbound_advanced_settings":{"$ref":"#/components/schemas/SipInboundAdvancedCreate"},"outbound_advanced_settings":{"$ref":"#/components/schemas/SipOutboundAdvancedCreate"},"outbound_capacity_mode":{"$ref":"#/components/schemas/SipOutboundCapacityMode"},"max_concurrent_outbound":{"type":"integer","minimum":1},"max_outbound_cps":{"type":"number","exclusiveMinimum":0},"outbound_cps_burst":{"type":"integer","minimum":1},"outbound_capacity_profile_id":{"type":"string","format":"uuid","description":"Capacity profile in the same organization."}},"required":["name","provider"]},"SipTrunk":{"type":"object","additionalProperties":false,"description":"Complete public SIP trunk state. Secrets and raw upstream errors are never returned. Every safe field is present; unset scalars are null and empty collections are arrays or objects.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"provider":{"$ref":"#/components/schemas/SipTrunkProvider"},"sip_signaling_mode":{"$ref":"#/components/schemas/SipSignalingMode"},"inbound_auth_mode":{"$ref":"#/components/schemas/SipAuthMode"},"inbound_allowed_addresses":{"type":"array","items":{"type":"string"}},"outbound_address":{"type":["string","null"]},"outbound_transport":{"oneOf":[{"$ref":"#/components/schemas/SipTransport"},{"type":"null"}]},"outbound_auth_mode":{"$ref":"#/components/schemas/SipAuthMode"},"has_credentials":{"type":"boolean","description":"Whether encrypted SIP credentials exist. Credential values are never returned."},"registrar_username":{"type":["string","null"]},"registrar_domain":{"type":["string","null"]},"registration_status":{"$ref":"#/components/schemas/SipRegistrationStatus"},"registration_contact":{"type":["string","null"]},"last_register_at":{"type":["string","null"],"format":"date-time"},"registration_expires_at":{"type":["string","null"],"format":"date-time"},"registration_checked_at":{"description":"When the SIP registrar last reported on this trunk. A liveness heartbeat for the report itself, not call activity. Only populated for `remote_registered_peer`; `null` means the registrar has never reported and `registration_status` reads `unknown`.","type":["string","null"],"format":"date-time"},"remote_registrar_address":{"type":["string","null"]},"remote_registrar_domain":{"type":["string","null"]},"remote_register_realm":{"type":["string","null"]},"remote_register_username":{"type":["string","null"]},"remote_registrar_transport":{"oneOf":[{"$ref":"#/components/schemas/SipTransport"},{"type":"null"}]},"remote_register_expires_seconds":{"type":["integer","null"]},"livekit_inbound_trunk_id":{"type":["string","null"]},"livekit_outbound_trunk_id":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/SipTrunkStatus"},"last_error":{"type":["string","null"],"description":"Sanitized recovery-oriented message suitable for customers and agents."},"last_error_code":{"type":["string","null"],"description":"Stable machine-readable provider/provisioning error code."},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"inbound_allowed_numbers":{"type":"array","items":{"type":"string"}},"inbound_media_encryption":{"$ref":"#/components/schemas/SipMediaEncryption"},"inbound_ringing_timeout_ms":{"type":["integer","null"]},"inbound_max_call_duration_ms":{"type":["integer","null"]},"inbound_headers":{"type":"object","additionalProperties":{"type":"string"}},"inbound_headers_to_attributes":{"type":"object","additionalProperties":{"type":"string"}},"inbound_attributes_to_headers":{"type":"object","additionalProperties":{"type":"string"}},"inbound_include_headers":{"$ref":"#/components/schemas/SipIncludeHeaders"},"outbound_metadata":{"type":"string"},"outbound_destination_country":{"type":["string","null"]},"outbound_media_encryption":{"$ref":"#/components/schemas/SipMediaEncryption"},"outbound_from_host":{"type":["string","null"]},"outbound_headers":{"type":"object","additionalProperties":{"type":"string"}},"outbound_headers_to_attributes":{"type":"object","additionalProperties":{"type":"string"}},"outbound_attributes_to_headers":{"type":"object","additionalProperties":{"type":"string"}},"outbound_include_headers":{"$ref":"#/components/schemas/SipIncludeHeaders"},"outbound_allowed_prefixes":{"type":"array","items":{"type":"string"}},"outbound_allowed_sip_hosts":{"type":"array","items":{"type":"string"}},"pcap_enabled":{"type":"boolean"},"outbound_capacity_mode":{"$ref":"#/components/schemas/SipOutboundCapacityMode"},"max_concurrent_outbound":{"type":["integer","null"]},"max_outbound_cps":{"type":["number","null"]},"outbound_cps_burst":{"type":["integer","null"]},"outbound_capacity_profile_id":{"type":["string","null"],"format":"uuid"},"outbound_via_proxy":{"type":"boolean","description":"Outbound INVITEs are relayed through the Kejue Voice SIP edge (port 5060). Always true for twilio_automated trunks on a deployment with a SIP edge."}},"required":["id","name","provider","sip_signaling_mode","inbound_auth_mode","inbound_allowed_addresses","outbound_address","outbound_transport","outbound_auth_mode","has_credentials","registrar_username","registrar_domain","registration_status","registration_contact","last_register_at","registration_expires_at","registration_checked_at","remote_registrar_address","remote_registrar_domain","remote_register_realm","remote_register_username","remote_registrar_transport","remote_register_expires_seconds","livekit_inbound_trunk_id","livekit_outbound_trunk_id","status","last_error","last_error_code","archived_at","created_at","updated_at","inbound_allowed_numbers","inbound_media_encryption","inbound_ringing_timeout_ms","inbound_max_call_duration_ms","inbound_headers","inbound_headers_to_attributes","inbound_attributes_to_headers","inbound_include_headers","outbound_metadata","outbound_destination_country","outbound_media_encryption","outbound_from_host","outbound_headers","outbound_headers_to_attributes","outbound_attributes_to_headers","outbound_include_headers","outbound_allowed_prefixes","outbound_allowed_sip_hosts","pcap_enabled","outbound_capacity_mode","max_concurrent_outbound","max_outbound_cps","outbound_cps_burst","outbound_capacity_profile_id","outbound_via_proxy"]},"SipTrunkListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SipTrunk"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"SipTrunkProvisioningResponse":{"type":"object","additionalProperties":false,"description":"Stable polling contract returned after asynchronous create or reconcile acceptance.","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","const":"provisioning"},"resource_url":{"type":"string","pattern":"^/v1/sip-trunks/[0-9a-f-]+$"},"poll_after_seconds":{"type":"integer","minimum":1},"provisioning_async":{"type":"boolean","const":true}},"required":["id","status","resource_url","poll_after_seconds","provisioning_async"]},"SipTrunkPatchRequest":{"type":"object","minProperties":1,"additionalProperties":false,"dependentRequired":{"auth_username":["auth_password"],"auth_password":["auth_username"],"remote_register_realm":["auth_username","auth_password"]},"description":"Presence-aware partial update. Omitted fields are unchanged. Empty arrays/maps replace and clear collections. Explicit null clears nullable advanced/capacity values. auth_username and auth_password must be sent together to rotate credentials.\n\nProvider-facing edits return the trunk with status=provisioning and reconcile asynchronously. They return 409 if another provisioning operation is still active. Automated Twilio trunks reject inbound allowlist and SIP credential rotation; archive and recreate those trunks instead.","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"inbound_allowed_addresses":{"type":"array","maxItems":100,"uniqueItems":true,"items":{"type":"string","minLength":1}},"auth_username":{"type":"string","minLength":1,"maxLength":256,"description":"Write-only replacement SIP digest username."},"auth_password":{"type":"string","minLength":1,"maxLength":1024,"description":"Write-only replacement SIP digest password."},"remote_register_realm":{"type":"string","maxLength":256,"description":"remote_registered_peer only. Digest realm Kejue Voice answers the PBX's REGISTER challenge with (Yeastar PBXs use YSAsterisk). Sent together with auth_username and auth_password, because the stored digest includes the realm. Empty falls back to the remote registrar domain."},"inbound_advanced_settings":{"$ref":"#/components/schemas/SipInboundAdvancedPatch"},"outbound_advanced_settings":{"$ref":"#/components/schemas/SipOutboundAdvancedPatch"},"pcap_enabled":{"type":"boolean"},"outbound_capacity_mode":{"$ref":"#/components/schemas/SipOutboundCapacityMode"},"max_concurrent_outbound":{"type":["integer","null"],"minimum":1},"max_outbound_cps":{"type":["number","null"],"exclusiveMinimum":0},"outbound_cps_burst":{"type":["integer","null"],"minimum":1},"outbound_capacity_profile_id":{"type":["string","null"],"format":"uuid"}}},"ToolMode":{"type":"string","enum":["sync","async"]},"ToolPhase":{"type":"string","description":"When the tool runs. `in_call` (the default, and every tool authored before this field existed) is invoked by the model during the conversation. `pre_call` fires once, before the agent speaks, with no model involvement: its parameters must be static, system, or secret cards, its templates may reference only {{system.NAME}}, {{vars.NAME}}, and {{secrets.NAME}}, and its `response_map` names the values it publishes as {{tools.SLUG.NAME}}. `pre_call` additionally requires `mode: sync`, `default_reaction: speaks`, and `precomputable: false`, because all three describe behaviour during a conversation that has not started yet.","enum":["in_call","pre_call"]},"ToolPreCallAttachment":{"type":"object","additionalProperties":false,"description":"One pre-call tool attached to an agent. The referenced tool must have `phase: pre_call`; attaching an `in_call` tool here is rejected.","properties":{"tool_id":{"type":"string","format":"uuid","description":"Catalog tool to run before the agent speaks."},"on_failure":{"type":"string","default":"proceed","description":"`proceed` continues the call with the tool's variables rendering empty. `abort` ends the call before the agent speaks — an outbound placement fails as retryable, an inbound call is terminated.","enum":["proceed","abort"]},"inject_as_context":{"type":"boolean","default":false,"description":"Append the response to the system prompt as a fenced data block, in addition to publishing it as {{tools.SLUG.NAME}}."},"required_vars":{"type":"array","maxItems":20,"description":"Names from `response_map` that must be present and non-empty for the call to count as successful. A 2xx response missing one of these is routed through `on_failure`.","items":{"type":"string","pattern":"^[a-zA-Z_][a-zA-Z0-9_]{0,63}$"}}},"required":["tool_id"]},"ToolMethod":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"ToolReaction":{"type":"string","enum":["speaks","listens"]},"ToolParameterLocation":{"type":"string","enum":["path","query","header","body"]},"ToolObjectProperty":{"type":"object","additionalProperties":false,"description":"One field inside a dynamic object parameter. Object parameters are intentionally one level deep; a property cannot itself be an object.","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},"type":{"type":"string","enum":["string","number","boolean","enum"]},"description":{"type":"string","maxLength":1000},"required":{"type":"boolean","default":false},"enum_values":{"type":"array","minItems":1,"maxItems":100,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":200},"description":"Required exactly when type is enum; forbidden for other property types."}},"required":["name","type"]},"ToolArrayItems":{"type":"object","additionalProperties":false,"description":"Element contract of a dynamic array parameter. Items are scalar (string, number, boolean), enum, or object; an object item uses the same one-level ToolObjectProperty shape as an object parameter, so items cannot nest further arrays or objects.","properties":{"type":{"type":"string","enum":["string","number","boolean","enum","object"]},"enum_values":{"type":"array","minItems":1,"maxItems":100,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":200},"description":"Required exactly when the item type is enum; forbidden for other item types."},"properties":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/ToolObjectProperty"},"description":"Required exactly when the item type is object; forbidden for other item types. Property names must be unique."}},"required":["type"]},"ToolDynamicParameter":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},"kind":{"type":"string","const":"dynamic"},"location":{"$ref":"#/components/schemas/ToolParameterLocation"},"type":{"type":"string","enum":["string","number","boolean","enum","object","array"],"default":"string"},"description":{"type":"string","maxLength":1000},"required":{"type":"boolean","default":false,"description":"Whether a dynamic argument must be supplied. Path parameters are always required at execution and are normalized to true when omitted."},"enum_values":{"type":"array","minItems":1,"maxItems":100,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":200},"description":"Required exactly when type is enum; forbidden for other dynamic types."},"properties":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/ToolObjectProperty"},"description":"Required exactly when type is object. Object parameters are allowed only in the request body, and property names must be unique."},"items":{"$ref":"#/components/schemas/ToolArrayItems","description":"Required exactly when type is array; forbidden for other dynamic types. Array parameters are allowed only in the request body."}},"required":["name","kind","location"]},"ToolStaticParameter":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},"kind":{"type":"string","const":"static"},"location":{"$ref":"#/components/schemas/ToolParameterLocation"},"value":{"type":"string","maxLength":8192,"description":"Literal value inserted at runtime. Template expressions are permitted and validated. A path/query static value cannot reference the secrets scope."}},"required":["name","kind","location","value"]},"ToolSystemParameter":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},"kind":{"type":"string","const":"system"},"location":{"$ref":"#/components/schemas/ToolParameterLocation"},"value":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,127}$","description":"Name from the system scope, for example call_id, agent_id, or caller_phone."}},"required":["name","kind","location","value"]},"ToolSecretParameter":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},"kind":{"type":"string","const":"secret"},"location":{"type":"string","enum":["header","body"],"description":"Secret material is intentionally forbidden in URL paths and query strings because URLs are commonly logged by clients, proxies, providers, and observability systems."},"value":{"$ref":"#/components/schemas/SecretName"},"prefix":{"type":"string","maxLength":1000,"description":"Optional literal prefix such as \"Bearer \". Templates and control characters are rejected."}},"required":["name","kind","location","value"]},"ToolSlotParameter":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"},"kind":{"type":"string","const":"slot"},"location":{"$ref":"#/components/schemas/ToolParameterLocation"},"value":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,127}$","description":"Existing pathway slot name."}},"required":["name","kind","location","value"]},"ToolParameter":{"oneOf":[{"$ref":"#/components/schemas/ToolDynamicParameter"},{"$ref":"#/components/schemas/ToolStaticParameter"},{"$ref":"#/components/schemas/ToolSystemParameter"},{"$ref":"#/components/schemas/ToolSecretParameter"},{"$ref":"#/components/schemas/ToolSlotParameter"}],"discriminator":{"propertyName":"kind"}},"ToolLegacyParameters":{"type":"object","additionalProperties":true,"description":"Compatibility JSON Schema. Root type, when present, must be object; properties must be an object with at most 100 valid parameter names; required must contain unique declared property names."},"ToolParameters":{"oneOf":[{"type":"array","maxItems":100,"uniqueItems":false,"description":"Rich parameter cards. Names must be unique; header-location names must also be unique case-insensitively. A path card may target a raw `{name}` placeholder or a matching precomposed template. Query, header, and body cards are inserted when absent; an existing destination must contain the card's exact canonical template/value or validation fails instead of choosing one source implicitly.","items":{"$ref":"#/components/schemas/ToolParameter"}},{"$ref":"#/components/schemas/ToolLegacyParameters"}]},"ToolHeaders":{"type":"object","maxProperties":100,"propertyNames":{"maxLength":128,"pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"},"additionalProperties":{"type":"string","maxLength":8192},"description":"Header templates. Host, Content-Length, Transfer-Encoding, Connection, Proxy-Authorization, Proxy-Authenticate, Proxy-Connection, Keep-Alive, TE, Trailer, and Upgrade are transport-controlled and forbidden. Values cannot contain CR/LF."},"ToolBody":{"description":"Templated string, templated JSON object, or null for no request body. Arrays and scalar JSON values other than strings are rejected.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":true},{"type":"null"}]},"ToolResponseMap":{"type":"object","maxProperties":100,"propertyNames":{"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,127}$"},"additionalProperties":{"type":"string","maxLength":512,"pattern":"^\\$(?:\\.(?:[A-Za-z_][A-Za-z0-9_-]*|0|[1-9][0-9]*))*$"},"description":"Map of destination slot name to the supported tiny JSONPath syntax, such as $.customer.name or $.items.0.id."},"ToolAckResponse":{"description":"Async-only agent-visible templated JSON object injected immediately while the real request continues; null disables it. It may use {{params.NAME}}, {{slots.NAME}}, {{system.NAME}}, and {{vars.NAME}}. It must never reference {{secrets.NAME}} at any nesting depth; public validation rejects the request rather than exposing a credential to the agent.","oneOf":[{"type":"object","maxProperties":100,"additionalProperties":true},{"type":"null"}]},"ToolInternalSlots":{"type":"array","maxItems":100,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,127}$"},"description":"Subset of response_map slot names whose captured value is withheld from the model. The slot is still filled and still usable in templated tool fields such as a later request body or URL, but its value is never placed in the conversation the model sees, so a tool may return an account number or a policy document without that text entering the transcript or a prompt. Every entry must be a key of response_map; an unknown name is a 422. Stored canonically (sorted and deduplicated); omitted or null means an empty list."},"ToolCreateRequest":{"type":"object","additionalProperties":false,"description":"Template expressions use {{slots.NAME}}, {{params.NAME}}, {{system.NAME}}, {{vars.NAME}}, or {{secrets.NAME}}. Rich parameter cards are the canonical automation workflow and preserve JSON scalar types in object bodies. Parameter references must be declared, secret names must exist and be active, braces must balance, and templates are forbidden in object keys. Secrets may appear only in headers or bodies and make HTTPS mandatory. The complete stored request is checked for duplicate or conflicting destinations before commit.","properties":{"slug":{"type":"string","minLength":2,"maxLength":48,"pattern":"^[a-z0-9_]{2,48}$","description":"Immutable public identifier."},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"mode":{"allOf":[{"$ref":"#/components/schemas/ToolMode"}],"default":"sync"},"phase":{"allOf":[{"$ref":"#/components/schemas/ToolPhase"}],"default":"in_call"},"method":{"$ref":"#/components/schemas/ToolMethod"},"url":{"type":"string","minLength":1,"maxLength":4096,"description":"Absolute public HTTP(S) URL. Scheme, authority, credentials, and fragment are static. A raw `{name}` token is allowed only in the path when a rich path card with that exact name exists. Legacy `{{scope.name}}` templates remain accepted in path/query for stored compatibility, but new clients should use rich cards for component-safe percent encoding. Direct `{{secrets.NAME}}` URL references are always rejected."},"default_reaction":{"allOf":[{"$ref":"#/components/schemas/ToolReaction"}],"default":"speaks"},"precomputable":{"type":"boolean","default":false,"description":"Allows execution to begin while generated speech is still playing. Use only for calls that are safe to start speculatively; the HTTP method does not determine whether an operation is semantically read-only."},"carry_across_calls":{"type":"boolean","default":false,"description":"Declares that successful results remain valid on the timescale of a dropped-call redial. When an agent with resume enabled continues a recent call, the runtime replays this tool's latest successful result from the previous call into context. Leave false for tools returning live or per-moment data. Agents may override the value per attachment."},"headers":{"$ref":"#/components/schemas/ToolHeaders"},"body":{"$ref":"#/components/schemas/ToolBody"},"parameters":{"$ref":"#/components/schemas/ToolParameters"},"response_map":{"$ref":"#/components/schemas/ToolResponseMap"},"internal_slots":{"$ref":"#/components/schemas/ToolInternalSlots"},"ack_response":{"$ref":"#/components/schemas/ToolAckResponse"},"timeout_ms":{"type":"integer","minimum":100,"maximum":60000,"default":5000},"retries":{"type":"integer","minimum":0,"maximum":5,"default":0}},"required":["slug","name","method","url"]},"ToolListItem":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"mode":{"$ref":"#/components/schemas/ToolMode"},"phase":{"$ref":"#/components/schemas/ToolPhase"},"method":{"$ref":"#/components/schemas/ToolMethod"},"url":{"type":"string"},"default_reaction":{"$ref":"#/components/schemas/ToolReaction"},"precomputable":{"type":"boolean"},"carry_across_calls":{"type":"boolean"},"timeout_ms":{"type":"integer"},"retries":{"type":"integer"},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","slug","name","description","mode","phase","method","url","default_reaction","precomputable","carry_across_calls","timeout_ms","retries","archived_at","created_at","updated_at"]},"ToolDetail":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"mode":{"$ref":"#/components/schemas/ToolMode"},"phase":{"$ref":"#/components/schemas/ToolPhase"},"method":{"$ref":"#/components/schemas/ToolMethod"},"url":{"type":"string"},"default_reaction":{"$ref":"#/components/schemas/ToolReaction"},"precomputable":{"type":"boolean"},"carry_across_calls":{"type":"boolean"},"timeout_ms":{"type":"integer"},"retries":{"type":"integer"},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"headers":{"$ref":"#/components/schemas/ToolHeaders"},"body":{"$ref":"#/components/schemas/ToolBody"},"parameters":{"$ref":"#/components/schemas/ToolParameters"},"response_map":{"$ref":"#/components/schemas/ToolResponseMap"},"internal_slots":{"$ref":"#/components/schemas/ToolInternalSlots"},"ack_response":{"$ref":"#/components/schemas/ToolAckResponse"}},"required":["id","slug","name","description","mode","phase","method","url","default_reaction","precomputable","carry_across_calls","timeout_ms","retries","archived_at","created_at","updated_at","headers","body","parameters","response_map","internal_slots","ack_response"]},"ToolListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ToolListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"ToolPatchRequest":{"type":"object","minProperties":1,"additionalProperties":false,"description":"Slug is immutable. Every supplied field is combined with current state, then the whole executable request is validated before any change is persisted.","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"mode":{"$ref":"#/components/schemas/ToolMode"},"phase":{"$ref":"#/components/schemas/ToolPhase"},"method":{"$ref":"#/components/schemas/ToolMethod"},"url":{"type":"string","minLength":1,"maxLength":4096},"default_reaction":{"$ref":"#/components/schemas/ToolReaction"},"precomputable":{"type":"boolean"},"carry_across_calls":{"type":"boolean"},"headers":{"oneOf":[{"$ref":"#/components/schemas/ToolHeaders"},{"type":"null"}]},"body":{"$ref":"#/components/schemas/ToolBody"},"parameters":{"oneOf":[{"$ref":"#/components/schemas/ToolParameters"},{"type":"null"}]},"response_map":{"oneOf":[{"$ref":"#/components/schemas/ToolResponseMap"},{"type":"null"}]},"internal_slots":{"oneOf":[{"$ref":"#/components/schemas/ToolInternalSlots"},{"type":"null"}]},"ack_response":{"$ref":"#/components/schemas/ToolAckResponse"},"timeout_ms":{"type":"integer","minimum":100,"maximum":60000},"retries":{"type":"integer","minimum":0,"maximum":5}}},"ToolTestObjectValue":{"type":"object","maxProperties":100,"additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"description":"One-level object value for a dynamic parameter whose declared type is object. The stored property schema determines allowed keys, types, required fields, and enum values."},"ToolTestParamValue":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"$ref":"#/components/schemas/ToolTestObjectValue"}]},"ToolTestRequest":{"type":"object","additionalProperties":false,"properties":{"params":{"type":"object","maxProperties":100,"additionalProperties":{"$ref":"#/components/schemas/ToolTestParamValue"},"description":"Dynamic tool arguments keyed by declared parameter name. Required arguments must be present; unknown names and type mismatches return 422 before any outbound request is made."},"system":{"$ref":"#/components/schemas/ToolTestScopeOverrides"},"slots":{"$ref":"#/components/schemas/ToolTestScopeOverrides"},"vars":{"$ref":"#/components/schemas/ToolTestScopeOverrides"}},"required":["params"]},"ToolTestScopeOverrides":{"type":"object","maxProperties":100,"propertyNames":{"minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_.-]{0,127}$"},"additionalProperties":{"type":"string","maxLength":65536},"description":"Optional test-only values for a scope normally populated by a live call. These overrides are never persisted."},"ToolTestRequestCapture":{"type":"object","additionalProperties":false,"properties":{"method":{"$ref":"#/components/schemas/ToolMethod"},"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{"type":"string"}},"required":["method","url"],"description":"Secret-masked representation of the outbound request. The URL can contain supplied test parameter values but never plaintext secret values."},"ToolTestUpstreamResponse":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"integer","minimum":100,"maximum":599},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"First values of safe response headers. Set-Cookie and authorization headers are omitted; resolved secret values are redacted."},"body":{"type":"string","maxLength":1048576,"description":"At most the first 1 MiB, with resolved secret values redacted."},"body_truncated":{"type":"boolean"}},"required":["status","body","body_truncated"]},"ToolTestResult":{"type":"object","additionalProperties":false,"properties":{"request":{"$ref":"#/components/schemas/ToolTestRequestCapture"},"response":{"$ref":"#/components/schemas/ToolTestUpstreamResponse"},"error":{"type":"string","description":"Sanitized human-readable transport failure. Absent when an HTTP response was received."},"error_code":{"type":"string","enum":["invalid_rendered_request","upstream_timeout","upstream_unreachable","upstream_response_read_failed"]},"retryable":{"type":"boolean"},"latency_ms":{"type":"integer","minimum":0}},"required":["request","retryable","latency_ms"],"description":"Exactly one of response or error/error_code is present."},"TranscriptSegmentSpeaker":{"type":"string","enum":["agent","caller","tool_call","tool_result","system","wait","noise"],"description":"Who or what produced the row. agent and caller are spoken turns. tool_call and tool_result are the agent's tool activity inline in conversation order (full diagnostics live in tool_invocations). system marks an out-of-band event such as an agent handoff, wait marks a deliberate silent hold, and noise marks caller audio the speech model judged unintelligible (a marker row with empty text)."},"TranscriptSegmentKind":{"type":"string","enum":["","dtmf_received","dtmf_sent","dtmf","transcription_failed","agent_handoff","tool_interrupted"],"description":"Out-of-band row classifier. An empty string is an ordinary spoken or tool row and is by far the common case. dtmf_received is a keypad entry from the caller; dtmf_sent is reserved for a digit the agent sends and is not currently emitted; dtmf is a caller turn the current speech engine sealed from keypad input. transcription_failed marks a caller turn whose audio could not be transcribed, agent_handoff a same-room agent-to-agent handover, and tool_interrupted a tool call the caller barged in on before it ran (a system row naming the tool; the tool never executed)."},"TranscriptSegment":{"type":"object","additionalProperties":false,"properties":{"segment_index":{"type":"integer","minimum":0,"description":"Zero-based consultation segment; for brief rows this is transfer.attempt minus one. Missing on older transcript rows means zero."},"speaker":{"$ref":"#/components/schemas/TranscriptSegmentSpeaker"},"text":{"type":"string"},"timestamp":{"type":"number","description":"Unix epoch seconds when the row occurred."},"kind":{"$ref":"#/components/schemas/TranscriptSegmentKind"},"interrupted":{"type":"boolean","description":"Agent rows only. True when the caller barged in mid-playout, so only a prefix of text was actually heard. Absent otherwise."},"name":{"type":"string","description":"Tool name. Present on tool_call and tool_result rows."},"is_error":{"type":"boolean","description":"tool_result rows only. True when the invocation failed; the call's tool_invocations array carries the full diagnostics."},"dtmf_masked":{"type":"boolean","description":"True when the row stands in for keypad digits that are deliberately withheld. The digits never enter the transcript, the model's context, or a webhook — only the count does."},"digit_count":{"type":"integer","minimum":0,"description":"How many keys were pressed, when dtmf_masked is true."},"reason":{"type":"string","description":"Closed-vocabulary explanation for a non-empty kind or a masked DTMF value. Never free text and never caller-supplied."},"speech_id":{"type":"string","description":"Framework speech-handle id of the agent generation that produced this reply. It is the same key the turn's latency metrics carry, so agent turns can be joined to per-turn timings deterministically. Present only on agent rows produced by the current speech engine; omitted on caller and tool rows and on older transcripts."},"from_agent":{"type":"string","description":"On an agent_handoff row, the slug of the agent that handed the call over. The row's text names it in prose as well; this field lets you rebuild the path a flow call took between agents without parsing a sentence. Omitted on every other row kind, and on handoffs recorded before agents began stamping it."},"to_agent":{"type":"string","description":"On an agent_handoff row, the slug of the agent that took the call over. See from_agent."},"leg":{"type":"string","enum":["caller","brief"]}},"required":["speaker","text","timestamp","kind","leg"]},"TransferState":{"type":"string","enum":["requested","dialing","ringing","briefing","bridging","bridged","failed","recovering","resolved"]},"TransferFailureCode":{"type":"string","enum":["capability_denied","toll_fraud_blocked","provider_no_refer","target_no_answer","target_busy","target_unavailable","target_voicemail","target_rejected","target_dropped_briefing","caller_hungup","caller_hungup_during_bridge","post_bridge_target_drop","livekit_error","internal_timeout","pod_lost","admin_canceled","brief_capacity_exhausted","dncr_blocked","dncr_unavailable","dncr_configuration_invalid"]},"Transfer":{"type":"object","additionalProperties":false,"description":"Complete customer-safe transfer state. Every nullable field is explicit. Raw provider errors and infrastructure pod identity are excluded.","properties":{"id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid"},"session_id":{"type":"string","format":"uuid"},"attempt":{"type":"integer","minimum":1,"description":"One-based transfer attempt within this call, including unsuccessful attempts. Older records may reuse one."},"kind":{"type":"string","enum":["cold","warm","agent"],"description":"cold or warm for a transfer to a human by phone; agent for a same-call handoff to another Kejue Voice agent (always method handoff, recorded in its final state - bridged when the other agent took over, failed when it could not be started)."},"method":{"type":"string","enum":["refer","bridge","handoff"]},"state":{"$ref":"#/components/schemas/TransferState"},"destination":{"type":"string","minLength":1,"maxLength":2048,"description":"The number or SIP URI dialled, or for an agent handoff the slug of the agent that took over."},"trunk_id":{"oneOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}],"description":"LiveKit/provider trunk identifier; it is not necessarily a UUID."},"label":{"oneOf":[{"type":"string","maxLength":500},{"type":"null"}]},"announcement":{"oneOf":[{"type":"string","maxLength":50000},{"type":"null"}]},"caller_identity":{"oneOf":[{"type":"string","maxLength":500},{"type":"null"}]},"caller_number":{"oneOf":[{"type":"string","maxLength":100},{"type":"null"}]},"consult_room":{"oneOf":[{"type":"string","maxLength":500},{"type":"null"}]},"target_identity":{"oneOf":[{"type":"string","maxLength":500},{"type":"null"}]},"sip_status_code":{"oneOf":[{"type":"integer","minimum":100,"maximum":699},{"type":"null"}]},"sip_status_text":{"oneOf":[{"type":"string","maxLength":500},{"type":"null"}]},"failure_code":{"oneOf":[{"$ref":"#/components/schemas/TransferFailureCode"},{"type":"null"}]},"failure_message":{"oneOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"failure_advice":{"oneOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"state_entered_at":{"type":"string","format":"date-time"},"state_deadline_at":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"absolute_deadline_at":{"type":"string","format":"date-time"},"last_heartbeat_at":{"type":"string","format":"date-time"},"version":{"type":"integer","format":"int64","minimum":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","org_id","session_id","attempt","kind","method","state","destination","trunk_id","label","announcement","caller_identity","caller_number","consult_room","target_identity","sip_status_code","sip_status_text","failure_code","failure_message","failure_advice","state_entered_at","state_deadline_at","absolute_deadline_at","last_heartbeat_at","version","created_at","updated_at"]},"TransferCancelRequest":{"type":"object","additionalProperties":false,"properties":{"reason":{"oneOf":[{"type":"string","minLength":8,"maxLength":500},{"type":"null"}],"description":"Optional operator reason. Null is equivalent to omission."}}},"TransferCapabilitiesResponse":{"type":"object","additionalProperties":false,"properties":{"providers":{"type":"object","additionalProperties":false,"properties":{"sip":{"type":"array","items":{"$ref":"#/components/schemas/TransferCapability"}},"twilio_automated":{"type":"array","items":{"$ref":"#/components/schemas/TransferCapability"}}},"required":["sip","twilio_automated"]}},"required":["providers"]},"TransferCapability":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["cold","warm"]},"method":{"type":"string","enum":["refer","bridge"]}},"required":["kind","method"]},"TransferEvent":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid"},"transfer_id":{"type":"string","format":"uuid"},"event_type":{"type":"string","minLength":1,"maxLength":100},"from_state":{"oneOf":[{"$ref":"#/components/schemas/TransferState"},{"type":"null"}]},"to_state":{"oneOf":[{"$ref":"#/components/schemas/TransferState"},{"type":"null"}]},"payload":{"$ref":"#/components/schemas/TransferEventPayload"},"payload_redacted":{"type":"boolean","description":"True when internal, nested, unsupported, or overlong payload fields were removed or truncated."},"source":{"type":"string","enum":["agent","janitor","admin"]},"occurred_at":{"type":"string","format":"date-time"}},"required":["id","org_id","transfer_id","event_type","from_state","to_state","payload","payload_redacted","source","occurred_at"]},"TransferEventPayload":{"type":"object","additionalProperties":false,"description":"Fail-closed public subset of an internal event payload. All fields are event-dependent and therefore optional.","properties":{"advice":{"type":["string","null"],"maxLength":2048},"destination":{"type":["string","null"],"maxLength":2048},"failure_code":{"type":["string","null"],"maxLength":2048},"kind":{"type":["string","null"],"maxLength":2048},"label":{"type":["string","null"],"maxLength":2048},"method":{"type":["string","null"],"maxLength":2048},"operator_api_key_id":{"type":["string","null"],"maxLength":2048},"operator_user_id":{"type":["string","null"],"maxLength":2048},"provider":{"type":["string","null"],"maxLength":2048},"reason":{"type":["string","null"],"maxLength":2048},"sip_status_code":{"type":["number","null"]},"sip_status_text":{"type":["string","null"],"maxLength":2048},"stale_reason":{"type":["string","null"],"maxLength":2048},"twilio_call_sid":{"type":["string","null"],"maxLength":2048}}},"TransferListResponse":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TransferWithEvents"}},"count":{"type":"integer","minimum":0}},"required":["items","count"]},"TransferWithEvents":{"type":"object","additionalProperties":false,"properties":{"transfer":{"$ref":"#/components/schemas/Transfer"},"events":{"type":"array","items":{"$ref":"#/components/schemas/TransferEvent"}}},"required":["transfer","events"]},"TwilioNumber":{"type":"object","additionalProperties":false,"properties":{"sid":{"type":"string"},"phone_number":{"type":"string","pattern":"^\\+[1-9][0-9]{1,14}$","description":"Purchased number in E.164 form."},"friendly_name":{"type":"string"}},"required":["sid","phone_number","friendly_name"]},"TwilioNumberListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TwilioNumber"}},"count":{"type":"integer","minimum":0}},"required":["data","count"]},"UsageEventKind":{"type":"string","enum":["llm","stt","tts","speechlm","embedding","endpointing"]},"UsageEventActorKind":{"type":"string","enum":["agent","caller","scorer","system","guardrail","analysis"]},"UsageEventStatus":{"type":"string","enum":["ok","error","timeout"]},"UsageEventFailure":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string","enum":["upstream_error","upstream_invalid_request","upstream_authentication_failed","upstream_permission_denied","upstream_not_found","upstream_timeout","upstream_conflict","upstream_validation_failed","upstream_rate_limited","upstream_unavailable","upstream_http_error","capacity_exhausted"]},"message":{"type":"string","minLength":1},"retryable":{"type":"boolean"},"detail":{"type":"null","deprecated":true,"description":"Reserved compatibility field. Internal provider diagnostics are available only to platform administrators."}},"required":["code","message","retryable"]},"UsageEventMetadata":{"type":"object","additionalProperties":false,"properties":{"generation_id":{"type":["string","null"],"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"conversational_turn_index":{"type":["integer","null"],"minimum":0},"turn_index":{"type":["integer","null"],"minimum":0},"turn_outcome":{"type":["string","null"],"enum":["completed","cancelled","aborted","superseded","error","unfinalized",null]},"speech_id":{"type":["string","null"],"minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["turn_index","turn_outcome","speech_id"]},"UsageEventListItem":{"type":"object","additionalProperties":false,"properties":{"provider_id":{"type":["string","null"],"format":"uuid"},"provider_instance_id":{"type":["string","null"],"format":"uuid","description":"Identifies the inference instance that served the request, so requests can be told apart by the instance behind them and one can be named in a support request. Opaque and stable; null when no instance owns the request (a legacy or environment-configured target)."},"pipeline_mode":{"type":["string","null"]},"pipeline_role":{"type":["string","null"]},"id":{"type":"string","pattern":"^[1-9][0-9]*$"},"ts":{"type":"string","format":"date-time"},"kind":{"$ref":"#/components/schemas/UsageEventKind"},"actor_kind":{"$ref":"#/components/schemas/UsageEventActorKind"},"status":{"$ref":"#/components/schemas/UsageEventStatus"},"http_status":{"type":["integer","null"],"minimum":100,"maximum":599},"failure":{"anyOf":[{"$ref":"#/components/schemas/UsageEventFailure"},{"type":"null"}]},"latency_ms":{"type":["integer","null"],"minimum":0},"ttft_ms":{"type":["integer","null"],"minimum":0},"prompt_tokens":{"type":["integer","null"],"minimum":0},"completion_tokens":{"type":["integer","null"],"minimum":0},"total_tokens":{"type":["integer","null"],"minimum":0},"prompt_cached_tokens":{"type":["integer","null"],"minimum":0},"audio_duration_sec":{"type":["number","null"],"minimum":0},"characters_count":{"type":["integer","null"],"minimum":0},"streamed":{"type":"boolean"},"service_display_name":{"type":["string","null"]},"failover_attempts":{"type":"integer","minimum":0},"session_id":{"type":["string","null"],"format":"uuid"},"request_id":{"type":["string","null"],"minLength":1,"maxLength":256},"metadata":{"anyOf":[{"$ref":"#/components/schemas/UsageEventMetadata"},{"type":"null"}]},"model_display_name":{"type":["string","null"]}},"required":["id","ts","kind","actor_kind","status","http_status","failure","latency_ms","ttft_ms","prompt_tokens","completion_tokens","total_tokens","prompt_cached_tokens","audio_duration_sec","characters_count","streamed","service_display_name","failover_attempts","session_id","request_id","metadata","model_display_name"]},"UsageEventListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageEventListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"OrgUsageAnalyticsScope":{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","const":"org"},"org_id":{"type":"string","format":"uuid"},"org_name":{"type":"string","minLength":1}},"required":["kind","org_id","org_name"]},"OrgUsageAnalyticsTotals":{"type":"object","additionalProperties":false,"properties":{"calls":{"type":"integer","minimum":0},"failed_calls":{"type":"integer","minimum":0},"answered_calls":{"type":"integer","minimum":0},"call_failure_rate":{"type":"number","minimum":0,"maximum":1},"call_minutes":{"type":"number","minimum":0},"avg_minutes_per_call":{"type":"number","minimum":0},"active_live_calls":{"type":"integer","minimum":0},"peak_concurrent_calls":{"type":"integer","minimum":0},"tool_calls":{"type":"integer","minimum":0},"tool_failures":{"type":"integer","minimum":0},"tool_failure_rate":{"type":"number","minimum":0,"maximum":1},"webhook_deliveries":{"type":"integer","minimum":0},"webhook_failures":{"type":"integer","minimum":0},"webhook_failure_rate":{"type":"number","minimum":0,"maximum":1},"usage_events":{"type":"integer","minimum":0},"usage_failures":{"type":"integer","minimum":0},"usage_failure_rate":{"type":"number","minimum":0,"maximum":1},"total_tokens":{"type":"integer","format":"int64","minimum":0},"audio_minutes":{"type":"number","minimum":0},"tts_characters":{"type":"integer","format":"int64","minimum":0},"failover_events":{"type":"integer","minimum":0},"p95_usage_latency_ms":{"type":["number","null"],"minimum":0},"p95_voice_response_latency_ms":{"type":["number","null"],"minimum":0},"p95_voice_slm_ttft_ms":{"type":["number","null"],"minimum":0},"avg_slm_duty_cycle":{"type":["number","null"],"minimum":0},"avg_duty_cycle":{"type":["number","null"],"minimum":0}},"required":["calls","failed_calls","answered_calls","call_failure_rate","call_minutes","avg_minutes_per_call","active_live_calls","peak_concurrent_calls","tool_calls","tool_failures","tool_failure_rate","webhook_deliveries","webhook_failures","webhook_failure_rate","usage_events","usage_failures","usage_failure_rate","total_tokens","audio_minutes","tts_characters","failover_events","p95_usage_latency_ms","p95_voice_response_latency_ms","p95_voice_slm_ttft_ms","avg_slm_duty_cycle","avg_duty_cycle"]},"OrgUsageAnalyticsPoint":{"type":"object","additionalProperties":false,"properties":{"bucket_start":{"type":"string","format":"date-time"},"calls":{"type":"integer","minimum":0},"failed_calls":{"type":"integer","minimum":0},"call_minutes":{"type":"number","minimum":0},"concurrent_calls":{"type":"integer","minimum":0},"slm_duty_cycle":{"type":["number","null"],"minimum":0},"tool_calls":{"type":"integer","minimum":0},"tool_failures":{"type":"integer","minimum":0},"webhook_deliveries":{"type":"integer","minimum":0},"webhook_failures":{"type":"integer","minimum":0},"usage_events":{"type":"integer","minimum":0},"usage_failures":{"type":"integer","minimum":0}},"required":["bucket_start","calls","failed_calls","call_minutes","concurrent_calls","slm_duty_cycle","tool_calls","tool_failures","webhook_deliveries","webhook_failures","usage_events","usage_failures"]},"OrgUsageAnalyticsResponse":{"type":"object","additionalProperties":false,"properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"grain":{"type":"string","enum":["hour","day","week","month"]},"scope":{"$ref":"#/components/schemas/OrgUsageAnalyticsScope"},"totals":{"$ref":"#/components/schemas/OrgUsageAnalyticsTotals"},"series":{"type":"array","items":{"$ref":"#/components/schemas/OrgUsageAnalyticsPoint"}}},"required":["from","to","grain","scope","totals","series"]},"WebCallCreateRequest":{"type":"object","additionalProperties":false,"required":["agent_id"],"properties":{"agent_id":{"type":"string","format":"uuid","description":"The agent to talk to. Its production version is used unless version_id is given."},"version_id":{"type":"string","format":"uuid","description":"Run a specific agent version instead of the production one. The version must belong to agent_id."},"variables":{"type":"object","additionalProperties":{"type":"string","maxLength":2000},"maxProperties":50,"description":"Per-call prompt variables, referenced as {{name}} or {{vars.name}}. Names must match [A-Za-z_][A-Za-z0-9_]{0,63}. Supply your own end-user's identity or context here — these values are trusted because they arrive over an authenticated server-side request, never from the browser."},"metadata":{"type":"object","additionalProperties":true,"description":"Opaque object stored on the call for your own bookkeeping and returned by GET /v1/calls/{id}. Max 8 KiB encoded. Never shown to the agent or the caller."},"modality":{"type":"string","enum":["audio","text"],"default":"audio","description":"The conversation surface. audio (the default) streams speech both ways over WebRTC. text runs the same agent as a typed conversation over the room's data channel, with no microphone, no speech recognition and no synthesis. Text calls are billed as minutes for their full duration and share the same concurrency limit as audio web calls."}}},"WebCallCreateResponse":{"type":"object","additionalProperties":false,"required":["call_id","token","ws_url","room_name","agent_name","expires_at_ms","modality"],"properties":{"call_id":{"type":"string","format":"uuid","description":"The call's id, usable immediately against GET /v1/calls/{id}."},"token":{"type":"string","description":"Short-lived join credential for the browser. Treat it as a secret in transit; it authorizes exactly one room."},"ws_url":{"type":"string","format":"uri","description":"The WebRTC signalling endpoint the browser connects to."},"room_name":{"type":"string","description":"The room the browser joins. Diagnostic — the SDK takes it from the token."},"agent_name":{"type":"string","description":"The dispatched worker identity. Diagnostic only."},"agent_version_id":{"type":"string","format":"uuid","description":"The agent version actually resolved for this call."},"expires_at_ms":{"type":"integer","format":"int64","description":"Unix ms after which the token can no longer be used to JOIN. It does not bound an already-connected call."},"modality":{"type":"string","enum":["audio","text"],"description":"The surface this call was opened on, echoed back so a client that omitted the field still knows which transport to run."}}},"WebhookConfig":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"url":{"type":"string","format":"uri","maxLength":4096,"pattern":"^https://","description":"Public HTTPS URL. Credentials, fragments, local/private hosts, and dynamic authorities are rejected."},"events":{"type":"array","minItems":1,"maxItems":7,"uniqueItems":true,"items":{"$ref":"#/components/schemas/WebhookEvent"}},"active":{"type":"boolean"},"has_secret":{"type":"boolean","description":"Whether encrypted signing material is available. The secret value is never returned here."},"last_delivery_at":{"type":["string","null"],"format":"date-time"},"last_delivery_status":{"oneOf":[{"$ref":"#/components/schemas/WebhookDeliveryStatus"},{"type":"null"}]},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","url","events","active","has_secret","last_delivery_at","last_delivery_status","archived_at","created_at","updated_at"]},"WebhookCreateRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"url":{"type":"string","format":"uri","maxLength":4096,"pattern":"^https://"},"events":{"type":"array","minItems":1,"maxItems":7,"uniqueItems":true,"default":["call.completed"],"items":{"$ref":"#/components/schemas/WebhookEvent"}},"active":{"type":"boolean","default":true}},"required":["name","url"]},"WebhookCreateResponse":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120},"url":{"type":"string","format":"uri","pattern":"^https://"},"events":{"type":"array","minItems":1,"maxItems":7,"uniqueItems":true,"items":{"$ref":"#/components/schemas/WebhookEvent"}},"active":{"type":"boolean"},"has_secret":{"type":"boolean","const":true},"last_delivery_at":{"type":["string","null"],"format":"date-time"},"last_delivery_status":{"oneOf":[{"$ref":"#/components/schemas/WebhookDeliveryStatus"},{"type":"null"}]},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"secret":{"type":"string","minLength":49,"maxLength":49,"pattern":"^whsec_[A-Za-z0-9_-]{43}$","description":"One-time HMAC-SHA256 signing secret. Store it securely; later GET/list responses omit it.","readOnly":true,"x-sonus-one-time-secret":true,"x-kejue-one-time-secret":true}},"required":["id","name","url","events","active","has_secret","last_delivery_at","last_delivery_status","archived_at","created_at","updated_at","secret"]},"WebhookDeliveryStatus":{"type":"string","enum":["pending","running","success","failed_permanent","exhausted"],"description":"pending is due now or scheduled for retry; running has an active worker lease; success is terminal; failed_permanent is non-retryable; exhausted means every configured attempt was used."},"WebhookDelivery":{"type":"object","description":"Compact delivery representation embedded in a call detail response.","properties":{"id":{"type":"string","format":"uuid"},"webhook_config_id":{"type":"string","format":"uuid"},"webhook_name":{"type":"string"},"webhook_url":{"type":"string","format":"uri"},"event":{"$ref":"#/components/schemas/WebhookEvent"},"attempt":{"type":"integer","minimum":0,"maximum":10},"max_attempts":{"type":"integer","minimum":1,"maximum":10},"status":{"$ref":"#/components/schemas/WebhookDeliveryStatus"},"scheduled_at":{"type":"string","format":"date-time"},"next_retry_at":{"type":"string","format":"date-time"},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"response_status":{"type":"integer","minimum":100,"maximum":599},"error":{"type":"string"}},"required":["id","event","attempt","max_attempts","status","scheduled_at"]},"WebhookEvent":{"type":"string","description":"call.dncr_blocked is workspace-wide and fires only for a confirmed registry match before dialing; DNCR lookup failures do not emit it.","enum":["call.completed","call.dncr_blocked","campaign.started","campaign.paused","campaign.resumed","campaign.completed","campaign.stopped","inference.transcription.completed","inference.transcription.failed","inference.transcription.cancelled"]},"WebhookReplayMode":{"type":"string","enum":["snapshot","rebuild"]},"WebhookDeliveryListItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"webhook_config_id":{"type":["string","null"],"format":"uuid"},"webhook_name":{"type":["string","null"]},"call_id":{"type":["string","null"],"format":"uuid"},"event":{"$ref":"#/components/schemas/WebhookEvent"},"is_test":{"type":"boolean","description":"True for explicit test deliveries, which have call_id=null and payload call=null."},"replayed_from_id":{"type":["string","null"],"format":"uuid"},"replay_mode":{"oneOf":[{"$ref":"#/components/schemas/WebhookReplayMode"},{"type":"null"}]},"attempt":{"type":"integer","minimum":0,"maximum":10},"max_attempts":{"type":"integer","minimum":1,"maximum":10},"status":{"$ref":"#/components/schemas/WebhookDeliveryStatus"},"scheduled_at":{"type":"string","format":"date-time"},"next_retry_at":{"type":["string","null"],"format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"response_status":{"type":["integer","null"],"minimum":100,"maximum":599},"error_code":{"type":["string","null"],"description":"Stable machine token such as http_503, timeout, network_error, or unsafe_webhook_url."},"error_message":{"type":["string","null"],"description":"Safe human-readable explanation corresponding to error_code."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","webhook_config_id","webhook_name","call_id","event","is_test","replayed_from_id","replay_mode","attempt","max_attempts","status","scheduled_at","next_retry_at","started_at","completed_at","response_status","error_code","error_message","created_at","updated_at"]},"WebhookDeliveryDetail":{"allOf":[{"$ref":"#/components/schemas/WebhookDeliveryListItem"},{"type":"object","properties":{"request_url":{"type":["string","null"],"format":"uri","description":"Immutable destination snapshotted on the first attempt. Null before the first attempt."},"request_body_sha256":{"type":["string","null"],"pattern":"^[0-9a-f]{64}$","description":"SHA-256 of the exact canonical UTF-8 request body. The body itself is never exposed."},"response_body_preview":{"type":["string","null"],"maxLength":2048,"description":"Sanitized preview capped at 2048 UTF-8 bytes; null when no HTTP response was received."}},"required":["request_url","request_body_sha256","response_body_preview"]}]},"WebhookDeliveryListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryListItem"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"WebhookListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookConfig"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"WebhookPatchRequest":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"url":{"type":"string","format":"uri","maxLength":4096,"pattern":"^https://"},"events":{"type":"array","minItems":1,"maxItems":7,"uniqueItems":true,"items":{"$ref":"#/components/schemas/WebhookEvent"}},"active":{"type":"boolean"}}},"WebhookTestResponse":{"type":"object","additionalProperties":false,"properties":{"delivery_id":{"type":"string","format":"uuid"},"status":{"type":"string","const":"pending"}},"required":["delivery_id","status"]},"WebhookReplayRequest":{"type":"object","additionalProperties":false,"properties":{"mode":{"allOf":[{"$ref":"#/components/schemas/WebhookReplayMode"}],"default":"snapshot"}}},"WebhookReplayResponse":{"type":"object","additionalProperties":false,"properties":{"delivery_id":{"type":"string","format":"uuid"},"replayed_from_id":{"type":"string","format":"uuid"},"mode":{"$ref":"#/components/schemas/WebhookReplayMode"},"status":{"type":"string","const":"pending"}},"required":["delivery_id","replayed_from_id","mode","status"]},"WebhookOutboundEvent":{"type":"object","additionalProperties":false,"description":"Canonical JSON body POSTed to the webhook destination. Maximum encoded size is 2 MiB.","properties":{"api_version":{"type":"string","const":"2026-07-01"},"event":{"$ref":"#/components/schemas/WebhookEvent"},"delivery_id":{"type":"string","format":"uuid"},"delivered_at":{"type":"string","format":"date-time"},"test":{"type":"boolean"},"replayed_from_id":{"type":["string","null"],"format":"uuid"},"call":{"oneOf":[{"$ref":"#/components/schemas/WebhookCallPayload"},{"type":"null"}]},"campaign":{"oneOf":[{"$ref":"#/components/schemas/WebhookCampaignPayload"},{"type":"null"}]},"transcription_job":{"oneOf":[{"$ref":"#/components/schemas/WebhookTranscriptionJobPayload"},{"type":"null"}],"description":"Present and non-null for inference.transcription events; omitted or null on legacy call and campaign envelopes."}},"required":["api_version","event","delivery_id","delivered_at","test","replayed_from_id","call","campaign"],"oneOf":[{"properties":{"event":{"enum":["call.completed","call.dncr_blocked","campaign.started","campaign.paused","campaign.resumed","campaign.completed","campaign.stopped"]},"transcription_job":{"type":"null"}}},{"required":["transcription_job"],"properties":{"event":{"enum":["inference.transcription.completed","inference.transcription.failed","inference.transcription.cancelled"]},"transcription_job":{"$ref":"#/components/schemas/WebhookTranscriptionJobPayload"},"call":{"type":"null"},"campaign":{"type":"null"}}}]},"WebhookCampaignPayload":{"type":"object","additionalProperties":false,"description":"Campaign snapshot carried by `campaign.*` events, read after the transition committed. Null on call events, just as `call` is null here.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"$ref":"#/components/schemas/CampaignStatus"},"paused_reason":{"oneOf":[{"$ref":"#/components/schemas/CampaignPausedReason"},{"type":"null"}]},"counters":{"$ref":"#/components/schemas/CampaignCounters"},"occurred_at":{"type":"string","format":"date-time"},"dncr":{"anyOf":[{"$ref":"#/components/schemas/DNCROptions"},{"type":"null"}]}},"required":["id","name","status","paused_reason","counters","occurred_at"]},"WebhookTranscriptionJobPayload":{"type":"object","additionalProperties":false,"description":"Metadata-only transcription notification. Retrieve retained transcript content through the authorized result API.","properties":{"id":{"type":"string","format":"uuid"},"model":{"type":"string"},"status":{"type":"string","enum":["completed","failed","cancelled"]},"request_id":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","model","status","request_id"]},"WebhookCallPayload":{"description":"Call snapshot. DNCR-blocked attempts additionally include dialed, failure_code, dncr, outbound_job_id and campaign_id; no conversation or analysis ran.","type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"room_name":{"type":"string"},"started_at":{"type":["string","null"],"format":"date-time"},"ended_at":{"type":["string","null"],"format":"date-time"},"duration_sec":{"type":["number","null"],"minimum":0},"outcome":{"type":["string","null"]},"direction":{"type":["string","null"],"enum":["inbound","outbound",null]},"caller_number":{"type":["string","null"]},"platform_number":{"type":["string","null"]},"from_number":{"type":["string","null"]},"to_number":{"type":["string","null"]},"agent":{"$ref":"#/components/schemas/WebhookAgentSnapshot"},"flow":{"description":"The flow the call ran inside, or null for an ordinary single-agent call. On a flow call `agent` is whichever member agent held the call at hangup; the flow is what the delivery was configured against.","oneOf":[{"$ref":"#/components/schemas/WebhookFlowSnapshot"},{"type":"null"}]},"transcript":{"type":"array","description":"Caller-leg, PII-redacted transcript only. Warm-transfer brief-leg conversation is excluded.","items":{"$ref":"#/components/schemas/WebhookTranscriptSegment"}},"summary":{"oneOf":[{"$ref":"#/components/schemas/WebhookSummaryResult"},{"type":"null"}]},"extractions":{"type":"array","items":{"$ref":"#/components/schemas/WebhookExtractionResult"}},"dialed":{"type":"boolean","const":false,"description":"Present on call.dncr_blocked; no carrier leg was placed."},"failure_code":{"type":"string","const":"dncr_blocked","description":"Present on call.dncr_blocked. Lookup errors do not emit this event."},"dncr":{"type":"object","additionalProperties":false,"description":"Confirmed DNCR registration that prevented dialing.","properties":{"decision":{"type":"string","const":"blocked"},"reason":{"type":"string","const":"dncr_registered"}},"required":["decision","reason"]},"outbound_job_id":{"type":["string","null"],"format":"uuid","description":"Present on call.dncr_blocked; null for direct placements."},"campaign_id":{"type":["string","null"],"format":"uuid","description":"Present on call.dncr_blocked; null outside a campaign."},"analysis_timed_out":{"type":"boolean","description":"Present and true when the delivery deadline elapsed before all configured summary and extraction jobs reached a final state."}},"required":["id","room_name","started_at","ended_at","duration_sec","outcome","direction","caller_number","platform_number","from_number","to_number","agent","flow","transcript","summary","extractions"]},"WebhookFlowSnapshot":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"]},"WebhookAgentSnapshot":{"type":"object","additionalProperties":false,"properties":{"id":{"type":["string","null"],"format":"uuid"},"slug":{"type":["string","null"]},"name":{"type":["string","null"]},"version":{"type":["integer","null"],"minimum":1}},"required":["id","slug","name","version"]},"WebhookTranscriptSegment":{"type":"object","additionalProperties":false,"description":"A webhook transcript row. This is the stored redacted row exactly as recorded, so it carries slightly less than the same row read back from GET /v1/calls/{id}: there is no leg (a webhook only ever carries the caller leg) and kind is present only on the out-of-band rows that have one, rather than always.","properties":{"speaker":{"$ref":"#/components/schemas/TranscriptSegmentSpeaker"},"text":{"type":"string"},"timestamp":{"type":"number","description":"Unix epoch seconds when the row occurred."},"kind":{"type":"string","enum":["dtmf_received","dtmf_sent","dtmf","transcription_failed","agent_handoff","tool_interrupted"],"description":"Present only on out-of-band rows. Absent on ordinary spoken and tool rows. See TranscriptSegmentKind for the meaning of each value."},"speech_id":{"type":"string","description":"Agent rows. Framework speech-handle id of the generation that produced the reply."},"interrupted":{"type":"boolean","description":"Agent rows. The reply was cut mid-playout by a barge-in."},"name":{"type":"string","description":"Tool name. Present on tool_call and tool_result rows."},"is_error":{"type":"boolean","description":"tool_result rows. True when the invocation failed."},"dtmf_masked":{"type":"boolean","description":"The row stands in for withheld keypad digits."},"digit_count":{"type":"integer","minimum":0,"description":"How many keys were pressed, when dtmf_masked is true."},"reason":{"type":"string","description":"Closed-vocabulary explanation for kind or a masked DTMF value."},"from_agent":{"type":"string","description":"agent_handoff rows. Slug of the agent that handed the call over."},"to_agent":{"type":"string","description":"agent_handoff rows. Slug of the agent that took the call over."},"diar_speaker":{"type":"string","description":"Caller rows on agents with speaker diarization enabled. The turn's diarized speaker label (for example `SPEAKER_00`), distinct from `speaker`, which stays the caller/agent role. Absent when diarization is off."},"diar_segments":{"type":"array","description":"Caller rows on agents with speaker diarization enabled. Per-speaker slices of the turn; each slice's text is PII-redacted like the row text. Absent when diarization is off.","items":{"$ref":"#/components/schemas/WebhookDiarizationSegment"}}},"required":["speaker","text","timestamp"]},"WebhookDiarizationSegment":{"type":"object","additionalProperties":false,"properties":{"speaker":{"type":"string","description":"Diarized speaker label."},"start":{"type":"number","description":"Slice start, in seconds, as reported by the speech recognizer."},"end":{"type":"number","description":"Slice end, in seconds, as reported by the speech recognizer."},"text":{"type":"string"}},"required":["speaker","start","end","text"]},"WebhookSummaryResult":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","running","done","error"]},"text":{"type":["string","null"]},"model":{"type":["string","null"]},"error":{"type":["string","null"],"description":"Stable machine-safe failure token; provider exception text is never emitted."}},"required":["id","status","text","model","error"]},"WebhookExtractionResult":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"extraction_object_id":{"type":["string","null"],"format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","error"]},"model":{"type":["string","null"]},"result":{"description":"Validated structured extraction result; null unless status=done."},"error":{"type":["string","null"],"description":"Stable machine-safe failure token."}},"required":["id","extraction_object_id","name","status","model","result","error"]},"WebhookSignatureHeaders":{"type":"object","additionalProperties":false,"description":"Headers sent with each webhook. Verify sha256=HMAC_SHA256(secret, X-Sonus-Timestamp + '.' + exact_body), compare in constant time, reject stale timestamps, and deduplicate by X-Sonus-Delivery-Id.","properties":{"X-Sonus-API-Version":{"type":"string","const":"2026-07-01"},"X-Sonus-Event":{"$ref":"#/components/schemas/WebhookEvent"},"X-Sonus-Delivery-Id":{"type":"string","format":"uuid"},"X-Sonus-Attempt":{"type":"string","pattern":"^[1-9][0-9]*$"},"X-Sonus-Timestamp":{"type":"string","pattern":"^[0-9]+$"},"X-Sonus-Signature":{"type":"string","pattern":"^sha256=[0-9a-f]{64}$"},"X-Sonus-Replayed-From":{"type":"string","format":"uuid","description":"Present only for replay deliveries."}},"required":["X-Sonus-API-Version","X-Sonus-Event","X-Sonus-Delivery-Id","X-Sonus-Attempt","X-Sonus-Timestamp","X-Sonus-Signature"]},"CampaignStatus":{"type":"string","description":"Campaign lifecycle. `draft` holds configuration and places no calls; `scheduled` is launched but waiting for `start_at`; `running` is feeding calls; `paused` stopped feeding (by an operator or by the platform, see `paused_reason`); `completed` finished every recipient or passed `end_at`; `stopped` was ended for good and cannot be resumed.","enum":["draft","scheduled","running","paused","completed","stopped"]},"CampaignPausedReason":{"type":"string","description":"Why a paused campaign stopped. `manual` is an operator action; the rest are platform decisions the feeder makes and re-evaluates — `minutes_exhausted` when the monthly call-minutes wallet is empty, `calls_disabled` when calling is switched off for the tenant, `entitlement_revoked` when the campaigns entitlement was withdrawn mid-run, `configuration_invalid` when every job would be rejected for the same configuration reason (its phone number, trunk or agent is gone or unavailable; the exact rejection is in `paused_detail`), `dncr_configuration_invalid` when the campaign's DNCR connection or its credentials are unusable (calls stay stopped until it is repaired).","enum":["manual","minutes_exhausted","calls_disabled","entitlement_revoked","dncr_configuration_invalid","configuration_invalid"]},"CampaignVoicemailAction":{"type":"string","description":"What the agent should do when a call reaches voicemail. `hangup` ends the call; `message` leaves `voicemail_message` and then ends it. Delivered as an instruction to the agent for that call, so it is best-effort rather than a detector guarantee.","enum":["hangup","message"]},"CampaignRecipientStatus":{"type":"string","description":"Dial state of one recipient. `pending` is not yet fed; `queued` has an outbound job waiting; `calling` is dialing or connected; `completed`, `failed`, and `canceled` are terminal. `excluded` rows were either rejected at import (never eligible to dial) or refused by the do-not-call register when the feeder dialed them; `exclusion_reason` says which.","enum":["pending","queued","calling","completed","failed","canceled","excluded"]},"CampaignCounters":{"type":"object","additionalProperties":false,"description":"Per-status recipient tally, always derived from the recipient rows rather than stored, so it cannot drift from reality.","properties":{"total":{"type":"integer","minimum":0},"pending":{"type":"integer","minimum":0},"queued":{"type":"integer","minimum":0},"calling":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"canceled":{"type":"integer","minimum":0},"excluded":{"type":"integer","minimum":0}},"required":["total","pending","queued","calling","completed","failed","canceled","excluded"]},"Campaign":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"org_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"agent_id":{"type":"string","format":"uuid"},"agent_name":{"type":"string"},"agent_version_id":{"type":"string","format":"uuid","description":"Pinned agent version. When absent the agent's production version is resolved at dial time."},"group_id":{"type":"string","format":"uuid","description":"The group the campaign dials through, absent otherwise. Each recipient is assigned to one member using the group's routing strategy and dialed by that member's production version. agent_id and agent_name identify the first dispatchable member when the group was attached, a display placeholder rather than the agent every call uses."},"group_name":{"type":"string"},"number_pool_id":{"type":"string","format":"uuid"},"number_pool_name":{"type":"string","description":"Display name of the attached number pool, denormalized so the caller-ID route can be named without a second request."},"phone_number_id":{"type":"string","format":"uuid"},"phone_number_e164":{"type":"string","description":"E.164 of the pinned caller ID, denormalized so the caller-ID route can be named without a second request."},"trunk_id":{"type":"string","format":"uuid"},"transport":{"$ref":"#/components/schemas/PhoneNumberTransport"},"status":{"$ref":"#/components/schemas/CampaignStatus"},"paused_reason":{"$ref":"#/components/schemas/CampaignPausedReason"},"paused_detail":{"type":"string","maxLength":1024,"description":"The exact rejection behind paused_reason configuration_invalid."},"start_at":{"type":"string","format":"date-time"},"end_at":{"type":"string","format":"date-time","description":"Hard stop. When it passes, queued calls are canceled and the campaign completes."},"policy_overrides":{"$ref":"#/components/schemas/OutboundPolicyOverrides"},"max_concurrent":{"type":"integer","minimum":1,"description":"Ceiling on this campaign's simultaneous calls. Absent means the organization limit applies."},"reserved_for_other":{"type":"integer","minimum":0,"description":"Concurrency slots held back from this campaign for other traffic, such as inbound."},"board_id":{"type":"string","format":"uuid","description":"Analysis board rendered for this campaign, scoped to its calls."},"auto_resume_on_renewal":{"type":"boolean","description":"Resume automatically once minutes come back after a `minutes_exhausted` pause."},"voicemail_action":{"$ref":"#/components/schemas/CampaignVoicemailAction"},"voicemail_message":{"type":"string"},"counters":{"$ref":"#/components/schemas/CampaignCounters"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"dncr":{"anyOf":[{"$ref":"#/components/schemas/DNCROptions"},{"type":"null"}]}},"required":["id","org_id","name","agent_id","agent_name","status","reserved_for_other","auto_resume_on_renewal","voicemail_action","counters","created_at","updated_at"]},"CampaignListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"CampaignCreateRequest":{"type":"object","additionalProperties":false,"description":"A campaign is created as a draft, so only a name and a target — an agent (`agent_id`) or a group (`group_id`) — are required. A caller-ID source (`number_pool_id` or `phone_number_id`) is required to launch, not to create.","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"agent_id":{"type":"string","format":"uuid","description":"Required unless group_id is given; setting both is rejected with 422 `conflict` on `group_id`."},"group_id":{"type":"string","format":"uuid","description":"Dial through a group of agents instead of one agent: the feeder picks one member per recipient. The group must have a member that can take calls now (422 on `group_id`: not_found, archived, no_members), and agent_version_id cannot be pinned. Requires the `groups` entitlement in addition to `campaigns`."},"agent_version_id":{"type":"string","format":"uuid"},"number_pool_id":{"type":"string","format":"uuid"},"phone_number_id":{"type":"string","format":"uuid"},"trunk_id":{"type":"string","format":"uuid"},"transport":{"$ref":"#/components/schemas/PhoneNumberTransport"},"start_at":{"type":"string","format":"date-time"},"end_at":{"type":"string","format":"date-time"},"policy_overrides":{"$ref":"#/components/schemas/OutboundPolicyOverrides"},"max_concurrent":{"type":"integer","minimum":1,"maximum":1000},"reserved_for_other":{"type":"integer","minimum":0,"maximum":1000},"board_id":{"type":"string","format":"uuid"},"auto_resume_on_renewal":{"type":"boolean"},"voicemail_action":{"$ref":"#/components/schemas/CampaignVoicemailAction"},"voicemail_message":{"type":"string","maxLength":1000,"description":"Required when `voicemail_action` is `message`, and rejected otherwise."},"dncr":{"$ref":"#/components/schemas/DNCROptions"}},"required":["name"],"anyOf":[{"required":["agent_id"]},{"required":["group_id"]}]},"CampaignUpdateRequest":{"type":"object","additionalProperties":false,"description":"Partial update, accepted only while the campaign is `draft` or `paused`. An explicit `null` clears a nullable field; an omitted field is left alone.","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":["string","null"],"maxLength":2000},"agent_id":{"type":"string","format":"uuid","description":"Setting an agent moves a group campaign back to that single agent (clears group_id)."},"group_id":{"type":["string","null"],"format":"uuid","description":"Move the campaign onto a group (stores its first dispatchable member as the placeholder agent_id and drops a pinned agent_version_id), or null to stop dialing through the group — null must come with agent_id in the same request (422 `agent_required`). Pinning agent_version_id on a group campaign is rejected with 422 `unsupported_with_group`. Setting a group requires the `groups` entitlement."},"agent_version_id":{"type":["string","null"],"format":"uuid"},"number_pool_id":{"type":["string","null"],"format":"uuid"},"phone_number_id":{"type":["string","null"],"format":"uuid"},"trunk_id":{"type":["string","null"],"format":"uuid"},"transport":{"oneOf":[{"$ref":"#/components/schemas/PhoneNumberTransport"},{"type":"null"}]},"start_at":{"type":["string","null"],"format":"date-time"},"end_at":{"type":["string","null"],"format":"date-time"},"policy_overrides":{"oneOf":[{"$ref":"#/components/schemas/OutboundPolicyOverrides"},{"type":"null"}]},"max_concurrent":{"type":["integer","null"],"minimum":1,"maximum":1000},"reserved_for_other":{"type":"integer","minimum":0,"maximum":1000},"board_id":{"type":["string","null"],"format":"uuid"},"auto_resume_on_renewal":{"type":"boolean"},"voicemail_action":{"$ref":"#/components/schemas/CampaignVoicemailAction"},"voicemail_message":{"type":["string","null"],"maxLength":1000},"dncr":{"anyOf":[{"$ref":"#/components/schemas/DNCROptions"},{"type":"null"}]}}},"CampaignCloneRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Name for the clone. Omit to get \"<source name> (copy)\", uniquified."},"include_recipients":{"type":"boolean","default":false,"description":"Copy the recipient list into the clone as fresh pending rows."}}},"CampaignRecipient":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"campaign_id":{"type":"string","format":"uuid"},"row_number":{"type":"integer","minimum":1,"description":"Position in the uploaded file, so a row can be traced back to its source line."},"phone_e164":{"type":"string"},"contact_id":{"type":"string","format":"uuid"},"variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-recipient prompt variables taken from the upload's non-phone columns."},"status":{"$ref":"#/components/schemas/CampaignRecipientStatus"},"exclusion_reason":{"type":"string","description":"Why the row is excluded. Set at import to `duplicate`, `invalid_number`, or `invalid_variables`; set to `dncr_blocked` when the number was refused by the do-not-call register at dial time. Treat unknown values as opaque."},"job_id":{"type":"string","format":"uuid","description":"Outbound job created for this recipient, once fed."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","campaign_id","row_number","phone_e164","variables","status","created_at","updated_at"]},"CampaignRecipientListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CampaignRecipient"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"CampaignRecipientImportMapping":{"type":"object","additionalProperties":false,"description":"Steers how the uploaded columns become recipients. Sent as the `mapping` multipart part.","properties":{"phone_column":{"type":"string","description":"Header of the dial-target column. Optional when a conventional header can be inferred."},"variable_columns":{"type":"object","additionalProperties":{"type":"string"},"description":"Renames source headers to prompt-variable names, keyed by header. Unlisted non-phone columns keep their header as the variable name."},"skip_invalid":{"type":"boolean","default":false,"description":"Import past unusable rows, storing them as `excluded`, instead of rejecting the whole file."}}},"CampaignRecipientUpload":{"type":"object","additionalProperties":false,"description":"Multipart upload body. At most 10 MiB in total.","properties":{"file":{"type":"string","format":"binary","description":"CSV or XLSX recipient list. The parser is chosen from the file content, not its name."},"mapping":{"$ref":"#/components/schemas/CampaignRecipientImportMapping"}},"required":["file"]},"CampaignRecipientRowIssue":{"type":"object","additionalProperties":false,"properties":{"row_number":{"type":"integer","minimum":1},"code":{"type":"string","enum":["duplicate","invalid_number","invalid_variables"]},"message":{"type":"string"}},"required":["row_number","code","message"]},"CampaignRecipientPreviewRow":{"type":"object","additionalProperties":false,"properties":{"row_number":{"type":"integer","minimum":1},"phone":{"type":"string"},"variables":{"type":"object","additionalProperties":{"type":"string"}},"issue":{"type":"string","description":"Present when this sampled row would be excluded."}},"required":["row_number","phone","variables"]},"CampaignRecipientPreviewResponse":{"type":"object","additionalProperties":false,"description":"What an import of the uploaded file would do. Nothing is stored.","properties":{"headers":{"type":"array","items":{"type":"string"}},"phone_column":{"type":["string","null"],"description":"The resolved dial-target column, or null when none could be inferred — supply `mapping.phone_column` and preview again."},"total_rows":{"type":"integer","minimum":0},"valid_rows":{"type":"integer","minimum":0},"invalid_rows":{"type":"integer","minimum":0},"duplicate_rows":{"type":"integer","minimum":0},"sample":{"type":"array","items":{"$ref":"#/components/schemas/CampaignRecipientPreviewRow"},"description":"First rows of the file, for confirming the column mapping."},"issues":{"type":"array","items":{"$ref":"#/components/schemas/CampaignRecipientRowIssue"},"description":"Problem rows, capped at 200 entries."},"issues_total":{"type":"integer","minimum":0,"description":"Total problem rows, which may exceed the reported `issues`."}},"required":["headers","phone_column","total_rows","valid_rows","invalid_rows","duplicate_rows","sample","issues","issues_total"]},"CampaignRecipientImportResponse":{"type":"object","additionalProperties":false,"properties":{"campaign_id":{"type":"string","format":"uuid"},"total_rows":{"type":"integer","minimum":0},"imported":{"type":"integer","minimum":0},"excluded":{"type":"integer","minimum":0},"counters":{"$ref":"#/components/schemas/CampaignCounters"}},"required":["campaign_id","total_rows","imported","excluded","counters"]},"ErrorCode":{"type":"string","description":"Stable machine-readable error token. The top-level x-sonus-error-catalog extension defines allowed statuses, retry policy, details shape, and recovery guidance for every value.","enum":["agent_archived","agent_baseline_too_large","agent_capacity_exhausted","agent_not_found","agent_state_changed","agent_version_not_found","ai_connectors_disabled","alert_limit_reached","alert_not_found","analysis_board_archived","analysis_board_capacity_reached","analysis_board_name_taken","analysis_board_not_found","analysis_export_failed","analysis_insight_not_found","analysis_result_too_large","api_key_not_found","api_key_product_mismatch","audit_required","authentication_rate_limited","authentication_unavailable","bad_request","body_read_failed","call_already_purged","call_hangup_in_progress","call_hangup_outcome_unknown","call_hangup_provider_failed","call_hangup_unavailable","call_not_ended","call_not_found","call_not_live","call_on_legal_hold","call_processing_in_progress","call_summary_not_found","calls_disabled","campaign_no_recipients","campaign_not_found","campaign_recipient_not_found","campaign_recipients_invalid","campaign_state_invalid","capacity_unavailable","conflict","connected_app_not_found","contact_e164_conflict","contact_not_found","contact_number_mismatch","contact_tag_name_conflict","contact_tag_not_found","context_delivery_unconfigured","context_encryption_failed","credential_decryption_failed","credential_encryption_failed","credential_service_unavailable","db_error","delegation_not_allowed","dncr_blocked","dncr_configuration_invalid","dncr_enforced","dncr_unavailable","draft_not_promotable","draft_state_changed","duplicate_field","duplicate_query_parameter","empty_body","encode_error","encoding_failed","entitlement_required","entitlements_unavailable","eval_call_not_found","eval_check_archived","eval_check_not_found","eval_check_slug_taken","eval_generation_job_not_found","eval_run_not_cancelable","eval_run_not_found","eval_scenario_archived","eval_scenario_not_found","eval_scenario_slug_taken","eval_suite_archived","eval_suite_empty","eval_suite_not_found","eval_suite_slug_taken","extraction_object_archived","extraction_object_in_use","extraction_object_managed_by_group","extraction_object_name_taken","extraction_object_not_found","flow_archived","flow_in_use","flow_not_found","flow_slug_taken","forbidden","group_archived","group_in_use","group_name_taken","group_not_found","guardrail_set_archived","guardrail_set_in_use","guardrail_set_not_found","idempotency_capacity_exceeded","idempotency_conflict","idempotency_identity_unavailable","idempotency_in_progress","idempotency_key_required","idempotency_misconfigured","idempotency_persistence_failed","idempotency_result_lost","idempotency_result_unavailable","idempotency_security_context_changed","idempotency_unavailable","inference_async_disabled","inference_capacity_unavailable","inference_concurrency_exhausted","inference_content_expired","inference_job_limit","inference_model_not_found","inference_model_unavailable","inference_quota_exhausted","inference_request_exists","inference_result_not_ready","inference_storage_unavailable","inference_unsupported_timestamps","inference_upload_expired","inference_upstream_failed","inference_voice_not_found","internal","internal_context_missing","internal_error","invalid_call_policy","invalid_header","invalid_idempotency_key","invalid_json","invalid_multipart","invalid_outbound_policy","invalid_path_parameter","invalid_query_parameter","invalid_range","invalid_recipient_file","invalid_request_id","invalid_uuid","kms_error","knowledge_base_archived","knowledge_base_in_use","knowledge_base_not_found","knowledge_base_slug_taken","knowledge_document_not_found","mcp_introspection_failed","mcp_server_archived","mcp_server_in_use","mcp_server_not_found","mcp_server_slug_taken","member_already_exists","member_invitation_accepted","member_invitation_conflict","member_invitation_not_found","member_invitation_revoked","member_last_owner","member_not_found","method_not_allowed","minutes_quota_exhausted","model_release_changed","multiple_json_values","name_taken","no_agent_version","no_draft","no_mutable_draft","no_observed_tool_state","no_org","no_production_version","no_staging_version","no_tx","not_found","number_in_use","number_pool_not_found","number_pool_unavailable","number_taken","operation_not_available","organization_not_found","outbound_capacity_profile_conflict","outbound_capacity_profile_in_use","outbound_capacity_profile_not_found","outbound_destination_denied","outbound_job_already_started","outbound_job_not_found","outbound_job_terminal","outbound_number_pool_in_use","outbound_number_pool_name_conflict","outbound_number_pool_not_found","payload_encoding_failed","pcap_not_configured","pcap_unavailable","permission_escalation","phone_number_archived","phone_number_not_found","phone_number_operation_in_progress","phone_number_provisioning","phone_number_unavailable","pii_access_already_granted","pii_access_approval_required","pii_access_mode_unavailable","pii_access_request_exists","pii_access_request_not_actionable","pii_access_request_not_found","pii_access_request_requires_user","pii_access_self_decision_forbidden","precondition_failed","preview_failed","preview_unsupported","pronunciation_table_archived","pronunciation_table_in_use","pronunciation_table_not_found","protected_member","provider_request_failed","rate_limit_exceeded","rate_limited","reconciliation_service_unavailable","recording_blob_missing","recording_decryption_failed","recording_failed","recording_not_found","recording_not_ready","recording_storage_unavailable","recording_unavailable","referenced_resource_missing","request_body_read_failed","request_timeout","request_too_large","resource_changed","response_buffer_failed","role_in_use","role_name_conflict","role_name_reserved","role_not_found","route_mismatch","scheduling_unconfigured","secret_archived","secret_encryption_failed","secret_in_use","secret_name_taken","secret_not_found","secret_resolution_failed","sip_pcap_blob_missing","sip_pcap_decryption_failed","sip_pcap_failed","sip_pcap_not_found","sip_pcap_not_ready","sip_pcap_storage_unavailable","sip_trunk_archived","sip_trunk_credentials_unavailable","sip_trunk_in_use","sip_trunk_not_found","sip_trunk_operation_in_progress","sip_trunk_provisioning","slug_taken","stored_data_invalid","stored_policy_invalid","system_role_immutable","team_not_connected","tool_archived","tool_in_use","tool_invocation_not_found","tool_io_decryption_failed","tool_io_decryption_unavailable","tool_io_raw_not_found","tool_not_found","tool_slug_taken","transcript_decryption_failed","transcript_decryption_unavailable","transcript_not_found","transcript_raw_not_found","transcription_output_invalid","transfer_already_terminal","transfer_cancel_outcome_unknown","transfer_cancel_provider_failed","transfer_cancel_unavailable","transfer_not_found","transport_mismatch","trunk_busy","trunk_not_active","trunk_provider_not_ready","turn_audio_expired","turn_audio_not_found","turn_audio_storage_unavailable","turn_audio_unavailable","twilio_inventory_unavailable","twilio_native_unconfigured","unauthorized","unexpected_body","unknown_query_parameter","unsupported_media_type","unsupported_transport","validation_failed","value_too_long","version_locked","webhook_archived","webhook_delivery_in_progress","webhook_delivery_not_found","webhook_delivery_payload_invalid","webhook_delivery_payload_missing","webhook_in_use","webhook_inactive","webhook_missing","webhook_name_taken","webhook_not_found","webhook_secret_encryption_failed","webhook_secret_missing","workspace_contract_unavailable","workspace_not_found"]},"DNCROptions":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["inherit","enabled","disabled"]},"connection_id":{"type":"string","format":"uuid"}}},"DNCROrganizationPolicy":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["default_off","default_on","enforced"]},"connection_id":{"type":"string","format":"uuid"}},"required":["mode"]},"DNCRSnapshot":{"type":"object","additionalProperties":false,"properties":{"schema_version":{"type":"integer","enum":[1]},"requested":{"$ref":"#/components/schemas/DNCROptions"},"enabled":{"type":"boolean"},"enforced":{"type":"boolean"},"connection_id":{"type":"string","format":"uuid"},"policy_version":{"type":"integer","minimum":0},"source":{"type":"string","enum":["organization","override"]}},"required":["schema_version","requested","enabled","enforced","policy_version","source"],"description":"Server-owned scheduling snapshot. Current organization enforcement always takes precedence at dispatch. Legacy jobs with an empty snapshot inherit current policy."},"DNCRResult":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"decision":{"type":"string","enum":["allowed","blocked","disabled","unavailable","not_applicable"]},"reason":{"type":"string"},"checked_at":{"type":"string","format":"date-time"},"connection_id":{"type":"string","format":"uuid"},"credential_revision":{"type":"integer","minimum":1},"transaction_id":{"type":"string"},"policy":{"$ref":"#/components/schemas/DNCRSnapshot"},"detail":{"type":"string","maxLength":1025,"description":"Why a check was unavailable, in operator terms (the Kejue Voice limiter and its configured rate, or the provider request and HTTP status). Subscriber numbers are masked. Absent when the check completed."}},"required":["decision","reason","checked_at","policy"]},"DNCRConnectionCreateRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"endpoint":{"type":"string","format":"uri","default":"https://apihub.etisalat.ae:9443/etisalat/serviceapis/dncr/v0/check"},"token_endpoint":{"type":"string","format":"uri","default":"https://apihub.etisalat.ae:9443/etisalat/serviceapis/confidential/oauth2/token"},"requests_per_minute":{"type":"integer","minimum":1,"maximum":100000,"default":5,"description":"Kejue Voice admission ceiling shared by all checks on this connection. Both minute and second limits apply."},"requests_per_second":{"type":"integer","minimum":0,"maximum":100000,"default":0,"description":"Additional sliding one-second ceiling shared across replicas. Zero disables this ceiling. Configure from the verified provider subscription; this does not track its monthly allowance."},"client_id":{"type":"string","maxLength":4096,"writeOnly":true,"description":"Omit on PATCH to retain the stored value. Optional user credentials are stored for provisioning; DNCR v0 authenticates with client credentials."},"client_secret":{"type":"string","maxLength":4096,"writeOnly":true,"description":"Omit on PATCH to retain the stored value. Optional user credentials are stored for provisioning; DNCR v0 authenticates with client credentials."},"user_id":{"type":"string","maxLength":4096,"writeOnly":true,"description":"Omit on PATCH to retain the stored value. Optional user credentials are stored for provisioning; DNCR v0 authenticates with client credentials."},"password":{"type":"string","maxLength":4096,"writeOnly":true,"description":"Omit on PATCH to retain the stored value. Optional user credentials are stored for provisioning; DNCR v0 authenticates with client credentials."}},"required":["name","client_id","client_secret"]},"DNCRConnectionUpdateRequest":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"endpoint":{"type":"string","format":"uri","default":"https://apihub.etisalat.ae:9443/etisalat/serviceapis/dncr/v0/check"},"token_endpoint":{"type":"string","format":"uri","default":"https://apihub.etisalat.ae:9443/etisalat/serviceapis/confidential/oauth2/token"},"requests_per_minute":{"type":"integer","minimum":1,"maximum":100000,"default":5,"description":"Kejue Voice admission ceiling shared by all checks on this connection. Both minute and second limits apply."},"requests_per_second":{"type":"integer","minimum":0,"maximum":100000,"default":0,"description":"Additional sliding one-second ceiling shared across replicas. Zero disables this ceiling. Configure from the verified provider subscription; this does not track its monthly allowance."},"client_id":{"type":"string","maxLength":4096,"writeOnly":true,"description":"Omit on PATCH to retain the stored value. Optional user credentials are stored for provisioning; DNCR v0 authenticates with client credentials."},"client_secret":{"type":"string","maxLength":4096,"writeOnly":true,"description":"Omit on PATCH to retain the stored value. Optional user credentials are stored for provisioning; DNCR v0 authenticates with client credentials."},"user_id":{"type":"string","maxLength":4096,"writeOnly":true,"description":"Omit on PATCH to retain the stored value. Optional user credentials are stored for provisioning; DNCR v0 authenticates with client credentials."},"password":{"type":"string","maxLength":4096,"writeOnly":true,"description":"Omit on PATCH to retain the stored value. Optional user credentials are stored for provisioning; DNCR v0 authenticates with client credentials."}},"minProperties":1},"DNCRConnection":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"endpoint":{"type":"string","format":"uri","default":"https://apihub.etisalat.ae:9443/etisalat/serviceapis/dncr/v0/check"},"token_endpoint":{"type":"string","format":"uri","default":"https://apihub.etisalat.ae:9443/etisalat/serviceapis/confidential/oauth2/token"},"requests_per_minute":{"type":"integer","minimum":1,"maximum":100000,"default":5,"description":"Kejue Voice admission ceiling shared by all checks on this connection. Both minute and second limits apply."},"requests_per_second":{"type":"integer","minimum":0,"maximum":100000,"default":0,"description":"Additional sliding one-second ceiling shared across replicas. Zero disables this ceiling. Configure from the verified provider subscription; this does not track its monthly allowance."},"id":{"type":"string","format":"uuid"},"configured_fields":{"type":"array","items":{"type":"string","enum":["client_id","client_secret","user_id","password"]}},"credential_revision":{"type":"integer","minimum":1},"resource_version":{"type":"integer","minimum":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"archived_at":{"type":["string","null"],"format":"date-time"}},"required":["name","endpoint","token_endpoint","requests_per_minute","id","configured_fields","credential_revision","resource_version","created_at","updated_at","archived_at"]},"DNCRConnectionListResponse":{"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DNCRConnection"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"DNCRConnectionTestRequest":{"type":"object","additionalProperties":false,"properties":{"to_number":{"type":"string","description":"UAE phone number, in +971 or local 0 format."}},"required":["to_number"]},"ResolveDateRequest":{"type":"object","additionalProperties":false,"required":["timezone"],"properties":{"timezone":{"type":"string","minLength":1,"description":"IANA timezone, e.g. Asia/Dubai or America/New_York. Required; no phone-number or server-local inference."},"reference_date":{"type":"string","format":"date","description":"Optional arithmetic anchor, Gregorian YYYY-MM-DD. Defaults to local today."},"date":{"type":"string","format":"date","description":"Explicit valid Gregorian date. Mutually exclusive with date components."},"day_of_month":{"type":"integer","minimum":1,"maximum":31},"month":{"type":"integer","minimum":1,"maximum":12,"description":"Requires day_of_month."},"year":{"type":"integer","minimum":1,"maximum":9999,"description":"Requires month and day_of_month."},"weekday":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"description":"Anchor weekday, or a weekday claim to validate against an explicit date."},"occurrence":{"type":"string","enum":["next","on_or_after","previous","on_or_before","this_week","next_week","last_week"],"description":"Only for a weekday anchor. Defaults to next, or previous when direction is past."},"direction":{"type":"string","enum":["future","past"],"default":"future","description":"Direction for incomplete calendar dates and bare weekdays. Does not override an explicit year/date or occurrence."},"days":{"type":"integer","minimum":-36600,"maximum":36600,"default":0},"weeks":{"type":"integer","minimum":-5200,"maximum":5200,"default":0},"months":{"type":"integer","minimum":-1200,"maximum":1200,"default":0},"week_starts_on":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"default":"monday"},"locale":{"type":"string","enum":["en-US","ar-SA"],"default":"en-US","description":"Spoken-date formatting only. The calendar remains Gregorian."}}},"ResolveDateResult":{"type":"object","additionalProperties":false,"required":["status","resolved_date","weekday","today","reference_date","timezone","timezone_source","days_from_today","is_past","date_spoken","adjustments"],"properties":{"status":{"type":"string","enum":["resolved","weekday_mismatch"]},"resolved_date":{"type":"string","format":"date"},"weekday":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"today":{"type":"string","format":"date"},"reference_date":{"type":"string","format":"date"},"timezone":{"type":"string"},"timezone_source":{"type":"string","enum":["request","organization","configuration","caller","agent"]},"days_from_today":{"type":"integer"},"is_past":{"type":"boolean"},"date_spoken":{"type":"string"},"adjustments":{"type":"array","items":{"type":"string","enum":["month_end_clamped"]}},"expected_weekday":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"question":{"type":"string"}}},"AgentBehaviorResolveDate":{"type":"object","additionalProperties":false,"description":"Opt-in date calculator; no catalog tool ID or external credentials. An attached catalog tool named resolve_date conflicts and must be detached before enabling. A calculation clears last-result slots, then a successful result writes resolve_date_date, resolve_date_timezone and resolve_date_spoken for exact chaining.","properties":{"enabled":{"type":"boolean","default":false},"timezone_mode":{"type":"string","enum":["organization","custom","caller","agent"],"default":"organization","description":"organization uses the workspace default. custom requires timezone. caller uses vars.lead_timezone, otherwise the workspace default; an invalid provided zone fails. agent exposes a REQUIRED timezone argument to the model: ask the caller for an unambiguous location/IANA zone, never guess or infer from their phone number."},"timezone":{"type":"string","minLength":1,"description":"IANA timezone required for custom mode."},"week_starts_on":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"default":"monday"},"locale":{"type":"string","enum":["en-US","ar-SA"],"default":"en-US","description":"Spoken-date formatting only. The calendar remains Gregorian."}}}}},"x-sonus-error-registry-version":1,"x-kejue-error-registry-version":1,"x-sonus-error-catalog":[{"code":"agent_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of agent archived."},{"code":"agent_baseline_too_large","statuses":[422],"retry":"after_correction","details":"polymorphic_object","description":"The request is syntactically valid but cannot be applied because of agent baseline too large."},{"code":"agent_capacity_exhausted","statuses":[503],"retry":"after_retry_after","details":"none","description":"No agent worker has a free dispatch slot for a new call right now; retry after the Retry-After interval while autoscaling adds capacity."},{"code":"agent_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested agent does not exist in the current workspace or is not visible to the caller."},{"code":"agent_state_changed","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of agent state changed."},{"code":"agent_version_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested agent version does not exist in the current workspace or is not visible to the caller."},{"code":"ai_connectors_disabled","statuses":[403],"retry":"after_state_change","details":"none","description":"AI assistant access (connected apps) is turned off for this team. A team admin can enable it with PATCH /v1/orgs/current {\"ai_connectors\": \"enabled\"}."},{"code":"alert_limit_reached","statuses":[409],"retry":"after_state_change","details":"none","description":"The operation conflicts with current resource state because of alert limit reached."},{"code":"alert_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested alert does not exist in the current workspace or is not visible to the caller."},{"code":"analysis_board_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of analysis board archived."},{"code":"analysis_board_capacity_reached","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of analysis board capacity reached."},{"code":"analysis_board_name_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of analysis board name taken."},{"code":"analysis_board_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested analysis board does not exist in the current workspace or is not visible to the caller."},{"code":"analysis_export_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of analysis export failed; retain request_id for support correlation."},{"code":"analysis_insight_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested analysis insight does not exist in the current workspace or is not visible to the caller."},{"code":"analysis_result_too_large","statuses":[422],"retry":"after_correction","details":"polymorphic_object","description":"The request is syntactically valid but cannot be applied because of analysis result too large."},{"code":"api_key_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested API key does not exist in the current workspace or is not visible to the caller."},{"code":"api_key_product_mismatch","statuses":[403],"retry":"never","details":"none","description":"This key belongs to a different product. Use an Inference key for Inference endpoints and a Voice key for Voice endpoints."},{"code":"audit_required","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of audit required; retain request_id for support correlation."},{"code":"authentication_rate_limited","statuses":[429],"retry":"after_retry_after","details":"none","description":"The caller exceeded an enforced limit; wait for Retry-After before retrying."},{"code":"authentication_unavailable","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of authentication unavailable; follow the registry retry policy."},{"code":"bad_request","statuses":[400],"retry":"after_correction","details":"none","description":"The request was rejected because of bad request; correct the request before retrying."},{"code":"body_read_failed","statuses":[400],"retry":"safe","details":"none","description":"The request was rejected because of body read failed; correct the request before retrying."},{"code":"call_already_purged","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of call already purged."},{"code":"call_hangup_in_progress","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of call hangup in progress."},{"code":"call_hangup_outcome_unknown","statuses":[504],"retry":"from_details","details":"upstream_failure","description":"An upstream operation timed out; use details.retryable to decide whether to retry."},{"code":"call_hangup_provider_failed","statuses":[502],"retry":"from_details","details":"upstream_failure","description":"An upstream provider request failed; use details.retryable to decide whether to retry."},{"code":"call_hangup_unavailable","statuses":[503],"retry":"from_details","details":"upstream_failure","description":"A required service is unavailable because of call hangup unavailable; follow the registry retry policy."},{"code":"call_not_ended","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of call not ended."},{"code":"call_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested call does not exist in the current workspace or is not visible to the caller."},{"code":"call_not_live","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of call not live."},{"code":"call_on_legal_hold","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of call on legal hold."},{"code":"call_processing_in_progress","statuses":[409],"retry":"after_state_change","details":"async_state","description":"The operation conflicts with current resource state because of call processing in progress."},{"code":"call_summary_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested call summary does not exist in the current workspace or is not visible to the caller."},{"code":"calls_disabled","statuses":[403,503],"retry":"after_state_change","details":"optional_object","description":"Call activity is switched off for this tenant by a Kejue Voice operator; details.scope names the tier (platform, account or org) and details.reason carries the operator's note. Calls already in progress are unaffected. Retrying will not succeed until the switch is lifted."},{"code":"campaign_no_recipients","statuses":[422],"retry":"after_state_change","details":"none","description":"The campaign has no pending recipients to dial; import a recipient list before launching."},{"code":"campaign_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested campaign does not exist in the current workspace or is not visible to the caller."},{"code":"campaign_recipient_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested campaign recipient does not exist in the current workspace or is not visible to the caller."},{"code":"campaign_recipients_invalid","statuses":[422],"retry":"after_correction","details":"optional_object","description":"The uploaded recipient file contains rows that cannot be imported (invalid numbers, duplicates, or bad variables). Fix the listed rows, or set mapping.skip_invalid to import past them as excluded rows. details carries the per-row report."},{"code":"campaign_state_invalid","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The campaign is not in a lifecycle state this operation applies to; details carries the current and required status."},{"code":"capacity_unavailable","statuses":[503],"retry":"safe","details":"none","description":"A required service is unavailable because of capacity unavailable; follow the registry retry policy."},{"code":"conflict","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of conflict."},{"code":"connected_app_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested connected app does not exist in the current workspace or is not visible to the caller."},{"code":"contact_e164_conflict","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of contact e164 conflict."},{"code":"contact_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested contact does not exist in the current workspace or is not visible to the caller."},{"code":"contact_number_mismatch","statuses":[422],"retry":"after_correction","details":"resource_conflict","description":"The request is syntactically valid but cannot be applied because of contact number mismatch."},{"code":"contact_tag_name_conflict","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of contact tag name conflict."},{"code":"contact_tag_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested contact tag does not exist in the current workspace or is not visible to the caller."},{"code":"context_delivery_unconfigured","statuses":[503],"retry":"after_state_change","details":"none","description":"A required service is unavailable because of context delivery unconfigured; follow the registry retry policy."},{"code":"context_encryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of context encryption failed; retain request_id for support correlation."},{"code":"credential_decryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of credential decryption failed; retain request_id for support correlation."},{"code":"credential_encryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of credential encryption failed; retain request_id for support correlation."},{"code":"credential_service_unavailable","statuses":[503],"retry":"safe","details":"none","description":"A required service is unavailable because of credential service unavailable; follow the registry retry policy."},{"code":"db_error","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of db error; retain request_id for support correlation."},{"code":"delegation_not_allowed","statuses":[403],"retry":"never","details":"none","description":"The authenticated caller is not allowed to complete the operation because of delegation not allowed."},{"code":"dncr_blocked","statuses":[403],"retry":"never","details":"none","description":"The authenticated caller is not allowed to complete the operation because of dncr blocked."},{"code":"dncr_configuration_invalid","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of dncr configuration invalid; follow the registry retry policy."},{"code":"dncr_enforced","statuses":[403],"retry":"after_state_change","details":"none","description":"The authenticated caller is not allowed to complete the operation because of dncr enforced."},{"code":"dncr_unavailable","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of dncr unavailable; follow the registry retry policy."},{"code":"draft_not_promotable","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of draft not promotable."},{"code":"draft_state_changed","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of draft state changed."},{"code":"duplicate_field","statuses":[400],"retry":"after_correction","details":"optional_object","description":"The request was rejected because of duplicate field; correct the request before retrying."},{"code":"duplicate_query_parameter","statuses":[400],"retry":"after_correction","details":"parameter","description":"The request was rejected because of duplicate query parameter; correct the request before retrying."},{"code":"empty_body","statuses":[400],"retry":"after_correction","details":"none","description":"The request was rejected because of empty body; correct the request before retrying."},{"code":"encode_error","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of encode error; retain request_id for support correlation."},{"code":"encoding_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of encoding failed; retain request_id for support correlation."},{"code":"entitlement_required","statuses":[403],"retry":"after_state_change","details":"entitlement_feature","description":"The authenticated caller is not allowed to complete the operation because of entitlement required."},{"code":"entitlements_unavailable","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of entitlements unavailable; retain request_id for support correlation."},{"code":"eval_call_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested eval call does not exist in the current workspace or is not visible to the caller."},{"code":"eval_check_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of eval check archived."},{"code":"eval_check_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested eval check does not exist in the current workspace or is not visible to the caller."},{"code":"eval_check_slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of eval check slug taken."},{"code":"eval_generation_job_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested eval generation job does not exist in the current workspace or is not visible to the caller."},{"code":"eval_run_not_cancelable","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of eval run not cancelable."},{"code":"eval_run_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested eval run does not exist in the current workspace or is not visible to the caller."},{"code":"eval_scenario_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of eval scenario archived."},{"code":"eval_scenario_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested eval scenario does not exist in the current workspace or is not visible to the caller."},{"code":"eval_scenario_slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of eval scenario slug taken."},{"code":"eval_suite_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of eval suite archived."},{"code":"eval_suite_empty","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of eval suite empty."},{"code":"eval_suite_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested eval suite does not exist in the current workspace or is not visible to the caller."},{"code":"eval_suite_slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of eval suite slug taken."},{"code":"extraction_object_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of extraction object archived."},{"code":"extraction_object_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of extraction object in use."},{"code":"extraction_object_managed_by_group","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The extraction object is owned by a group and can only be changed through /v1/groups."},{"code":"extraction_object_name_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of extraction object name taken."},{"code":"extraction_object_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested extraction object does not exist in the current workspace or is not visible to the caller."},{"code":"flow_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of flow archived."},{"code":"flow_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The flow is still assigned to at least one live phone number and cannot be archived; details.phone_numbers lists the E.164 numbers to re-point first."},{"code":"flow_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested flow does not exist in the current workspace or is not visible to the caller."},{"code":"flow_slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of flow slug taken."},{"code":"forbidden","statuses":[403],"retry":"after_state_change","details":"optional_object","description":"The authenticated caller is not allowed to complete the operation because of forbidden."},{"code":"group_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of group archived."},{"code":"group_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The group is still used by at least one live phone number or campaign and cannot be archived; details.phone_numbers and details.campaigns list what to re-point first."},{"code":"group_name_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of group name taken."},{"code":"group_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested group does not exist in the current workspace or is not visible to the caller."},{"code":"guardrail_set_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of guardrail set archived."},{"code":"guardrail_set_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of guardrail set in use."},{"code":"guardrail_set_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested guardrail set does not exist in the current workspace or is not visible to the caller."},{"code":"idempotency_capacity_exceeded","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of idempotency capacity exceeded; follow the registry retry policy."},{"code":"idempotency_conflict","statuses":[409],"retry":"after_correction","details":"idempotency","description":"The idempotency key was already used for a request with a different canonical method, path, body, precondition, or security context."},{"code":"idempotency_identity_unavailable","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of idempotency identity unavailable; retain request_id for support correlation."},{"code":"idempotency_in_progress","statuses":[409],"retry":"after_retry_after","details":"idempotency","description":"An equivalent request with this idempotency key is still running; wait for Retry-After before replaying it."},{"code":"idempotency_key_required","statuses":[400],"retry":"after_correction","details":"idempotency","description":"The request was rejected because of idempotency key required; correct the request before retrying."},{"code":"idempotency_misconfigured","statuses":[500],"retry":"never","details":"none","description":"The server detected idempotency misconfigured; retrying the same request cannot correct the stored or deployment state."},{"code":"idempotency_persistence_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of idempotency persistence failed; retain request_id for support correlation."},{"code":"idempotency_result_lost","statuses":[409],"retry":"never","details":"idempotency","description":"The operation reached a terminal state but its replay payload is unavailable; inspect the target resource instead of repeating the mutation."},{"code":"idempotency_result_unavailable","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of idempotency result unavailable; follow the registry retry policy."},{"code":"idempotency_security_context_changed","statuses":[409],"retry":"after_correction","details":"idempotency","description":"The idempotency key belongs to a different actor, permission set, or tenant security context."},{"code":"idempotency_unavailable","statuses":[500,503],"retry":"safe","details":"none","description":"The server could not complete the operation because of idempotency unavailable; retain request_id for support correlation."},{"code":"inference_async_disabled","statuses":[503],"retry":"after_state_change","details":"none","description":"New asynchronous transcription work is temporarily disabled. Existing job status, retained results, cancellation and deletion remain available. Retry when admission is enabled."},{"code":"inference_capacity_unavailable","statuses":[503],"retry":"after_state_change","details":"none","description":"The model could not accept this request. Inspect request status and retry with a new request identity when capacity recovers."},{"code":"inference_concurrency_exhausted","statuses":[429],"retry":"after_retry_after","details":"none","description":"The workspace has reached its Inference concurrency limit. Retry after Retry-After."},{"code":"inference_content_expired","statuses":[410],"retry":"never","details":"none","description":"Transcription content expired or was deleted. Billing and job metadata remain, but the audio and transcript cannot be retrieved."},{"code":"inference_job_limit","statuses":[409],"retry":"after_state_change","details":"none","description":"The workspace reached its outstanding asynchronous job, upload, or byte budget. Complete or delete existing work before submitting more."},{"code":"inference_model_not_found","statuses":[404],"retry":"never","details":"none","description":"No model with this name and modality is published to the workspace. List names with GET /inference/models."},{"code":"inference_model_unavailable","statuses":[503],"retry":"after_state_change","details":"none","description":"The model is published but has no available capacity right now. Retry later or ask an administrator."},{"code":"inference_quota_exhausted","statuses":[402],"retry":"after_state_change","details":"none","description":"The workspace has insufficient credit for this modality: input characters for text to speech, audio minutes for speech to text. Add credit or wait for its next monthly grant."},{"code":"inference_request_exists","statuses":[409],"retry":"never","details":"none","description":"This Idempotency-Key already identifies a request. No new computation was started. Inspect request history; audio is never replayed."},{"code":"inference_result_not_ready","statuses":[409],"retry":"after_state_change","details":"none","description":"No committed transcription output is available yet. Poll job status with backoff before requesting its result."},{"code":"inference_storage_unavailable","statuses":[503],"retry":"after_state_change","details":"none","description":"Transcription storage is temporarily unavailable. Retry the same logical operation with its original idempotency key."},{"code":"inference_unsupported_timestamps","statuses":[422],"retry":"after_correction","details":"none","description":"This model does not support the requested timestamp granularity and language. Choose a combination advertised by GET /inference/models."},{"code":"inference_upload_expired","statuses":[410],"retry":"never","details":"none","description":"This upload expired. Start a new upload with a new idempotency key; expired source objects and multipart parts are cleaned up."},{"code":"inference_upstream_failed","statuses":[502],"retry":"after_state_change","details":"none","description":"The model did not complete a valid response. Inspect request status before deciding to start another request."},{"code":"inference_voice_not_found","statuses":[404],"retry":"never","details":"none","description":"The voice is not approved for this model. List approved voices with GET /inference/voices."},{"code":"internal","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of internal; retain request_id for support correlation."},{"code":"internal_context_missing","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of internal context missing; retain request_id for support correlation."},{"code":"internal_error","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation; retain the request_id and retry only with the same idempotency key when applicable."},{"code":"invalid_call_policy","statuses":[422],"retry":"after_correction","details":"none","description":"The request is syntactically valid but cannot be applied because of invalid call policy."},{"code":"invalid_header","statuses":[400],"retry":"after_correction","details":"header","description":"The request was rejected because of invalid header; correct the request before retrying."},{"code":"invalid_idempotency_key","statuses":[400],"retry":"after_correction","details":"none","description":"The request was rejected because of invalid idempotency key; correct the request before retrying."},{"code":"invalid_json","statuses":[400],"retry":"after_correction","details":"optional_object","description":"The request was rejected because of invalid json; correct the request before retrying."},{"code":"invalid_multipart","statuses":[400],"retry":"after_correction","details":"none","description":"The request was rejected because of invalid multipart; correct the request before retrying."},{"code":"invalid_outbound_policy","statuses":[422],"retry":"after_correction","details":"validation_fields","description":"The request is syntactically valid but cannot be applied because of invalid outbound policy."},{"code":"invalid_path_parameter","statuses":[400],"retry":"after_correction","details":"parameter","description":"The request was rejected because of invalid path parameter; correct the request before retrying."},{"code":"invalid_query_parameter","statuses":[400],"retry":"after_correction","details":"parameter","description":"The request was rejected because of invalid query parameter; correct the request before retrying."},{"code":"invalid_range","statuses":[416],"retry":"after_correction","details":"polymorphic_object","description":"The requested byte range is invalid for the selected artifact."},{"code":"invalid_recipient_file","statuses":[400],"retry":"after_correction","details":"none","description":"The uploaded recipient file could not be parsed (not UTF-8, not valid CSV, or missing a header/data rows); the message names the first problem found."},{"code":"invalid_request_id","statuses":[400],"retry":"after_correction","details":"header","description":"The request was rejected because of invalid request id; correct the request before retrying."},{"code":"invalid_uuid","statuses":[400],"retry":"after_correction","details":"none","description":"The request was rejected because of invalid uuid; correct the request before retrying."},{"code":"kms_error","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of kms error; retain request_id for support correlation."},{"code":"knowledge_base_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of knowledge base archived."},{"code":"knowledge_base_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of knowledge base in use."},{"code":"knowledge_base_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested knowledge base does not exist in the current workspace or is not visible to the caller."},{"code":"knowledge_base_slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of knowledge base slug taken."},{"code":"knowledge_document_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested knowledge document does not exist in the current workspace or is not visible to the caller."},{"code":"mcp_introspection_failed","statuses":[409,500,502,504],"retry":"from_details","details":"upstream_failure","description":"The operation conflicts with current resource state because of mcp introspection failed."},{"code":"mcp_server_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of mcp server archived."},{"code":"mcp_server_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of mcp server in use."},{"code":"mcp_server_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested MCP server does not exist in the current workspace or is not visible to the caller."},{"code":"mcp_server_slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of mcp server slug taken."},{"code":"member_already_exists","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of member already exists."},{"code":"member_invitation_accepted","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of member invitation accepted."},{"code":"member_invitation_conflict","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of member invitation conflict."},{"code":"member_invitation_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested member invitation does not exist in the current workspace or is not visible to the caller."},{"code":"member_invitation_revoked","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of member invitation revoked."},{"code":"member_last_owner","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of member last owner."},{"code":"member_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested member does not exist in the current workspace or is not visible to the caller."},{"code":"method_not_allowed","statuses":[405],"retry":"after_correction","details":"none","description":"The route exists, but it does not support the requested HTTP method."},{"code":"minutes_quota_exhausted","statuses":[429],"retry":"after_retry_after","details":"optional_object","description":"The tenant has used its included call minutes for the current billing cycle. Calls already in progress are unaffected; new calls resume when the cycle rolls over or an operator grants more minutes. details.cycle_end is when the allowance resets."},{"code":"model_release_changed","statuses":[409],"retry":"after_state_change","details":"none","description":"The transcription model release changed. Internal batch processing waits for the job's pinned release to become available."},{"code":"multiple_json_values","statuses":[400],"retry":"after_correction","details":"none","description":"The request was rejected because of multiple json values; correct the request before retrying."},{"code":"name_taken","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of name taken."},{"code":"no_agent_version","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of no agent version."},{"code":"no_draft","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of no draft."},{"code":"no_mutable_draft","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of no mutable draft."},{"code":"no_observed_tool_state","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of no observed tool state."},{"code":"no_org","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of no org; retain request_id for support correlation."},{"code":"no_production_version","statuses":[422],"retry":"after_state_change","details":"none","description":"The request is syntactically valid but cannot be applied because of no production version."},{"code":"no_staging_version","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of no staging version."},{"code":"no_tx","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of no tx; retain request_id for support correlation."},{"code":"not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested route or resource does not exist in the current workspace or is not visible to the caller."},{"code":"number_in_use","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of number in use."},{"code":"number_pool_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested outbound number pool does not exist in the current workspace or is not visible to the caller."},{"code":"number_pool_unavailable","statuses":[422],"retry":"after_state_change","details":"parameter","description":"The request is syntactically valid but cannot be applied because of number pool unavailable."},{"code":"number_taken","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of number taken."},{"code":"operation_not_available","statuses":[404],"retry":"never","details":"optional_object","description":"The route exists for an internal or browser workflow but is not part of the reviewed public API."},{"code":"organization_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested organization does not exist in the current workspace or is not visible to the caller."},{"code":"outbound_capacity_profile_conflict","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of outbound capacity profile conflict."},{"code":"outbound_capacity_profile_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of outbound capacity profile in use."},{"code":"outbound_capacity_profile_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested outbound capacity profile does not exist in the current workspace or is not visible to the caller."},{"code":"outbound_destination_denied","statuses":[403],"retry":"after_correction","details":"none","description":"The SIP trunk's outbound allowlist does not permit this destination; add its prefix or SIP host to the trunk's allowed destinations."},{"code":"outbound_job_already_started","statuses":[409],"retry":"after_state_change","details":"async_state","description":"The operation conflicts with current resource state because of outbound job already started."},{"code":"outbound_job_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested outbound job does not exist in the current workspace or is not visible to the caller."},{"code":"outbound_job_terminal","statuses":[409],"retry":"never","details":"async_state","description":"The operation conflicts with current resource state because of outbound job terminal."},{"code":"outbound_number_pool_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of outbound number pool in use."},{"code":"outbound_number_pool_name_conflict","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of outbound number pool name conflict."},{"code":"outbound_number_pool_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested outbound number pool does not exist in the current workspace or is not visible to the caller."},{"code":"payload_encoding_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of payload encoding failed; retain request_id for support correlation."},{"code":"pcap_not_configured","statuses":[503],"retry":"after_state_change","details":"none","description":"A required service is unavailable because of pcap not configured; follow the registry retry policy."},{"code":"pcap_unavailable","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of pcap unavailable; follow the registry retry policy."},{"code":"permission_escalation","statuses":[403],"retry":"never","details":"polymorphic_object","description":"The authenticated caller is not allowed to complete the operation because of permission escalation."},{"code":"phone_number_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of phone number archived."},{"code":"phone_number_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested phone number does not exist in the current workspace or is not visible to the caller."},{"code":"phone_number_operation_in_progress","statuses":[409],"retry":"after_retry_after","details":"async_state","description":"The operation conflicts with current resource state because of phone number operation in progress."},{"code":"phone_number_provisioning","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of phone number provisioning."},{"code":"phone_number_unavailable","statuses":[422],"retry":"after_state_change","details":"parameter","description":"The request is syntactically valid but cannot be applied because of phone number unavailable."},{"code":"pii_access_already_granted","statuses":[409],"retry":"never","details":"optional_object","description":"You already hold approved access to this call, so there is nothing to request. details carries the granting request_id."},{"code":"pii_access_approval_required","statuses":[403],"retry":"after_state_change","details":"optional_object","description":"This workspace requires an approved break-glass request before sensitive call or transcription data can be read. Raise one in the dashboard (Settings → Access requests) and retry once it is approved."},{"code":"pii_access_mode_unavailable","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of pii access mode unavailable; retain request_id for support correlation."},{"code":"pii_access_request_exists","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"A request for this call from this user is already awaiting a decision. details carries its request_id."},{"code":"pii_access_request_not_actionable","statuses":[409],"retry":"never","details":"optional_object","description":"The request is no longer in a state this decision applies to — only a pending request can be approved or rejected, and only a live approval can be revoked. details carries the current and required status."},{"code":"pii_access_request_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested break-glass access request does not exist in the current workspace or is not visible to the caller."},{"code":"pii_access_request_requires_user","statuses":[403],"retry":"never","details":"none","description":"Break-glass requests must be raised by a signed-in user. An API key cannot be notified or approved, so keys holding pii-access:unmask supply a reason instead."},{"code":"pii_access_self_decision_forbidden","statuses":[403],"retry":"never","details":"optional_object","description":"Approving your own request for sensitive data is not review. Another holder of pii-access:approve must decide it. Permitted only when the requester is the workspace's sole approver, where the request would otherwise be undecidable."},{"code":"precondition_failed","statuses":[412],"retry":"after_state_change","details":"resource_conflict","description":"The supplied conditional request no longer matches current resource state; fetch the latest ETag before retrying."},{"code":"preview_failed","statuses":[502],"retry":"safe","details":"none","description":"The TTS provider could not synthesize the preview clip. The table itself is unaffected and can still be saved; retry the preview or pick another voice."},{"code":"preview_unsupported","statuses":[501],"retry":"never","details":"optional_object","description":"The selected voice does not support pronunciation preview audio yet. Pick another voice to hear the table; the table can still be saved."},{"code":"pronunciation_table_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of pronunciation table archived."},{"code":"pronunciation_table_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of pronunciation table in use."},{"code":"pronunciation_table_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested pronunciation table does not exist in the current workspace or is not visible to the caller."},{"code":"protected_member","statuses":[409],"retry":"never","details":"optional_object","description":"The membership belongs to the platform's protected owner account, which can never be removed or moved off the owner role through the API."},{"code":"provider_request_failed","statuses":[502],"retry":"from_details","details":"upstream_failure","description":"An upstream provider request failed; use details.retryable to decide whether to retry."},{"code":"rate_limit_exceeded","statuses":[429],"retry":"after_retry_after","details":"rate_limit","description":"The caller exceeded an enforced limit; wait for Retry-After before retrying."},{"code":"rate_limited","statuses":[429],"retry":"after_retry_after","details":"rate_limit","description":"The caller exceeded an enforced limit; wait for Retry-After before retrying."},{"code":"reconciliation_service_unavailable","statuses":[503],"retry":"safe","details":"none","description":"A required service is unavailable because of reconciliation service unavailable; follow the registry retry policy."},{"code":"recording_blob_missing","statuses":[410],"retry":"never","details":"none","description":"The requested artifact is no longer retained because of recording blob missing."},{"code":"recording_decryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of recording decryption failed; retain request_id for support correlation."},{"code":"recording_failed","statuses":[409],"retry":"never","details":"async_state","description":"The operation conflicts with current resource state because of recording failed."},{"code":"recording_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested recording does not exist in the current workspace or is not visible to the caller."},{"code":"recording_not_ready","statuses":[409],"retry":"after_retry_after","details":"async_state","description":"The operation conflicts with current resource state because of recording not ready."},{"code":"recording_storage_unavailable","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of recording storage unavailable; follow the registry retry policy."},{"code":"recording_unavailable","statuses":[503],"retry":"safe","details":"none","description":"A required service is unavailable because of recording unavailable; follow the registry retry policy."},{"code":"referenced_resource_missing","statuses":[422],"retry":"after_correction","details":"none","description":"The request is syntactically valid but cannot be applied because of referenced resource missing."},{"code":"request_body_read_failed","statuses":[400],"retry":"safe","details":"none","description":"The request was rejected because of request body read failed; correct the request before retrying."},{"code":"request_timeout","statuses":[408],"retry":"safe","details":"none","description":"The request body did not arrive before the server deadline; send a complete bounded body and retry."},{"code":"request_too_large","statuses":[413],"retry":"after_correction","details":"polymorphic_object","description":"The encoded request exceeds the endpoint limit; reduce it before retrying."},{"code":"resource_changed","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of resource changed."},{"code":"response_buffer_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of response buffer failed; retain request_id for support correlation."},{"code":"role_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of role in use."},{"code":"role_name_conflict","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of role name conflict."},{"code":"role_name_reserved","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of role name reserved."},{"code":"role_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested role does not exist in the current workspace or is not visible to the caller."},{"code":"route_mismatch","statuses":[422],"retry":"after_correction","details":"parameter","description":"The request is syntactically valid but cannot be applied because of route mismatch."},{"code":"scheduling_unconfigured","statuses":[503],"retry":"after_state_change","details":"none","description":"A required service is unavailable because of scheduling unconfigured; follow the registry retry policy."},{"code":"secret_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of secret archived."},{"code":"secret_encryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of secret encryption failed; retain request_id for support correlation."},{"code":"secret_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of secret in use."},{"code":"secret_name_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of secret name taken."},{"code":"secret_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested secret does not exist in the current workspace or is not visible to the caller."},{"code":"secret_resolution_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of secret resolution failed; retain request_id for support correlation."},{"code":"sip_pcap_blob_missing","statuses":[410],"retry":"never","details":"none","description":"The requested artifact is no longer retained because of sip pcap blob missing."},{"code":"sip_pcap_decryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of sip pcap decryption failed; retain request_id for support correlation."},{"code":"sip_pcap_failed","statuses":[409],"retry":"never","details":"async_state","description":"The operation conflicts with current resource state because of sip pcap failed."},{"code":"sip_pcap_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested SIP PCAP does not exist in the current workspace or is not visible to the caller."},{"code":"sip_pcap_not_ready","statuses":[409],"retry":"after_retry_after","details":"async_state","description":"The operation conflicts with current resource state because of sip pcap not ready."},{"code":"sip_pcap_storage_unavailable","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of sip pcap storage unavailable; follow the registry retry policy."},{"code":"sip_trunk_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of sip trunk archived."},{"code":"sip_trunk_credentials_unavailable","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of sip trunk credentials unavailable."},{"code":"sip_trunk_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of sip trunk in use."},{"code":"sip_trunk_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested SIP trunk does not exist in the current workspace or is not visible to the caller."},{"code":"sip_trunk_operation_in_progress","statuses":[409],"retry":"after_retry_after","details":"async_state","description":"The operation conflicts with current resource state because of sip trunk operation in progress."},{"code":"sip_trunk_provisioning","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of sip trunk provisioning."},{"code":"slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of slug taken."},{"code":"stored_data_invalid","statuses":[500],"retry":"never","details":"optional_object","description":"The server detected stored data invalid; retrying the same request cannot correct the stored or deployment state."},{"code":"stored_policy_invalid","statuses":[500],"retry":"never","details":"none","description":"The server detected stored policy invalid; retrying the same request cannot correct the stored or deployment state."},{"code":"system_role_immutable","statuses":[403],"retry":"never","details":"none","description":"The authenticated caller is not allowed to complete the operation because of system role immutable."},{"code":"team_not_connected","statuses":[403],"retry":"after_correction","details":"optional_object","description":"The connected app's grant does not include the team named by the Kejue-Org-Id header (or the user is no longer a member). List the teams the token reaches with GET /v1/auth/me, or reconnect and approve the team."},{"code":"tool_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of tool archived."},{"code":"tool_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of tool in use."},{"code":"tool_invocation_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested tool invocation does not exist in the current workspace or is not visible to the caller."},{"code":"tool_io_decryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of tool io decryption failed; retain request_id for support correlation."},{"code":"tool_io_decryption_unavailable","statuses":[503],"retry":"after_state_change","details":"none","description":"A required service is unavailable because of tool io decryption unavailable; follow the registry retry policy."},{"code":"tool_io_raw_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested raw tool I/O does not exist in the current workspace or is not visible to the caller."},{"code":"tool_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested tool does not exist in the current workspace or is not visible to the caller."},{"code":"tool_slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of tool slug taken."},{"code":"transcript_decryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of transcript decryption failed; retain request_id for support correlation."},{"code":"transcript_decryption_unavailable","statuses":[503],"retry":"after_state_change","details":"none","description":"A required service is unavailable because of transcript decryption unavailable; follow the registry retry policy."},{"code":"transcript_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested transcript does not exist in the current workspace or is not visible to the caller."},{"code":"transcript_raw_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested raw transcript does not exist in the current workspace or is not visible to the caller."},{"code":"transcription_output_invalid","statuses":[502],"retry":"after_state_change","details":"none","description":"The transcription model returned an invalid result. Internal batch processing retries without committing or charging this output."},{"code":"transfer_already_terminal","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of transfer already terminal."},{"code":"transfer_cancel_outcome_unknown","statuses":[504],"retry":"from_details","details":"upstream_failure","description":"An upstream operation timed out; use details.retryable to decide whether to retry."},{"code":"transfer_cancel_provider_failed","statuses":[502],"retry":"from_details","details":"upstream_failure","description":"An upstream provider request failed; use details.retryable to decide whether to retry."},{"code":"transfer_cancel_unavailable","statuses":[503],"retry":"from_details","details":"upstream_failure","description":"A required service is unavailable because of transfer cancel unavailable; follow the registry retry policy."},{"code":"transfer_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested transfer does not exist in the current workspace or is not visible to the caller."},{"code":"transport_mismatch","statuses":[422],"retry":"after_correction","details":"parameter","description":"The request is syntactically valid but cannot be applied because of transport mismatch."},{"code":"trunk_busy","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of trunk busy."},{"code":"trunk_not_active","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of trunk not active."},{"code":"trunk_provider_not_ready","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of trunk provider not ready."},{"code":"turn_audio_expired","statuses":[410],"retry":"never","details":"none","description":"The requested artifact is no longer retained because of turn audio expired."},{"code":"turn_audio_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested turn audio does not exist in the current workspace or is not visible to the caller."},{"code":"turn_audio_storage_unavailable","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of turn audio storage unavailable; follow the registry retry policy."},{"code":"turn_audio_unavailable","statuses":[503],"retry":"safe","details":"none","description":"A required service is unavailable because of turn audio unavailable; follow the registry retry policy."},{"code":"twilio_inventory_unavailable","statuses":[409],"retry":"after_state_change","details":"upstream_failure","description":"The operation conflicts with current resource state because of twilio inventory unavailable."},{"code":"twilio_native_unconfigured","statuses":[503],"retry":"after_state_change","details":"none","description":"A required service is unavailable because of twilio native unconfigured; follow the registry retry policy."},{"code":"unauthorized","statuses":[401],"retry":"after_correction","details":"none","description":"Authentication failed; provide exactly one valid, active credential before retrying."},{"code":"unexpected_body","statuses":[400],"retry":"after_correction","details":"request_body","description":"The request was rejected because of unexpected body; correct the request before retrying."},{"code":"unknown_query_parameter","statuses":[400],"retry":"after_correction","details":"parameter","description":"The request was rejected because of unknown query parameter; correct the request before retrying."},{"code":"unsupported_media_type","statuses":[415],"retry":"after_correction","details":"media_type","description":"The request Content-Type is unsupported; use the media type declared by the operation."},{"code":"unsupported_transport","statuses":[422],"retry":"after_correction","details":"none","description":"The request is syntactically valid but cannot be applied because of unsupported transport."},{"code":"validation_failed","statuses":[422],"retry":"after_correction","details":"validation_fields","description":"One or more request fields failed validation; correct every entry in details.fields before retrying."},{"code":"value_too_long","statuses":[400],"retry":"after_correction","details":"none","description":"The request was rejected because of value too long; correct the request before retrying."},{"code":"version_locked","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of version locked."},{"code":"webhook_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of webhook archived."},{"code":"webhook_delivery_in_progress","statuses":[409],"retry":"after_state_change","details":"async_state","description":"The operation conflicts with current resource state because of webhook delivery in progress."},{"code":"webhook_delivery_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested webhook delivery does not exist in the current workspace or is not visible to the caller."},{"code":"webhook_delivery_payload_invalid","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of webhook delivery payload invalid."},{"code":"webhook_delivery_payload_missing","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of webhook delivery payload missing."},{"code":"webhook_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of webhook in use."},{"code":"webhook_inactive","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of webhook inactive."},{"code":"webhook_missing","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of webhook missing."},{"code":"webhook_name_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of webhook name taken."},{"code":"webhook_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested webhook does not exist in the current workspace or is not visible to the caller."},{"code":"webhook_secret_encryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of webhook secret encryption failed; retain request_id for support correlation."},{"code":"webhook_secret_missing","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of webhook secret missing."},{"code":"workspace_contract_unavailable","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of workspace contract unavailable; retain request_id for support correlation."},{"code":"workspace_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested workspace does not exist in the current workspace or is not visible to the caller."}],"x-kejue-error-catalog":[{"code":"agent_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of agent archived."},{"code":"agent_baseline_too_large","statuses":[422],"retry":"after_correction","details":"polymorphic_object","description":"The request is syntactically valid but cannot be applied because of agent baseline too large."},{"code":"agent_capacity_exhausted","statuses":[503],"retry":"after_retry_after","details":"none","description":"No agent worker has a free dispatch slot for a new call right now; retry after the Retry-After interval while autoscaling adds capacity."},{"code":"agent_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested agent does not exist in the current workspace or is not visible to the caller."},{"code":"agent_state_changed","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of agent state changed."},{"code":"agent_version_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested agent version does not exist in the current workspace or is not visible to the caller."},{"code":"ai_connectors_disabled","statuses":[403],"retry":"after_state_change","details":"none","description":"AI assistant access (connected apps) is turned off for this team. A team admin can enable it with PATCH /v1/orgs/current {\"ai_connectors\": \"enabled\"}."},{"code":"alert_limit_reached","statuses":[409],"retry":"after_state_change","details":"none","description":"The operation conflicts with current resource state because of alert limit reached."},{"code":"alert_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested alert does not exist in the current workspace or is not visible to the caller."},{"code":"analysis_board_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of analysis board archived."},{"code":"analysis_board_capacity_reached","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of analysis board capacity reached."},{"code":"analysis_board_name_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of analysis board name taken."},{"code":"analysis_board_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested analysis board does not exist in the current workspace or is not visible to the caller."},{"code":"analysis_export_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of analysis export failed; retain request_id for support correlation."},{"code":"analysis_insight_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested analysis insight does not exist in the current workspace or is not visible to the caller."},{"code":"analysis_result_too_large","statuses":[422],"retry":"after_correction","details":"polymorphic_object","description":"The request is syntactically valid but cannot be applied because of analysis result too large."},{"code":"api_key_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested API key does not exist in the current workspace or is not visible to the caller."},{"code":"api_key_product_mismatch","statuses":[403],"retry":"never","details":"none","description":"This key belongs to a different product. Use an Inference key for Inference endpoints and a Voice key for Voice endpoints."},{"code":"audit_required","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of audit required; retain request_id for support correlation."},{"code":"authentication_rate_limited","statuses":[429],"retry":"after_retry_after","details":"none","description":"The caller exceeded an enforced limit; wait for Retry-After before retrying."},{"code":"authentication_unavailable","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of authentication unavailable; follow the registry retry policy."},{"code":"bad_request","statuses":[400],"retry":"after_correction","details":"none","description":"The request was rejected because of bad request; correct the request before retrying."},{"code":"body_read_failed","statuses":[400],"retry":"safe","details":"none","description":"The request was rejected because of body read failed; correct the request before retrying."},{"code":"call_already_purged","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of call already purged."},{"code":"call_hangup_in_progress","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of call hangup in progress."},{"code":"call_hangup_outcome_unknown","statuses":[504],"retry":"from_details","details":"upstream_failure","description":"An upstream operation timed out; use details.retryable to decide whether to retry."},{"code":"call_hangup_provider_failed","statuses":[502],"retry":"from_details","details":"upstream_failure","description":"An upstream provider request failed; use details.retryable to decide whether to retry."},{"code":"call_hangup_unavailable","statuses":[503],"retry":"from_details","details":"upstream_failure","description":"A required service is unavailable because of call hangup unavailable; follow the registry retry policy."},{"code":"call_not_ended","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of call not ended."},{"code":"call_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested call does not exist in the current workspace or is not visible to the caller."},{"code":"call_not_live","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of call not live."},{"code":"call_on_legal_hold","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of call on legal hold."},{"code":"call_processing_in_progress","statuses":[409],"retry":"after_state_change","details":"async_state","description":"The operation conflicts with current resource state because of call processing in progress."},{"code":"call_summary_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested call summary does not exist in the current workspace or is not visible to the caller."},{"code":"calls_disabled","statuses":[403,503],"retry":"after_state_change","details":"optional_object","description":"Call activity is switched off for this tenant by a Kejue Voice operator; details.scope names the tier (platform, account or org) and details.reason carries the operator's note. Calls already in progress are unaffected. Retrying will not succeed until the switch is lifted."},{"code":"campaign_no_recipients","statuses":[422],"retry":"after_state_change","details":"none","description":"The campaign has no pending recipients to dial; import a recipient list before launching."},{"code":"campaign_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested campaign does not exist in the current workspace or is not visible to the caller."},{"code":"campaign_recipient_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested campaign recipient does not exist in the current workspace or is not visible to the caller."},{"code":"campaign_recipients_invalid","statuses":[422],"retry":"after_correction","details":"optional_object","description":"The uploaded recipient file contains rows that cannot be imported (invalid numbers, duplicates, or bad variables). Fix the listed rows, or set mapping.skip_invalid to import past them as excluded rows. details carries the per-row report."},{"code":"campaign_state_invalid","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The campaign is not in a lifecycle state this operation applies to; details carries the current and required status."},{"code":"capacity_unavailable","statuses":[503],"retry":"safe","details":"none","description":"A required service is unavailable because of capacity unavailable; follow the registry retry policy."},{"code":"conflict","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of conflict."},{"code":"connected_app_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested connected app does not exist in the current workspace or is not visible to the caller."},{"code":"contact_e164_conflict","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of contact e164 conflict."},{"code":"contact_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested contact does not exist in the current workspace or is not visible to the caller."},{"code":"contact_number_mismatch","statuses":[422],"retry":"after_correction","details":"resource_conflict","description":"The request is syntactically valid but cannot be applied because of contact number mismatch."},{"code":"contact_tag_name_conflict","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of contact tag name conflict."},{"code":"contact_tag_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested contact tag does not exist in the current workspace or is not visible to the caller."},{"code":"context_delivery_unconfigured","statuses":[503],"retry":"after_state_change","details":"none","description":"A required service is unavailable because of context delivery unconfigured; follow the registry retry policy."},{"code":"context_encryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of context encryption failed; retain request_id for support correlation."},{"code":"credential_decryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of credential decryption failed; retain request_id for support correlation."},{"code":"credential_encryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of credential encryption failed; retain request_id for support correlation."},{"code":"credential_service_unavailable","statuses":[503],"retry":"safe","details":"none","description":"A required service is unavailable because of credential service unavailable; follow the registry retry policy."},{"code":"db_error","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of db error; retain request_id for support correlation."},{"code":"delegation_not_allowed","statuses":[403],"retry":"never","details":"none","description":"The authenticated caller is not allowed to complete the operation because of delegation not allowed."},{"code":"dncr_blocked","statuses":[403],"retry":"never","details":"none","description":"The authenticated caller is not allowed to complete the operation because of dncr blocked."},{"code":"dncr_configuration_invalid","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of dncr configuration invalid; follow the registry retry policy."},{"code":"dncr_enforced","statuses":[403],"retry":"after_state_change","details":"none","description":"The authenticated caller is not allowed to complete the operation because of dncr enforced."},{"code":"dncr_unavailable","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of dncr unavailable; follow the registry retry policy."},{"code":"draft_not_promotable","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of draft not promotable."},{"code":"draft_state_changed","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of draft state changed."},{"code":"duplicate_field","statuses":[400],"retry":"after_correction","details":"optional_object","description":"The request was rejected because of duplicate field; correct the request before retrying."},{"code":"duplicate_query_parameter","statuses":[400],"retry":"after_correction","details":"parameter","description":"The request was rejected because of duplicate query parameter; correct the request before retrying."},{"code":"empty_body","statuses":[400],"retry":"after_correction","details":"none","description":"The request was rejected because of empty body; correct the request before retrying."},{"code":"encode_error","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of encode error; retain request_id for support correlation."},{"code":"encoding_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of encoding failed; retain request_id for support correlation."},{"code":"entitlement_required","statuses":[403],"retry":"after_state_change","details":"entitlement_feature","description":"The authenticated caller is not allowed to complete the operation because of entitlement required."},{"code":"entitlements_unavailable","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of entitlements unavailable; retain request_id for support correlation."},{"code":"eval_call_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested eval call does not exist in the current workspace or is not visible to the caller."},{"code":"eval_check_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of eval check archived."},{"code":"eval_check_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested eval check does not exist in the current workspace or is not visible to the caller."},{"code":"eval_check_slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of eval check slug taken."},{"code":"eval_generation_job_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested eval generation job does not exist in the current workspace or is not visible to the caller."},{"code":"eval_run_not_cancelable","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of eval run not cancelable."},{"code":"eval_run_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested eval run does not exist in the current workspace or is not visible to the caller."},{"code":"eval_scenario_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of eval scenario archived."},{"code":"eval_scenario_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested eval scenario does not exist in the current workspace or is not visible to the caller."},{"code":"eval_scenario_slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of eval scenario slug taken."},{"code":"eval_suite_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of eval suite archived."},{"code":"eval_suite_empty","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of eval suite empty."},{"code":"eval_suite_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested eval suite does not exist in the current workspace or is not visible to the caller."},{"code":"eval_suite_slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of eval suite slug taken."},{"code":"extraction_object_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of extraction object archived."},{"code":"extraction_object_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of extraction object in use."},{"code":"extraction_object_managed_by_group","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The extraction object is owned by a group and can only be changed through /v1/groups."},{"code":"extraction_object_name_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of extraction object name taken."},{"code":"extraction_object_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested extraction object does not exist in the current workspace or is not visible to the caller."},{"code":"flow_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of flow archived."},{"code":"flow_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The flow is still assigned to at least one live phone number and cannot be archived; details.phone_numbers lists the E.164 numbers to re-point first."},{"code":"flow_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested flow does not exist in the current workspace or is not visible to the caller."},{"code":"flow_slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of flow slug taken."},{"code":"forbidden","statuses":[403],"retry":"after_state_change","details":"optional_object","description":"The authenticated caller is not allowed to complete the operation because of forbidden."},{"code":"group_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of group archived."},{"code":"group_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The group is still used by at least one live phone number or campaign and cannot be archived; details.phone_numbers and details.campaigns list what to re-point first."},{"code":"group_name_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of group name taken."},{"code":"group_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested group does not exist in the current workspace or is not visible to the caller."},{"code":"guardrail_set_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of guardrail set archived."},{"code":"guardrail_set_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of guardrail set in use."},{"code":"guardrail_set_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested guardrail set does not exist in the current workspace or is not visible to the caller."},{"code":"idempotency_capacity_exceeded","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of idempotency capacity exceeded; follow the registry retry policy."},{"code":"idempotency_conflict","statuses":[409],"retry":"after_correction","details":"idempotency","description":"The idempotency key was already used for a request with a different canonical method, path, body, precondition, or security context."},{"code":"idempotency_identity_unavailable","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of idempotency identity unavailable; retain request_id for support correlation."},{"code":"idempotency_in_progress","statuses":[409],"retry":"after_retry_after","details":"idempotency","description":"An equivalent request with this idempotency key is still running; wait for Retry-After before replaying it."},{"code":"idempotency_key_required","statuses":[400],"retry":"after_correction","details":"idempotency","description":"The request was rejected because of idempotency key required; correct the request before retrying."},{"code":"idempotency_misconfigured","statuses":[500],"retry":"never","details":"none","description":"The server detected idempotency misconfigured; retrying the same request cannot correct the stored or deployment state."},{"code":"idempotency_persistence_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of idempotency persistence failed; retain request_id for support correlation."},{"code":"idempotency_result_lost","statuses":[409],"retry":"never","details":"idempotency","description":"The operation reached a terminal state but its replay payload is unavailable; inspect the target resource instead of repeating the mutation."},{"code":"idempotency_result_unavailable","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of idempotency result unavailable; follow the registry retry policy."},{"code":"idempotency_security_context_changed","statuses":[409],"retry":"after_correction","details":"idempotency","description":"The idempotency key belongs to a different actor, permission set, or tenant security context."},{"code":"idempotency_unavailable","statuses":[500,503],"retry":"safe","details":"none","description":"The server could not complete the operation because of idempotency unavailable; retain request_id for support correlation."},{"code":"inference_async_disabled","statuses":[503],"retry":"after_state_change","details":"none","description":"New asynchronous transcription work is temporarily disabled. Existing job status, retained results, cancellation and deletion remain available. Retry when admission is enabled."},{"code":"inference_capacity_unavailable","statuses":[503],"retry":"after_state_change","details":"none","description":"The model could not accept this request. Inspect request status and retry with a new request identity when capacity recovers."},{"code":"inference_concurrency_exhausted","statuses":[429],"retry":"after_retry_after","details":"none","description":"The workspace has reached its Inference concurrency limit. Retry after Retry-After."},{"code":"inference_content_expired","statuses":[410],"retry":"never","details":"none","description":"Transcription content expired or was deleted. Billing and job metadata remain, but the audio and transcript cannot be retrieved."},{"code":"inference_job_limit","statuses":[409],"retry":"after_state_change","details":"none","description":"The workspace reached its outstanding asynchronous job, upload, or byte budget. Complete or delete existing work before submitting more."},{"code":"inference_model_not_found","statuses":[404],"retry":"never","details":"none","description":"No model with this name and modality is published to the workspace. List names with GET /inference/models."},{"code":"inference_model_unavailable","statuses":[503],"retry":"after_state_change","details":"none","description":"The model is published but has no available capacity right now. Retry later or ask an administrator."},{"code":"inference_quota_exhausted","statuses":[402],"retry":"after_state_change","details":"none","description":"The workspace has insufficient credit for this modality: input characters for text to speech, audio minutes for speech to text. Add credit or wait for its next monthly grant."},{"code":"inference_request_exists","statuses":[409],"retry":"never","details":"none","description":"This Idempotency-Key already identifies a request. No new computation was started. Inspect request history; audio is never replayed."},{"code":"inference_result_not_ready","statuses":[409],"retry":"after_state_change","details":"none","description":"No committed transcription output is available yet. Poll job status with backoff before requesting its result."},{"code":"inference_storage_unavailable","statuses":[503],"retry":"after_state_change","details":"none","description":"Transcription storage is temporarily unavailable. Retry the same logical operation with its original idempotency key."},{"code":"inference_unsupported_timestamps","statuses":[422],"retry":"after_correction","details":"none","description":"This model does not support the requested timestamp granularity and language. Choose a combination advertised by GET /inference/models."},{"code":"inference_upload_expired","statuses":[410],"retry":"never","details":"none","description":"This upload expired. Start a new upload with a new idempotency key; expired source objects and multipart parts are cleaned up."},{"code":"inference_upstream_failed","statuses":[502],"retry":"after_state_change","details":"none","description":"The model did not complete a valid response. Inspect request status before deciding to start another request."},{"code":"inference_voice_not_found","statuses":[404],"retry":"never","details":"none","description":"The voice is not approved for this model. List approved voices with GET /inference/voices."},{"code":"internal","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of internal; retain request_id for support correlation."},{"code":"internal_context_missing","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of internal context missing; retain request_id for support correlation."},{"code":"internal_error","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation; retain the request_id and retry only with the same idempotency key when applicable."},{"code":"invalid_call_policy","statuses":[422],"retry":"after_correction","details":"none","description":"The request is syntactically valid but cannot be applied because of invalid call policy."},{"code":"invalid_header","statuses":[400],"retry":"after_correction","details":"header","description":"The request was rejected because of invalid header; correct the request before retrying."},{"code":"invalid_idempotency_key","statuses":[400],"retry":"after_correction","details":"none","description":"The request was rejected because of invalid idempotency key; correct the request before retrying."},{"code":"invalid_json","statuses":[400],"retry":"after_correction","details":"optional_object","description":"The request was rejected because of invalid json; correct the request before retrying."},{"code":"invalid_multipart","statuses":[400],"retry":"after_correction","details":"none","description":"The request was rejected because of invalid multipart; correct the request before retrying."},{"code":"invalid_outbound_policy","statuses":[422],"retry":"after_correction","details":"validation_fields","description":"The request is syntactically valid but cannot be applied because of invalid outbound policy."},{"code":"invalid_path_parameter","statuses":[400],"retry":"after_correction","details":"parameter","description":"The request was rejected because of invalid path parameter; correct the request before retrying."},{"code":"invalid_query_parameter","statuses":[400],"retry":"after_correction","details":"parameter","description":"The request was rejected because of invalid query parameter; correct the request before retrying."},{"code":"invalid_range","statuses":[416],"retry":"after_correction","details":"polymorphic_object","description":"The requested byte range is invalid for the selected artifact."},{"code":"invalid_recipient_file","statuses":[400],"retry":"after_correction","details":"none","description":"The uploaded recipient file could not be parsed (not UTF-8, not valid CSV, or missing a header/data rows); the message names the first problem found."},{"code":"invalid_request_id","statuses":[400],"retry":"after_correction","details":"header","description":"The request was rejected because of invalid request id; correct the request before retrying."},{"code":"invalid_uuid","statuses":[400],"retry":"after_correction","details":"none","description":"The request was rejected because of invalid uuid; correct the request before retrying."},{"code":"kms_error","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of kms error; retain request_id for support correlation."},{"code":"knowledge_base_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of knowledge base archived."},{"code":"knowledge_base_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of knowledge base in use."},{"code":"knowledge_base_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested knowledge base does not exist in the current workspace or is not visible to the caller."},{"code":"knowledge_base_slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of knowledge base slug taken."},{"code":"knowledge_document_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested knowledge document does not exist in the current workspace or is not visible to the caller."},{"code":"mcp_introspection_failed","statuses":[409,500,502,504],"retry":"from_details","details":"upstream_failure","description":"The operation conflicts with current resource state because of mcp introspection failed."},{"code":"mcp_server_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of mcp server archived."},{"code":"mcp_server_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of mcp server in use."},{"code":"mcp_server_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested MCP server does not exist in the current workspace or is not visible to the caller."},{"code":"mcp_server_slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of mcp server slug taken."},{"code":"member_already_exists","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of member already exists."},{"code":"member_invitation_accepted","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of member invitation accepted."},{"code":"member_invitation_conflict","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of member invitation conflict."},{"code":"member_invitation_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested member invitation does not exist in the current workspace or is not visible to the caller."},{"code":"member_invitation_revoked","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of member invitation revoked."},{"code":"member_last_owner","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of member last owner."},{"code":"member_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested member does not exist in the current workspace or is not visible to the caller."},{"code":"method_not_allowed","statuses":[405],"retry":"after_correction","details":"none","description":"The route exists, but it does not support the requested HTTP method."},{"code":"minutes_quota_exhausted","statuses":[429],"retry":"after_retry_after","details":"optional_object","description":"The tenant has used its included call minutes for the current billing cycle. Calls already in progress are unaffected; new calls resume when the cycle rolls over or an operator grants more minutes. details.cycle_end is when the allowance resets."},{"code":"model_release_changed","statuses":[409],"retry":"after_state_change","details":"none","description":"The transcription model release changed. Internal batch processing waits for the job's pinned release to become available."},{"code":"multiple_json_values","statuses":[400],"retry":"after_correction","details":"none","description":"The request was rejected because of multiple json values; correct the request before retrying."},{"code":"name_taken","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of name taken."},{"code":"no_agent_version","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of no agent version."},{"code":"no_draft","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of no draft."},{"code":"no_mutable_draft","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of no mutable draft."},{"code":"no_observed_tool_state","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of no observed tool state."},{"code":"no_org","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of no org; retain request_id for support correlation."},{"code":"no_production_version","statuses":[422],"retry":"after_state_change","details":"none","description":"The request is syntactically valid but cannot be applied because of no production version."},{"code":"no_staging_version","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of no staging version."},{"code":"no_tx","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of no tx; retain request_id for support correlation."},{"code":"not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested route or resource does not exist in the current workspace or is not visible to the caller."},{"code":"number_in_use","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of number in use."},{"code":"number_pool_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested outbound number pool does not exist in the current workspace or is not visible to the caller."},{"code":"number_pool_unavailable","statuses":[422],"retry":"after_state_change","details":"parameter","description":"The request is syntactically valid but cannot be applied because of number pool unavailable."},{"code":"number_taken","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of number taken."},{"code":"operation_not_available","statuses":[404],"retry":"never","details":"optional_object","description":"The route exists for an internal or browser workflow but is not part of the reviewed public API."},{"code":"organization_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested organization does not exist in the current workspace or is not visible to the caller."},{"code":"outbound_capacity_profile_conflict","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of outbound capacity profile conflict."},{"code":"outbound_capacity_profile_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of outbound capacity profile in use."},{"code":"outbound_capacity_profile_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested outbound capacity profile does not exist in the current workspace or is not visible to the caller."},{"code":"outbound_destination_denied","statuses":[403],"retry":"after_correction","details":"none","description":"The SIP trunk's outbound allowlist does not permit this destination; add its prefix or SIP host to the trunk's allowed destinations."},{"code":"outbound_job_already_started","statuses":[409],"retry":"after_state_change","details":"async_state","description":"The operation conflicts with current resource state because of outbound job already started."},{"code":"outbound_job_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested outbound job does not exist in the current workspace or is not visible to the caller."},{"code":"outbound_job_terminal","statuses":[409],"retry":"never","details":"async_state","description":"The operation conflicts with current resource state because of outbound job terminal."},{"code":"outbound_number_pool_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of outbound number pool in use."},{"code":"outbound_number_pool_name_conflict","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of outbound number pool name conflict."},{"code":"outbound_number_pool_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested outbound number pool does not exist in the current workspace or is not visible to the caller."},{"code":"payload_encoding_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of payload encoding failed; retain request_id for support correlation."},{"code":"pcap_not_configured","statuses":[503],"retry":"after_state_change","details":"none","description":"A required service is unavailable because of pcap not configured; follow the registry retry policy."},{"code":"pcap_unavailable","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of pcap unavailable; follow the registry retry policy."},{"code":"permission_escalation","statuses":[403],"retry":"never","details":"polymorphic_object","description":"The authenticated caller is not allowed to complete the operation because of permission escalation."},{"code":"phone_number_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of phone number archived."},{"code":"phone_number_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested phone number does not exist in the current workspace or is not visible to the caller."},{"code":"phone_number_operation_in_progress","statuses":[409],"retry":"after_retry_after","details":"async_state","description":"The operation conflicts with current resource state because of phone number operation in progress."},{"code":"phone_number_provisioning","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of phone number provisioning."},{"code":"phone_number_unavailable","statuses":[422],"retry":"after_state_change","details":"parameter","description":"The request is syntactically valid but cannot be applied because of phone number unavailable."},{"code":"pii_access_already_granted","statuses":[409],"retry":"never","details":"optional_object","description":"You already hold approved access to this call, so there is nothing to request. details carries the granting request_id."},{"code":"pii_access_approval_required","statuses":[403],"retry":"after_state_change","details":"optional_object","description":"This workspace requires an approved break-glass request before sensitive call or transcription data can be read. Raise one in the dashboard (Settings → Access requests) and retry once it is approved."},{"code":"pii_access_mode_unavailable","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of pii access mode unavailable; retain request_id for support correlation."},{"code":"pii_access_request_exists","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"A request for this call from this user is already awaiting a decision. details carries its request_id."},{"code":"pii_access_request_not_actionable","statuses":[409],"retry":"never","details":"optional_object","description":"The request is no longer in a state this decision applies to — only a pending request can be approved or rejected, and only a live approval can be revoked. details carries the current and required status."},{"code":"pii_access_request_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested break-glass access request does not exist in the current workspace or is not visible to the caller."},{"code":"pii_access_request_requires_user","statuses":[403],"retry":"never","details":"none","description":"Break-glass requests must be raised by a signed-in user. An API key cannot be notified or approved, so keys holding pii-access:unmask supply a reason instead."},{"code":"pii_access_self_decision_forbidden","statuses":[403],"retry":"never","details":"optional_object","description":"Approving your own request for sensitive data is not review. Another holder of pii-access:approve must decide it. Permitted only when the requester is the workspace's sole approver, where the request would otherwise be undecidable."},{"code":"precondition_failed","statuses":[412],"retry":"after_state_change","details":"resource_conflict","description":"The supplied conditional request no longer matches current resource state; fetch the latest ETag before retrying."},{"code":"preview_failed","statuses":[502],"retry":"safe","details":"none","description":"The TTS provider could not synthesize the preview clip. The table itself is unaffected and can still be saved; retry the preview or pick another voice."},{"code":"preview_unsupported","statuses":[501],"retry":"never","details":"optional_object","description":"The selected voice does not support pronunciation preview audio yet. Pick another voice to hear the table; the table can still be saved."},{"code":"pronunciation_table_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of pronunciation table archived."},{"code":"pronunciation_table_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of pronunciation table in use."},{"code":"pronunciation_table_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested pronunciation table does not exist in the current workspace or is not visible to the caller."},{"code":"protected_member","statuses":[409],"retry":"never","details":"optional_object","description":"The membership belongs to the platform's protected owner account, which can never be removed or moved off the owner role through the API."},{"code":"provider_request_failed","statuses":[502],"retry":"from_details","details":"upstream_failure","description":"An upstream provider request failed; use details.retryable to decide whether to retry."},{"code":"rate_limit_exceeded","statuses":[429],"retry":"after_retry_after","details":"rate_limit","description":"The caller exceeded an enforced limit; wait for Retry-After before retrying."},{"code":"rate_limited","statuses":[429],"retry":"after_retry_after","details":"rate_limit","description":"The caller exceeded an enforced limit; wait for Retry-After before retrying."},{"code":"reconciliation_service_unavailable","statuses":[503],"retry":"safe","details":"none","description":"A required service is unavailable because of reconciliation service unavailable; follow the registry retry policy."},{"code":"recording_blob_missing","statuses":[410],"retry":"never","details":"none","description":"The requested artifact is no longer retained because of recording blob missing."},{"code":"recording_decryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of recording decryption failed; retain request_id for support correlation."},{"code":"recording_failed","statuses":[409],"retry":"never","details":"async_state","description":"The operation conflicts with current resource state because of recording failed."},{"code":"recording_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested recording does not exist in the current workspace or is not visible to the caller."},{"code":"recording_not_ready","statuses":[409],"retry":"after_retry_after","details":"async_state","description":"The operation conflicts with current resource state because of recording not ready."},{"code":"recording_storage_unavailable","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of recording storage unavailable; follow the registry retry policy."},{"code":"recording_unavailable","statuses":[503],"retry":"safe","details":"none","description":"A required service is unavailable because of recording unavailable; follow the registry retry policy."},{"code":"referenced_resource_missing","statuses":[422],"retry":"after_correction","details":"none","description":"The request is syntactically valid but cannot be applied because of referenced resource missing."},{"code":"request_body_read_failed","statuses":[400],"retry":"safe","details":"none","description":"The request was rejected because of request body read failed; correct the request before retrying."},{"code":"request_timeout","statuses":[408],"retry":"safe","details":"none","description":"The request body did not arrive before the server deadline; send a complete bounded body and retry."},{"code":"request_too_large","statuses":[413],"retry":"after_correction","details":"polymorphic_object","description":"The encoded request exceeds the endpoint limit; reduce it before retrying."},{"code":"resource_changed","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of resource changed."},{"code":"response_buffer_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of response buffer failed; retain request_id for support correlation."},{"code":"role_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of role in use."},{"code":"role_name_conflict","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of role name conflict."},{"code":"role_name_reserved","statuses":[409],"retry":"after_correction","details":"none","description":"The operation conflicts with current resource state because of role name reserved."},{"code":"role_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested role does not exist in the current workspace or is not visible to the caller."},{"code":"route_mismatch","statuses":[422],"retry":"after_correction","details":"parameter","description":"The request is syntactically valid but cannot be applied because of route mismatch."},{"code":"scheduling_unconfigured","statuses":[503],"retry":"after_state_change","details":"none","description":"A required service is unavailable because of scheduling unconfigured; follow the registry retry policy."},{"code":"secret_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of secret archived."},{"code":"secret_encryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of secret encryption failed; retain request_id for support correlation."},{"code":"secret_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of secret in use."},{"code":"secret_name_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of secret name taken."},{"code":"secret_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested secret does not exist in the current workspace or is not visible to the caller."},{"code":"secret_resolution_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of secret resolution failed; retain request_id for support correlation."},{"code":"sip_pcap_blob_missing","statuses":[410],"retry":"never","details":"none","description":"The requested artifact is no longer retained because of sip pcap blob missing."},{"code":"sip_pcap_decryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of sip pcap decryption failed; retain request_id for support correlation."},{"code":"sip_pcap_failed","statuses":[409],"retry":"never","details":"async_state","description":"The operation conflicts with current resource state because of sip pcap failed."},{"code":"sip_pcap_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested SIP PCAP does not exist in the current workspace or is not visible to the caller."},{"code":"sip_pcap_not_ready","statuses":[409],"retry":"after_retry_after","details":"async_state","description":"The operation conflicts with current resource state because of sip pcap not ready."},{"code":"sip_pcap_storage_unavailable","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of sip pcap storage unavailable; follow the registry retry policy."},{"code":"sip_trunk_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of sip trunk archived."},{"code":"sip_trunk_credentials_unavailable","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of sip trunk credentials unavailable."},{"code":"sip_trunk_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of sip trunk in use."},{"code":"sip_trunk_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested SIP trunk does not exist in the current workspace or is not visible to the caller."},{"code":"sip_trunk_operation_in_progress","statuses":[409],"retry":"after_retry_after","details":"async_state","description":"The operation conflicts with current resource state because of sip trunk operation in progress."},{"code":"sip_trunk_provisioning","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of sip trunk provisioning."},{"code":"slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of slug taken."},{"code":"stored_data_invalid","statuses":[500],"retry":"never","details":"optional_object","description":"The server detected stored data invalid; retrying the same request cannot correct the stored or deployment state."},{"code":"stored_policy_invalid","statuses":[500],"retry":"never","details":"none","description":"The server detected stored policy invalid; retrying the same request cannot correct the stored or deployment state."},{"code":"system_role_immutable","statuses":[403],"retry":"never","details":"none","description":"The authenticated caller is not allowed to complete the operation because of system role immutable."},{"code":"team_not_connected","statuses":[403],"retry":"after_correction","details":"optional_object","description":"The connected app's grant does not include the team named by the Kejue-Org-Id header (or the user is no longer a member). List the teams the token reaches with GET /v1/auth/me, or reconnect and approve the team."},{"code":"tool_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of tool archived."},{"code":"tool_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of tool in use."},{"code":"tool_invocation_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested tool invocation does not exist in the current workspace or is not visible to the caller."},{"code":"tool_io_decryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of tool io decryption failed; retain request_id for support correlation."},{"code":"tool_io_decryption_unavailable","statuses":[503],"retry":"after_state_change","details":"none","description":"A required service is unavailable because of tool io decryption unavailable; follow the registry retry policy."},{"code":"tool_io_raw_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested raw tool I/O does not exist in the current workspace or is not visible to the caller."},{"code":"tool_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested tool does not exist in the current workspace or is not visible to the caller."},{"code":"tool_slug_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of tool slug taken."},{"code":"transcript_decryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of transcript decryption failed; retain request_id for support correlation."},{"code":"transcript_decryption_unavailable","statuses":[503],"retry":"after_state_change","details":"none","description":"A required service is unavailable because of transcript decryption unavailable; follow the registry retry policy."},{"code":"transcript_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested transcript does not exist in the current workspace or is not visible to the caller."},{"code":"transcript_raw_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested raw transcript does not exist in the current workspace or is not visible to the caller."},{"code":"transcription_output_invalid","statuses":[502],"retry":"after_state_change","details":"none","description":"The transcription model returned an invalid result. Internal batch processing retries without committing or charging this output."},{"code":"transfer_already_terminal","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of transfer already terminal."},{"code":"transfer_cancel_outcome_unknown","statuses":[504],"retry":"from_details","details":"upstream_failure","description":"An upstream operation timed out; use details.retryable to decide whether to retry."},{"code":"transfer_cancel_provider_failed","statuses":[502],"retry":"from_details","details":"upstream_failure","description":"An upstream provider request failed; use details.retryable to decide whether to retry."},{"code":"transfer_cancel_unavailable","statuses":[503],"retry":"from_details","details":"upstream_failure","description":"A required service is unavailable because of transfer cancel unavailable; follow the registry retry policy."},{"code":"transfer_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested transfer does not exist in the current workspace or is not visible to the caller."},{"code":"transport_mismatch","statuses":[422],"retry":"after_correction","details":"parameter","description":"The request is syntactically valid but cannot be applied because of transport mismatch."},{"code":"trunk_busy","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of trunk busy."},{"code":"trunk_not_active","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of trunk not active."},{"code":"trunk_provider_not_ready","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of trunk provider not ready."},{"code":"turn_audio_expired","statuses":[410],"retry":"never","details":"none","description":"The requested artifact is no longer retained because of turn audio expired."},{"code":"turn_audio_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested turn audio does not exist in the current workspace or is not visible to the caller."},{"code":"turn_audio_storage_unavailable","statuses":[503],"retry":"after_retry_after","details":"none","description":"A required service is unavailable because of turn audio storage unavailable; follow the registry retry policy."},{"code":"turn_audio_unavailable","statuses":[503],"retry":"safe","details":"none","description":"A required service is unavailable because of turn audio unavailable; follow the registry retry policy."},{"code":"twilio_inventory_unavailable","statuses":[409],"retry":"after_state_change","details":"upstream_failure","description":"The operation conflicts with current resource state because of twilio inventory unavailable."},{"code":"twilio_native_unconfigured","statuses":[503],"retry":"after_state_change","details":"none","description":"A required service is unavailable because of twilio native unconfigured; follow the registry retry policy."},{"code":"unauthorized","statuses":[401],"retry":"after_correction","details":"none","description":"Authentication failed; provide exactly one valid, active credential before retrying."},{"code":"unexpected_body","statuses":[400],"retry":"after_correction","details":"request_body","description":"The request was rejected because of unexpected body; correct the request before retrying."},{"code":"unknown_query_parameter","statuses":[400],"retry":"after_correction","details":"parameter","description":"The request was rejected because of unknown query parameter; correct the request before retrying."},{"code":"unsupported_media_type","statuses":[415],"retry":"after_correction","details":"media_type","description":"The request Content-Type is unsupported; use the media type declared by the operation."},{"code":"unsupported_transport","statuses":[422],"retry":"after_correction","details":"none","description":"The request is syntactically valid but cannot be applied because of unsupported transport."},{"code":"validation_failed","statuses":[422],"retry":"after_correction","details":"validation_fields","description":"One or more request fields failed validation; correct every entry in details.fields before retrying."},{"code":"value_too_long","statuses":[400],"retry":"after_correction","details":"none","description":"The request was rejected because of value too long; correct the request before retrying."},{"code":"version_locked","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of version locked."},{"code":"webhook_archived","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of webhook archived."},{"code":"webhook_delivery_in_progress","statuses":[409],"retry":"after_state_change","details":"async_state","description":"The operation conflicts with current resource state because of webhook delivery in progress."},{"code":"webhook_delivery_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested webhook delivery does not exist in the current workspace or is not visible to the caller."},{"code":"webhook_delivery_payload_invalid","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of webhook delivery payload invalid."},{"code":"webhook_delivery_payload_missing","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of webhook delivery payload missing."},{"code":"webhook_in_use","statuses":[409],"retry":"after_state_change","details":"resource_conflict","description":"The operation conflicts with current resource state because of webhook in use."},{"code":"webhook_inactive","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of webhook inactive."},{"code":"webhook_missing","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of webhook missing."},{"code":"webhook_name_taken","statuses":[409],"retry":"after_correction","details":"resource_conflict","description":"The operation conflicts with current resource state because of webhook name taken."},{"code":"webhook_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested webhook does not exist in the current workspace or is not visible to the caller."},{"code":"webhook_secret_encryption_failed","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of webhook secret encryption failed; retain request_id for support correlation."},{"code":"webhook_secret_missing","statuses":[409],"retry":"after_state_change","details":"optional_object","description":"The operation conflicts with current resource state because of webhook secret missing."},{"code":"workspace_contract_unavailable","statuses":[500],"retry":"safe","details":"none","description":"The server could not complete the operation because of workspace contract unavailable; retain request_id for support correlation."},{"code":"workspace_not_found","statuses":[404],"retry":"after_correction","details":"optional_object","description":"The requested workspace does not exist in the current workspace or is not visible to the caller."}]}