{ "openapi": "3.1.0", "info": { "title": "Feather API", "description": "Unified customer experience platform API. Manages identity, conversations, memory, agents, procedures, policies, model routing, knowledge bases, integrations, and runtime execution.", "version": "1.87.0" }, "servers": [ { "url": "https://api-sandbox.featherhq.com", "description": "Sandbox" }, { "url": "http://localhost:8000", "description": "Local dev" } ], "paths": { "/v1/identity/whoami": { "get": { "tags": [ "identity" ], "summary": "Get the current caller's identity, role, and KB clearance", "description": "Resolve the authenticated caller's own identity, role, and KB clearance.\n\nAuthenticated only \u2014 no org-scope and no permission gate \u2014 so every role\n(including ``org:viewer``) can read its own context to drive UI gating.\nBackend RBAC still enforces every mutation; this endpoint grants nothing.", "operationId": "whoAmI", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WhoAmIResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/identity/org": { "get": { "tags": [ "identity" ], "summary": "Get current organization", "operationId": "getOrganization", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "identity" ], "summary": "Update current organization", "operationId": "updateOrganization", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationUpdate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/identity/org/memory": { "get": { "tags": [ "identity" ], "summary": "Get the org-level memory toggle", "description": "Return the effective org-level memory toggle (always a boolean, never null).", "operationId": "getOrgMemory", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgMemoryResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "identity" ], "summary": "Enable/disable all memory recall and ingestion for the org", "description": "Set the org-level memory toggle. Preserves all unrelated org settings.", "operationId": "setOrgMemory", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgMemoryUpdate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgMemoryResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/identity/org/post-session-extraction": { "get": { "tags": [ "identity" ], "summary": "Get the org-level post-call extraction toggle", "description": "Return the effective post-call extraction toggle (always a boolean).", "operationId": "getOrgPostSessionExtraction", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgPostSessionExtractionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "identity" ], "summary": "Enable/disable post-call structured extraction for the org", "description": "Set the post-call extraction toggle. Preserves all unrelated org settings.\n\n``org:manage`` (admin-only) rather than ``extractions:manage``: this arms a\nPII-touching pipeline for every agent in the org, which is a wider blast\nradius than authoring one agent's schema.", "operationId": "setOrgPostSessionExtraction", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgPostSessionExtractionUpdate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgPostSessionExtractionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/identity/org/warm-transfer": { "get": { "tags": [ "identity" ], "summary": "Get the org's warm-transfer settings (bridge webhook URL)", "operationId": "getWarmTransferSettings", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WarmTransferSettingsResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/identity/org/bridge-numbers": { "get": { "tags": [ "identity" ], "summary": "List the org's warm-transfer bridge numbers", "operationId": "listBridgeNumbers", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/BridgeNumberView" }, "type": "array", "title": "Response Listbridgenumbers" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "post": { "tags": [ "identity" ], "summary": "Import a Twilio number as a warm-transfer bridge number", "operationId": "importBridgeNumber", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportBridgeNumberRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BridgeNumberView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/identity/org/bridge-numbers/{bridge_number_id}": { "delete": { "tags": [ "identity" ], "summary": "Delete a bridge number (clears its Twilio webhook, then drops the row)", "operationId": "deleteBridgeNumber", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "bridge_number_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Bridge Number Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/identity/org/bridge-numbers/reprovision": { "post": { "tags": [ "identity" ], "summary": "Re-apply the current /twilio/{org_id}/bridge webhook URL to all bridge numbers", "operationId": "reprovisionBridgeWebhooks", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ReprovisionResultView" }, "type": "array", "title": "Response Reprovisionbridgewebhooks" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/identity/org/members": { "get": { "tags": [ "identity" ], "summary": "List organization members", "operationId": "listMembers", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "role", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Role" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_OrgMemberResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/identity/resolve": { "get": { "tags": [ "identity" ], "summary": "Look up an end user by channel + external_id (read-only, no mutation)", "operationId": "lookupIdentity", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "channel", "in": "query", "required": true, "schema": { "type": "string", "title": "Channel" } }, { "name": "external_id", "in": "query", "required": true, "schema": { "type": "string", "title": "External Id" } }, { "name": "org_external_end_user_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org External End User Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolveIdentityResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "identity" ], "summary": "Resolve a channel source to an end user (upsert \u2014 creates if not found)", "operationId": "resolveIdentity", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolveIdentityRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolveIdentityResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/identity/end-users": { "get": { "tags": [ "identity" ], "summary": "List end users for the organization (optionally filter by org_external_end_user_id)", "operationId": "listEndUsers", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "org_external_end_user_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Org External End User Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_EndUserResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/identity/end-users/{end_user_id}": { "get": { "tags": [ "identity" ], "summary": "Get an end user with their contacts", "operationId": "getEndUser", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "end_user_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "End User Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EndUserProfileResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "identity" ], "summary": "Update an end user (merge-on-conflict requires ?allow_merge=true)", "operationId": "updateEndUser", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "end_user_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "End User Id" } }, { "name": "allow_merge", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Allow Merge" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EndUserUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EndUserResponse" } } } }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalIdConflictResponse" } } }, "description": "Conflict" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "identity" ], "summary": "Delete an end user and all associated data", "operationId": "deleteEndUser", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "end_user_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "End User Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/identity/end-users/{end_user_id}/contacts": { "post": { "tags": [ "identity" ], "summary": "Attach a verified contact to an end user", "operationId": "addContact", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "end_user_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "End User Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddContactRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/identity/review-requests": { "get": { "tags": [ "identity" ], "summary": "List identity review requests for the organization", "operationId": "listReviewRequests", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ReviewRequestResponse" }, "title": "Response Listreviewrequests" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/identity/review-requests/{request_id}": { "get": { "tags": [ "identity" ], "summary": "Get a single identity review request", "operationId": "getReviewRequest", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Request Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReviewRequestResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/identity/review-requests/{request_id}/approve-merge": { "post": { "tags": [ "identity" ], "summary": "Approve a MERGE review request and execute the merge", "operationId": "approveMergeReviewRequest", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Request Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApproveMergeRequestBody" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReviewRequestResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/identity/review-requests/{request_id}/approve-update": { "post": { "tags": [ "identity" ], "summary": "Approve an UPDATE review request and add the proposed contact", "operationId": "approveUpdateReviewRequest", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Request Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApproveUpdateRequestBody" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReviewRequestResponse" } } } }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApproveUpdateConflictResponse" } } }, "description": "Conflict" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/identity/review-requests/{request_id}/reject": { "post": { "tags": [ "identity" ], "summary": "Reject a review request", "operationId": "rejectReviewRequest", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Request Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectReviewRequestBody" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReviewRequestResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/identity/api-keys": { "get": { "tags": [ "identity" ], "summary": "List API keys for the current organization", "operationId": "listApiKeys", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ApiKeyResponse" }, "type": "array", "title": "Response Listapikeys" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "post": { "tags": [ "identity" ], "summary": "Create an API key. The plain-text key is returned exactly once.", "operationId": "createApiKey", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyCreateRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyCreateResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/identity/api-keys/{key_id}": { "delete": { "tags": [ "identity" ], "summary": "Revoke an API key", "operationId": "revokeApiKey", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "key_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Key Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/sessions/{session_id}/analysis-input": { "get": { "tags": [ "sessions" ], "summary": "Fetch the canonical analysis input for a completed session", "description": "Returns the ``SessionAnalysisInput`` shape defined in\n``src/knowledge_gap/analysis_schemas.py``.\n\n- ``404`` \u2014 session not found, or owned by a different organization.\n- ``409`` \u2014 session is not in a terminal state (still active /\n paused / waiting for human / etc.). The analyzer should only be run\n on completed sessions.", "operationId": "getSessionAnalysisInput", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionAnalysisInput" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/retention-policies": { "get": { "tags": [ "retention-policies" ], "summary": "List retention policies", "operationId": "listRetentionPolicies", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/src__conversation__schemas__RetentionPolicyResponse" }, "type": "array", "title": "Response Listretentionpolicies" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "post": { "tags": [ "retention-policies" ], "summary": "Create a retention policy", "operationId": "createRetentionPolicy", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetentionPolicyCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__conversation__schemas__RetentionPolicyResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/retention-policies/{policy_id}": { "put": { "tags": [ "retention-policies" ], "summary": "Update a retention policy", "operationId": "updateRetentionPolicy", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetentionPolicyUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__conversation__schemas__RetentionPolicyResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "retention-policies" ], "summary": "Delete a retention policy", "operationId": "deleteRetentionPolicy", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/exports": { "post": { "tags": [ "conversation-exports" ], "summary": "Request an async encrypted conversation/session export", "operationId": "requestConversationExport", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationExportRequest" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationExportJobResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "conversation-exports" ], "summary": "List this org's conversation export jobs (newest first)", "description": "Durable, newest-first history of this org's export jobs.\n\nBacks the internal-UI \"Exports\" panel across reloads: job rows are never\ndeleted (only stale ``pending``/``running`` jobs are force-failed by the\nreaper), so this is a permanent list \u2014 no ``localStorage`` rehydration\nneeded. Mints per-file download tokens inline (``mint_tokens=True``) \u2014 the\nsame actionable view ``get_export`` returns \u2014 so the panel renders working\nDownload buttons without a per-row follow-up call. Expired/failed jobs come\nback as history rows with no tokens. Keyset-paginated on\n``ix_conversation_export_jobs_org_created`` (``organization_id, created_at``).", "operationId": "listConversationExports", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "pending", "running", "succeeded", "partial", "failed", "expired" ], "type": "string" }, { "type": "null" } ], "description": "Optional status filter.", "title": "Status" }, "description": "Optional status filter." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Opaque cursor from a prior page.", "title": "Cursor" }, "description": "Opaque cursor from a prior page." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_ConversationExportJobResponse_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/exports/{export_id}": { "get": { "tags": [ "conversation-exports" ], "summary": "Get a conversation export job's status + per-file download tokens", "operationId": "getConversationExport", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "export_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Export Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationExportJobResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/exports/{export_id}/download/{file_name}": { "get": { "tags": [ "conversation-exports" ], "summary": "Server-mediated, decrypted download of one export file", "operationId": "downloadConversationExportFile", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "export_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Export Id" } }, { "name": "file_name", "in": "path", "required": true, "schema": { "type": "string", "title": "File Name" } }, { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "description": "Short-lived HMAC download token.", "title": "Token" }, "description": "Short-lived HMAC download token." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/memory/users/{end_user_id}": { "get": { "tags": [ "memory" ], "summary": "Get all stored facts for a user", "operationId": "getUserMemories", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "end_user_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "End User Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Max items per page.", "default": 100, "title": "Limit" }, "description": "Max items per page." }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Opaque continuation token from a prior page's next_cursor; continuation requests must reuse the same limit.", "title": "Cursor" }, "description": "Opaque continuation token from a prior page's next_cursor; continuation requests must reuse the same limit." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserMemoriesResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Memory backend is unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Invalid pagination cursor", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "delete": { "tags": [ "memory" ], "summary": "Purge a user's derived memory", "description": "Purge derived memory (vendor facts) for a user.\n\nThis is a derived-memory purge, not full GDPR erasure \u2014 deleting the\nunderlying conversation data is the identity RTBF path, not this endpoint.", "operationId": "deleteUserMemories", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "end_user_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "End User Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "503": { "description": "Memory vendor temporarily unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/memory/sessions/{session_id}/memories": { "get": { "tags": [ "memory" ], "summary": "Get one session's memory ingestion outcome and attributed facts", "operationId": "getSessionMemories", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionMemoriesResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Memory feature not deployed, or session not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/memory/users/{end_user_id}/facts/{fact_id}": { "delete": { "tags": [ "memory" ], "summary": "Delete one stored memory fact for a user", "description": "Delete a single fact, scoped to (org, user, fact id).\n\nSupported by the in-house memory vendor; vendors without locally\naddressable fact rows answer 400 (``UNSUPPORTED_OPERATION``). A missing or\ncross-scope fact id answers 404 \u2014 no existence leak.", "operationId": "deleteUserMemoryFact", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "end_user_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "End User Id" } }, { "name": "fact_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Fact Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "The memory backend does not support per-fact delete", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Memory fact not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "503": { "description": "Memory vendor temporarily unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/config": { "get": { "tags": [ "knowledge-base" ], "summary": "Get available KB configuration options", "operationId": "getKnowledgeBaseConfig", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KBConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/knowledge-base/knowledge-bases": { "post": { "tags": [ "knowledge-base" ], "summary": "Create a knowledge base", "operationId": "createKnowledgeBase", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "knowledge-base" ], "summary": "List knowledge bases", "operationId": "listKnowledgeBases", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_KnowledgeBaseResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}": { "get": { "tags": [ "knowledge-base" ], "summary": "Get a knowledge base", "operationId": "getKnowledgeBase", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "knowledge-base" ], "summary": "Update a knowledge base", "operationId": "updateKnowledgeBase", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "knowledge-base" ], "summary": "Delete a knowledge base", "operationId": "deleteKnowledgeBase", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/ingestion-status": { "get": { "tags": [ "knowledge-base" ], "summary": "Get aggregate ingestion status for a knowledge base", "operationId": "getIngestionStatus", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IngestionStatusResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/documents": { "get": { "tags": [ "knowledge-base" ], "summary": "List documents in a knowledge base", "operationId": "listDocuments", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_DocumentResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/documents/{doc_id}": { "get": { "tags": [ "knowledge-base" ], "summary": "Get a document", "operationId": "getDocument", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Doc Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "knowledge-base" ], "summary": "Delete a document", "operationId": "deleteDocument", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Doc Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "knowledge-base" ], "summary": "Update a document's title and/or metadata", "operationId": "patchDocument", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Doc Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentPatch" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/documents/{doc_id}/classification": { "get": { "tags": [ "knowledge-base" ], "summary": "Get a document's sensitivity classification", "operationId": "getDocumentClassification", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Doc Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClassificationResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "knowledge-base" ], "summary": "Manually correct a document's sensitivity classification", "operationId": "patchDocumentClassification", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Doc Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClassificationPatch" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClassificationResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/documents/{doc_id}/classification/approve": { "post": { "tags": [ "knowledge-base" ], "summary": "Approve a document's pending classification", "operationId": "approveDocumentClassification", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Doc Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClassificationApprove" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClassificationResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/classification/pending": { "get": { "tags": [ "knowledge-base" ], "summary": "List documents awaiting classification review", "operationId": "listPendingClassifications", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_PendingClassificationItem_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/reclassify": { "post": { "tags": [ "knowledge-base" ], "summary": "Re-run sensitivity classification across a KB's documents", "operationId": "reclassifyKnowledgeBase", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReclassifyResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/ingest": { "post": { "tags": [ "knowledge-base" ], "summary": "Ingest documents (text, files, or mixed)", "description": "Unified document ingestion endpoint.\n\nAccepts a multipart form with:\n- `manifest` (required): JSON array describing each item\n- `files` (optional): one or more file uploads, referenced by `file_index` in the manifest\n\nManifest format (JSON array):\n\n```json\n[\n {\"type\": \"file\", \"file_index\": 0, \"title\": \"Report\"},\n {\"type\": \"text\", \"title\": \"FAQ\", \"content\": \"What is...\"},\n {\"type\": \"file\", \"file_index\": 1, \"title\": \"Old Report\", \"document_id\": \"uuid\"}\n]\n```", "operationId": "bulkIngest", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IngestResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/ingestion-jobs": { "get": { "tags": [ "knowledge-base" ], "summary": "List ingestion jobs for a knowledge base", "operationId": "listIngestionJobs", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by status. Accepts exact values (queued, processing, completed, failed, partial_failure) or the sugar value 'active' which matches queued + processing.", "title": "Status" }, "description": "Filter by status. Accepts exact values (queued, processing, completed, failed, partial_failure) or the sugar value 'active' which matches queued + processing." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_IngestionJobSummaryResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/ingestion-jobs/{job_id}": { "get": { "tags": [ "knowledge-base" ], "summary": "Get ingestion job progress", "operationId": "getIngestionJobProgress", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Job Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IngestionJobResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/ingestion-jobs/{job_id}/documents": { "get": { "tags": [ "knowledge-base" ], "summary": "List documents in an ingestion job", "operationId": "listIngestionJobDocuments", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Job Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_IngestionJobDocumentResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/ingestion-jobs/{job_id}/logs": { "get": { "tags": [ "knowledge-base" ], "summary": "List ingestion job logs grouped by document", "description": "Returns one group per child document with its logs in chronological order.\nPagination is at the document level (`limit` = max documents per page).", "operationId": "listIngestionJobLogs", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Job Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_DocumentLogGroup_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/ingestion-jobs/{job_id}/retry": { "post": { "tags": [ "knowledge-base" ], "summary": "Retry a failed ingestion job", "description": "Retry a failed or partially-failed ingestion job.\n\nEvery ``/ingest`` submission is a ``bulk`` parent (even single-doc uploads),\nso retriability is gated on *status*, not job_type: only failed /\npartial_failure jobs are retried \u2014 completed jobs (nothing to re-ingest) and\nin-flight jobs (queued/processing) are rejected.\n\n* Bulk parents re-dispatch ONLY their failed children; completed docs are\n left untouched (never re-ingested).\n* Segmented jobs re-dispatch only the segments that failed.\n* Non-segmented (single-pass) jobs reset job + version state and re-dispatch\n ``prepare_document``.\n\nConnector-backed jobs are rejected here \u2014 they have their own re-sync path\n(see below).\n\nReturns 202 with the job ID; poll ``GET /ingestion-jobs/{job_id}``\nfor progress.", "operationId": "retryIngestionJob", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Job Id" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/search": { "post": { "tags": [ "knowledge-base" ], "summary": "Semantic search across knowledge bases", "operationId": "searchKnowledgeBase", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/knowledge-base/documents/{doc_id}/versions": { "get": { "tags": [ "knowledge-base" ], "summary": "List all versions of a document", "operationId": "listDocumentVersions", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Doc Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentVersionResponse" }, "title": "Response Listdocumentversions" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/documents/{doc_id}/versions/{ref}": { "get": { "tags": [ "knowledge-base" ], "summary": "Get a version by UUID, version number, or alias", "operationId": "getDocumentVersion", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Doc Id" } }, { "name": "ref", "in": "path", "required": true, "schema": { "type": "string", "title": "Ref" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentVersionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/documents/{doc_id}/versions/{version_id}": { "delete": { "tags": [ "knowledge-base" ], "summary": "Delete a specific version (blocked if active)", "operationId": "deleteDocumentVersion", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Doc Id" } }, { "name": "version_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Version Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/documents/{doc_id}/promote": { "post": { "tags": [ "knowledge-base" ], "summary": "Promote a version to active", "operationId": "promoteDocumentVersion", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Doc Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PromoteRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Promotedocumentversion" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/documents/{doc_id}/versions/{version_id}/release": { "post": { "tags": [ "knowledge-base" ], "summary": "Release a quarantined version (reviewed false-positive)", "operationId": "releaseQuarantinedVersion", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Doc Id" } }, { "name": "version_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Version Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReleaseRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReleaseResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/documents/{doc_id}/versions/{version_id}/confirm-quarantine": { "post": { "tags": [ "knowledge-base" ], "summary": "Confirm a quarantined version (true-positive; stays quarantined)", "operationId": "confirmQuarantinedVersion", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Doc Id" } }, { "name": "version_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Version Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfirmQuarantineResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/evals/suites": { "post": { "tags": [ "knowledge-base-evals" ], "summary": "Create an evaluation suite", "operationId": "createKBEvalSuite", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KBEvalSuiteCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KBEvalSuiteResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "knowledge-base-evals" ], "summary": "List evaluation suites", "operationId": "listKBEvalSuites", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_KBEvalSuiteResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/evals/suites/{suite_id}": { "get": { "tags": [ "knowledge-base-evals" ], "summary": "Get an evaluation suite with its cases", "operationId": "getKBEvalSuite", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KBEvalSuiteDetailResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "knowledge-base-evals" ], "summary": "Update an evaluation suite", "operationId": "updateKBEvalSuite", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KBEvalSuiteUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KBEvalSuiteResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "knowledge-base-evals" ], "summary": "Delete an evaluation suite", "operationId": "deleteKBEvalSuite", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/evals/suites/{suite_id}/cases": { "post": { "tags": [ "knowledge-base-evals" ], "summary": "Add a case to an evaluation suite", "operationId": "createKBEvalCase", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KBEvalCaseCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KBEvalCaseResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/evals/cases/{case_id}": { "patch": { "tags": [ "knowledge-base-evals" ], "summary": "Update an evaluation case", "operationId": "updateKBEvalCase", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "case_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Case Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KBEvalCaseUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KBEvalCaseResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "knowledge-base-evals" ], "summary": "Delete an evaluation case", "operationId": "deleteKBEvalCase", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "case_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Case Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/evals/suites/{suite_id}/runs": { "post": { "tags": [ "knowledge-base-evals" ], "summary": "Trigger a new evaluation run against a suite", "operationId": "createKBEvalRun", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KBEvalRunCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KBEvalRunCreateResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "An in-flight run with the same config already exists.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KBEvalRunConflictResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "knowledge-base-evals" ], "summary": "List evaluation runs for a suite", "operationId": "listKBEvalRuns", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_KBEvalRunResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/evals/runs": { "get": { "tags": [ "knowledge-base-evals" ], "summary": "List evaluation runs across the org (including runs whose suite was deleted)", "operationId": "listKBEvalRunsForOrg", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Optional filter to a specific suite. Unlike `/suites/{suite_id}/runs`, this endpoint does not 404 when the suite has been deleted \u2014 pass the original suite_id and historical runs still surface via `suite_name_snapshot`.", "title": "Suite Id" }, "description": "Optional filter to a specific suite. Unlike `/suites/{suite_id}/runs`, this endpoint does not 404 when the suite has been deleted \u2014 pass the original suite_id and historical runs still surface via `suite_name_snapshot`." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_KBEvalRunResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/evals/runs/{run_id}": { "get": { "tags": [ "knowledge-base-evals" ], "summary": "Get an evaluation run", "operationId": "getKBEvalRun", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Run Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KBEvalRunResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/evals/runs/{run_id}/results": { "get": { "tags": [ "knowledge-base-evals" ], "summary": "List per-case results for a run", "operationId": "listKBEvalRunResults", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Run Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_KBEvalCaseResultResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/sources": { "post": { "tags": [ "knowledge-base-connectors" ], "summary": "Create Source", "description": "Attach a connector source (Notion connection, URL, S3, \u2026) to a KB.", "operationId": "create_source_v1_knowledge_base_knowledge_bases__kb_id__sources_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSourceRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SourceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "knowledge-base-connectors" ], "summary": "List Sources", "description": "List connector sources for a KB with keyset pagination.", "operationId": "list_sources_v1_knowledge_base_knowledge_bases__kb_id__sources_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_SourceResponse_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/sources/{source_id}": { "get": { "tags": [ "knowledge-base-connectors" ], "summary": "Get Source", "description": "Get a single connector source.", "operationId": "get_source_v1_knowledge_base_knowledge_bases__kb_id__sources__source_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } }, { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Source Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SourceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "knowledge-base-connectors" ], "summary": "Delete Source", "description": "Detach a connector source from a KB.", "operationId": "delete_source_v1_knowledge_base_knowledge_bases__kb_id__sources__source_id__delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } }, { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Source Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/sources/{source_id}/roots": { "post": { "tags": [ "knowledge-base-connectors" ], "summary": "Add Root", "description": "Add a root to a connector source (Notion page id, a URL, an S3 key, or a Drive file).", "operationId": "add_root_v1_knowledge_base_knowledge_bases__kb_id__sources__source_id__roots_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } }, { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Source Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRootRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RootResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "knowledge-base-connectors" ], "summary": "List Roots", "description": "List roots for a connector source with keyset pagination.", "operationId": "list_roots_v1_knowledge_base_knowledge_bases__kb_id__sources__source_id__roots_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } }, { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Source Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_RootResponse_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/sources/{source_id}/roots/{root_id}": { "delete": { "tags": [ "knowledge-base-connectors" ], "summary": "Delete Root", "description": "Remove a root from a connector source.", "operationId": "delete_root_v1_knowledge_base_knowledge_bases__kb_id__sources__source_id__roots__root_id__delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } }, { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Source Id" } }, { "name": "root_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Root Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/sources/{source_id}/drive/picker-config": { "get": { "tags": [ "knowledge-base-connectors" ], "summary": "Drive Picker Config", "description": "Mint a short-lived Google Picker config (token + app id + api key).\n\nDrive-only. The leased token is sensitive and per-use, so the response is\nmarked ``no-store`` to keep it out of any shared/proxy cache.", "operationId": "drive_picker_config_v1_knowledge_base_knowledge_bases__kb_id__sources__source_id__drive_picker_config_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } }, { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Source Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DrivePickerConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/sources/{source_id}/pages": { "get": { "tags": [ "knowledge-base-connectors" ], "summary": "Browse Pages", "description": "Browse accessible Notion pages for root selection.", "operationId": "browse_pages_v1_knowledge_base_knowledge_bases__kb_id__sources__source_id__pages_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } }, { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Source Id" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } }, { "name": "start_cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Start Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowseResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/sources/{source_id}/sync": { "post": { "tags": [ "knowledge-base-connectors" ], "summary": "Trigger Sync", "description": "Trigger a manual resync for a connector source.\n\nUses a single session (svc.session) for both the parent job insert and the\natomic source-status flip, so the writes commit together. The UPDATE is\nguarded by `status IN ('active','error')` so concurrent trigger_sync calls\ncan't both flip the same source into SYNCING.", "operationId": "trigger_sync_v1_knowledge_base_knowledge_bases__kb_id__sources__source_id__sync_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } }, { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Source Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SyncTriggerResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/sources/{source_id}/sync/status": { "get": { "tags": [ "knowledge-base-connectors" ], "summary": "Get Sync Status", "description": "Get current sync status for a connector source.", "operationId": "get_sync_status_v1_knowledge_base_knowledge_bases__kb_id__sources__source_id__sync_status_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } }, { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Source Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SyncStatusResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/knowledge-bases/{kb_id}/sources/{source_id}/schedule": { "patch": { "tags": [ "knowledge-base-connectors" ], "summary": "Update Source Schedule", "description": "Enable/disable + configure a connector source's automatic (cron) re-sync.\n\nEnabling requires ``sync_interval_seconds`` (schema-enforced) and is floored\nserver-side at ``kb_scheduled_sync_min_interval_seconds``; the first run is\nseeded with a randomized initial delay so a batch of newly-enabled sources\ndoesn't stampede the first sweep. Disabling clears the interval + next run.", "operationId": "update_source_schedule_v1_knowledge_base_knowledge_bases__kb_id__sources__source_id__schedule_patch", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Kb Id" } }, { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Source Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSourceScheduleRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SourceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/documents/{doc_id}/versions/{version_id}/governance": { "patch": { "tags": [ "knowledge-base-governance" ], "summary": "Update a version's lifecycle governance status / expiry", "operationId": "updateVersionGovernance", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Doc Id" } }, { "name": "version_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Version Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GovernanceUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GovernanceVersionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/documents/{doc_id}/versions/{version_id}/governance-events": { "get": { "tags": [ "knowledge-base-governance" ], "summary": "List a version's governance lifecycle history (newest first)", "operationId": "listVersionGovernanceEvents", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "doc_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Doc Id" } }, { "name": "version_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Version Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_GovernanceEventResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/retention-policy": { "get": { "tags": [ "knowledge-base-governance" ], "summary": "Get the org's KB audit retention policy (creates defaults if unset)", "operationId": "getKBAuditRetentionPolicy", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__knowledge_base__governance_schemas__RetentionPolicyResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "knowledge-base-governance" ], "summary": "Update the org's KB audit retention policy / legal hold", "operationId": "updateKBAuditRetentionPolicy", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetentionPolicyUpdateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__knowledge_base__governance_schemas__RetentionPolicyResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/knowledge-base/audit/retrievals": { "get": { "tags": [ "knowledge-base-audit" ], "summary": "Query governed KB retrieval-audit logs (incl. misses/blocks/errors)", "operationId": "queryKBRetrievalAudits", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "start", "in": "query", "required": true, "schema": { "type": "string", "format": "date-time", "description": "Inclusive window start (required).", "title": "Start" }, "description": "Inclusive window start (required)." }, { "name": "end", "in": "query", "required": true, "schema": { "type": "string", "format": "date-time", "description": "Exclusive window end (required).", "title": "End" }, "description": "Exclusive window end (required)." }, { "name": "kb_ids", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string", "format": "uuid" } }, { "type": "null" } ], "title": "Kb Ids" } }, { "name": "statuses", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "title": "Statuses" } }, { "name": "actor_user_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Actor User Id" } }, { "name": "session_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_RetrievalAuditLogSummary_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/audit/retrievals/{ref}": { "get": { "tags": [ "knowledge-base-audit" ], "summary": "Get one retrieval-audit log with its scopes and chunk refs", "operationId": "getKBRetrievalAuditDetail", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "ref", "in": "path", "required": true, "schema": { "type": "string", "title": "Ref" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetrievalAuditDetailResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/audit/exports": { "post": { "tags": [ "knowledge-base-audit" ], "summary": "Request an async encrypted KB audit export", "operationId": "requestKBAuditExport", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportRequest" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportJobResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "knowledge-base-audit" ], "summary": "List this org's KB audit export jobs (newest first)", "description": "Durable, newest-first history of this org's audit export jobs.\n\nDeliberately NOT meta-audited (the one export route that isn't): unlike\nquery/detail/download \u2014 which surface retrieval-audit *content* \u2014 this\nreturns only the caller's own export-job *metadata* (status/window/counts),\nand the UI polls it, so recording a ``KBRetrievalAuditAccessLog`` row per poll\nwould flood the compliance log for no governance gain. The actual data-egress\npoints (``export_requested`` / ``export_downloaded``) stay audited. Mints\nper-file download tokens inline so the history panel is directly actionable;\nkeyset-paginated on ``ix_kb_audit_export_jobs_org_created``.", "operationId": "listKBAuditExports", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "pending", "running", "succeeded", "partial", "failed", "expired" ], "type": "string" }, { "type": "null" } ], "description": "Optional status filter.", "title": "Status" }, "description": "Optional status filter." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Opaque cursor from a prior page.", "title": "Cursor" }, "description": "Opaque cursor from a prior page." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_ExportJobResponse_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/audit/exports/{export_id}": { "get": { "tags": [ "knowledge-base-audit" ], "summary": "Get an audit export job's status + per-file download tokens", "operationId": "getKBAuditExport", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "export_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Export Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportJobResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/audit/exports/{export_id}/download/{file_name}": { "get": { "tags": [ "knowledge-base-audit" ], "summary": "Server-mediated, decrypted download of one export file", "operationId": "downloadKBAuditExportFile", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "export_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Export Id" } }, { "name": "file_name", "in": "path", "required": true, "schema": { "type": "string", "title": "File Name" } }, { "name": "token", "in": "query", "required": true, "schema": { "type": "string", "description": "Short-lived HMAC download token.", "title": "Token" }, "description": "Short-lived HMAC download token." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-base/acl/config": { "get": { "tags": [ "knowledge-base-acl" ], "summary": "Get the org's effective KB ACL config (role\u2192clearance map + mode)", "operationId": "getKnowledgeBaseAclConfig", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ACLConfigResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "knowledge-base-acl" ], "summary": "Update the org's KB role\u2192clearance map and/or classification mode", "operationId": "updateKnowledgeBaseAclConfig", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ACLConfigUpdate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ACLConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/knowledge-base/acl/rollout/preflight": { "post": { "tags": [ "knowledge-base-acl" ], "summary": "Enqueue the KB ACL enable preflight (verifies coverage + config)", "operationId": "runKnowledgeBaseAclPreflight", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RolloutStatusResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/knowledge-base/acl/rollout/status": { "get": { "tags": [ "knowledge-base-acl" ], "summary": "Get the org's KB ACL rollout state + last preflight report", "operationId": "getKnowledgeBaseAclRolloutStatus", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RolloutStatusResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/knowledge-base/acl/rollout/enable": { "post": { "tags": [ "knowledge-base-acl" ], "summary": "Enable KB ACL (requires a passing preflight \u2192 ready_to_enable)", "operationId": "enableKnowledgeBaseAcl", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RolloutStatusResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/knowledge-base/acl/rollout/disable": { "post": { "tags": [ "knowledge-base-acl" ], "summary": "Disable KB ACL (returns retrieval to byte-identical pre-ENG-640)", "operationId": "disableKnowledgeBaseAcl", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RolloutStatusResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/model-router/models": { "get": { "tags": [ "model-router" ], "summary": "List available models with pricing and capabilities", "operationId": "listAvailableModels", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/AvailableModel" }, "type": "array", "title": "Response Listavailablemodels" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/model-router/catalog": { "get": { "tags": [ "model-router" ], "summary": "List models, per-role runtime defaults, and the system default fallback chain", "description": "Selectable models + the code-default model each runtime role falls back to.\n\nThe role defaults mirror the runtime constants (single-sourced via\n``src.runtime.model_defaults.ROLE_DEFAULTS``, which imports the SAME constants\nthe runtime applies) so the UI can show what's actually used \u2014 model + effort +\nmax_tokens + temperature + thinking budget \u2014 when an entity leaves a setting\nunset. Imported lazily inside the handler: ``model_router`` deliberately never\nimports ``src.runtime`` at module scope (the runtime imports\n``model_router.service`` \u2014 a top-level import here risks a cycle).", "operationId": "getModelCatalog", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelCatalogResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/model-router/configs": { "post": { "tags": [ "model-router" ], "summary": "Create a model router config", "operationId": "createRouterConfig", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouterConfigCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouterConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "model-router" ], "summary": "List model router configs", "operationId": "listRouterConfigs", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_RouterConfigResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/model-router/configs/{config_id}": { "get": { "tags": [ "model-router" ], "summary": "Get a model router config", "operationId": "getRouterConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Config Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouterConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "model-router" ], "summary": "Update a model router config", "operationId": "updateRouterConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Config Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouterConfigUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouterConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "model-router" ], "summary": "Delete a model router config", "operationId": "deleteRouterConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Config Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/model-router/fallback-events": { "get": { "tags": [ "model-router" ], "summary": "List model fallback events for auditing", "operationId": "listFallbackEvents", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_FallbackEventResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/model-router/invoke": { "post": { "tags": [ "model-router" ], "summary": "Invoke a model with routing", "operationId": "invokeModel", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvokeRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/model-router/stream": { "post": { "tags": [ "model-router" ], "summary": "Stream model responses via SSE", "operationId": "streamModel", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvokeRequest" } } }, "required": true }, "responses": { "200": { "description": "Server-Sent Events stream", "content": { "application/json": { "schema": {} }, "text/event-stream": { "schema": { "type": "string" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/notifications/destinations/discover": { "get": { "tags": [ "notifications" ], "summary": "Discover channels the bot can post to (cached 5 min)", "operationId": "discoverNotificationChannels", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "channel_kind", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/ChannelKind", "default": "slack" } }, { "name": "connection_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Connection Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DiscoveredChannelResponse" }, "title": "Response Discovernotificationchannels" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/notifications/destinations": { "get": { "tags": [ "notifications" ], "summary": "List configured notification destinations", "operationId": "listNotificationDestinations", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/DestinationResponse" }, "type": "array", "title": "Response Listnotificationdestinations" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "post": { "tags": [ "notifications" ], "summary": "Create a destination (verified on save via a test post)", "operationId": "createNotificationDestination", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DestinationCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DestinationResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/notifications/destinations/{destination_id}": { "delete": { "tags": [ "notifications" ], "summary": "Delete a notification destination", "operationId": "deleteNotificationDestination", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "destination_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Destination Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/notifications/routes": { "get": { "tags": [ "notifications" ], "summary": "List event-type routing rules", "operationId": "listNotificationRoutes", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/RouteResponse" }, "type": "array", "title": "Response Listnotificationroutes" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "notifications" ], "summary": "Create or update an event_type -> destination route", "operationId": "upsertNotificationRoute", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteUpsert" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RouteResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/notifications/routes/{route_id}": { "delete": { "tags": [ "notifications" ], "summary": "Delete a routing rule", "operationId": "deleteNotificationRoute", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "route_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Route Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/notifications/settings": { "get": { "tags": [ "notifications" ], "summary": "Get org notification settings (default destination + timezone)", "operationId": "getNotificationSettings", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SettingsResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "notifications" ], "summary": "Set the default destination and/or org timezone", "operationId": "updateNotificationSettings", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SettingsUpdate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SettingsResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/notifications/types": { "get": { "tags": [ "notifications" ], "summary": "Browse the notification catalog merged with this org's config", "operationId": "listNotificationTypes", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/NotificationTypeView" }, "type": "array", "title": "Response Listnotificationtypes" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/notifications/types/{event_type}/config": { "put": { "tags": [ "notifications" ], "summary": "Enable/disable a type and set its severity override / threshold config", "operationId": "upsertNotificationTypeConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "event_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Event Type" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationTypeConfigUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotificationTypeView" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/notifications/types/enable-recommended": { "post": { "tags": [ "notifications" ], "summary": "One-click enable the recommended starter set", "operationId": "enableRecommendedNotificationTypes", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnableRecommendedResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/notifications/types/{event_type}/test-send": { "post": { "tags": [ "notifications" ], "summary": "Send a test notification through the real dispatch path (notify())", "operationId": "testSendNotification", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "event_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Event Type" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TestSendRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TestSendResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/notifications/delivery-log": { "get": { "tags": [ "notifications" ], "summary": "Browse the delivery-decision audit log (why a notification was/wasn't sent)", "operationId": "listNotificationDeliveryLog", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "event_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Type" } }, { "name": "outcome", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Outcome" } }, { "name": "before", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Before" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeliveryLogResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/notifications/types/{event_type}/template": { "get": { "tags": [ "notifications" ], "summary": "Get the effective template for a type (default or override) + variables manifest", "operationId": "getNotificationTemplate", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "event_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Event Type" } }, { "name": "channel_kind", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/ChannelKind", "default": "slack" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EffectiveTemplateResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "notifications" ], "summary": "Create/update the per-org template override (validates + increments version)", "operationId": "upsertNotificationTemplate", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "event_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Event Type" } }, { "name": "channel_kind", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/ChannelKind", "default": "slack" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplateSlots" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EffectiveTemplateResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "notifications" ], "summary": "Delete the per-org override (revert to the platform default)", "operationId": "deleteNotificationTemplate", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "event_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Event Type" } }, { "name": "channel_kind", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/ChannelKind", "default": "slack" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/notifications/types/{event_type}/template/validate": { "post": { "tags": [ "notifications" ], "summary": "Strict-validate candidate slots (per-slot errors; valid=false is a 200)", "operationId": "validateNotificationTemplate", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "event_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Event Type" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplateValidateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplateValidateResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/notifications/types/{event_type}/template/preview": { "post": { "tags": [ "notifications" ], "summary": "Render a preview (text + blocks) of candidate-or-effective slots", "operationId": "previewNotificationTemplate", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "event_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Event Type" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatePreviewRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplatePreviewResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/integrations": { "get": { "tags": [ "integrations" ], "summary": "List the integrations this platform supports", "operationId": "listIntegrations", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/IntegrationSummary" }, "type": "array", "title": "Response Listintegrations" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/integrations/connections": { "get": { "tags": [ "integrations" ], "summary": "List the calling org's connections", "operationId": "listConnections", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/ConnectionResponse" }, "type": "array", "title": "Response Listconnections" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "post": { "tags": [ "integrations" ], "summary": "Start the OAuth flow for a new connection", "operationId": "createConnection", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionCreateResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/integrations/connections/{connection_id}": { "get": { "tags": [ "integrations" ], "summary": "Get a connection", "operationId": "getConnection", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "connection_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Connection Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "integrations" ], "summary": "Rename a connection and/or set its BYO voice CPS rate (slug stays immutable)", "operationId": "updateConnection", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "connection_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Connection Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionPatchRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "integrations" ], "summary": "Disconnect (hard-delete the row + drop vendor-side connection)", "operationId": "disconnectConnection", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "connection_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Connection Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/integrations/connections/custom-mcp": { "post": { "tags": [ "integrations" ], "summary": "Connect a customer-supplied MCP server (static creds or OAuth)", "description": "Static-cred connections are born ``active``; OAuth returns an\n``authorize_url`` + ``state`` and the row starts ``pending_oauth`` until the\n``/integrations/oauth/callback`` redirect lands. ``server_url`` (and any\nOAuth endpoint URLs) are SSRF-validated in the service layer.", "operationId": "connectCustomMcp", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomMcpConnectionCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomMcpConnectResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/integrations/connections/email": { "post": { "tags": [ "integrations" ], "summary": "Connect the Email integration (born active; presence marker for the send_email tool)", "description": "Create a born-``active`` presence connection so the ``send_email`` tool\nmaterializes and becomes attachable. There is no credential to collect \u2014 the\nNylas API key is platform-level and the sending mailbox is connected via the\nseparate email OAuth flow. The tool sync is dispatched post-commit.\n\nRequires the org to already have a connected mailbox; returns 422 otherwise,\nsince the ``send_email`` tool can't send without one.", "operationId": "connectEmail", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformConnectionCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/integrations/connections/custom-mcp/discover": { "post": { "tags": [ "integrations" ], "summary": "Pre-check a custom MCP server's OAuth/DCR support", "description": "Read-only probe (no row created): runs OAuth discovery and reports whether\nthe server advertises RFC 7591 dynamic client registration, so the connect UI\ncan hide the manual client_id fields. ``server_url`` is SSRF-validated in the\nservice layer.", "operationId": "discoverCustomMcp", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomMcpDiscoverRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomMcpDiscoverResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/integrations/connections/{connection_id}/finalize": { "post": { "tags": [ "integrations" ], "summary": "Finalize a connection after the OAuth popup closes", "operationId": "finalizeConnection", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "connection_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Connection Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/integrations/connections/{connection_id}/refresh-tools": { "post": { "tags": [ "integrations" ], "summary": "Manually re-sync the tool list for this connection", "description": "Enqueue a tool-sync for an active connection.\n\nReturns 202 + the current row; the frontend polls ``tools_status`` to\nsee when the sync lands. Refusing non-active rows here keeps the\nCelery task's same precondition visible at the API surface so the\nclient gets a clear 422 instead of a queued task that no-ops.", "operationId": "refreshConnectionTools", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "connection_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Connection Id" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/integrations/connections/{connection_id}/tools": { "patch": { "tags": [ "integrations" ], "summary": "Enable or disable all tools on a connection", "description": "Flip every tool on the connection on or off in one request.\n\nThe \"enable all / disable all\" control. ``is_enabled`` is applied to all of\nthe connection's tools (org-scoped). Verifies parent-connection org\nownership first, so a foreign-org ``connection_id`` 404s. Returns the full,\nupdated tool list ordered by ``tool_path`` so the client can refresh its\nswitches in one shot.", "operationId": "bulkUpdateConnectionTools", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "connection_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Connection Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionToolsBulkToggleRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConnectionToolResponse" }, "title": "Response Bulkupdateconnectiontools" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/integrations/connections/{connection_id}/tools/{tool_id}": { "patch": { "tags": [ "integrations" ], "summary": "Edit author-editable metadata on a single tool (response_field_map, is_enabled, input_defaults \u2014 defaults + pinned)", "description": "Update author-editable tool metadata.\n\nThree mutable fields:\n\n* ``response_field_map`` \u2014 the customer-owned field map\n (``{\"field_mappings\": [...]}``) selecting which response fields the agent\n receives. Narrows the agent-facing payload and drives the AOP compiler's\n ``kind=llm`` \u2192 ``kind=action`` promotion (ENG-631). Omit the field to\n no-op; pass an explicit ``null`` to clear. The response *shape*\n (``response_schema``) is sync-owned and read-only over this API (D2), so\n it is rejected by the request schema's ``extra=\"forbid\"``.\n* ``is_enabled`` \u2014 turn the individual tool on/off (the PRD's per-tool\n toggle). A disabled tool is excluded from resolution, so the agent can no\n longer call it. Omit to no-op.\n* ``input_defaults`` \u2014 operator input-arg config for input fields\n (``{field_name: {\"value\": ..., \"type\": \"default\"|\"pinned\"}}``, ENG-590). A\n ``default`` is a suggestion the agent may overwrite; a ``pinned`` value the\n caller cannot overwrite. Validated against the tool's current\n ``input_schema``: an unknown field or wrong-type value is rejected with a\n 422 listing each offending field. Omit to no-op; pass an explicit ``null``\n to clear. Surfaced on every tool read (``default_count`` / ``pinned_count``\n / ``stale_input_fields`` / ``merged_input_preview``); neither kind is\n injected into a tool call in this scope (runtime enforcement is a follow-on).\n\nOnly the fields the caller actually set are written. Verifies\nparent-connection org ownership before the tool update so a correctly-org'd\ntool id under a foreign-org connection still 404s.", "operationId": "updateConnectionTool", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "connection_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Connection Id" } }, { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Tool Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionToolPatchRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionToolResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/integrations/connections/{connection_id}/test-invoke": { "post": { "tags": [ "integrations" ], "summary": "Dashboard test surface: invoke a tool by slug (VENDOR_API)", "description": "Fire a real ``VENDOR_API`` invocation from the Integrations dashboard.\n\nVerifies the parent connection is owned by the caller's org (404\notherwise), then dispatches ``invoke_tool_by_slug`` so the operator can\nconfirm the backend action path end-to-end. Emits an\n``integration_tool_call`` Tinybird row with ``mode=vendor_api`` and\n``reason=\"ui_slack_test_send\"``. An unresolved/disabled slug surfaces as\n``ToolUnavailableError`` (400).\n\nThe backend ``result`` stays **raw** (the backend path is never narrowed).\nFor the field-picker UI we also compute ``narrowed`` here (ENG-631) \u2014 what\nthe agent would actually receive \u2014 using the shared :func:`narrow_result`.\nEffective field map: ``request.response_field_map`` \u2192 the saved tool's\n``response_field_map`` \u2192 none (``narrowed=None``).", "operationId": "testInvokeConnection", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "connection_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Connection Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionTestInvokeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionTestInvokeResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/integrations/connections/{connection_id}/test-mcp-call": { "post": { "tags": [ "integrations" ], "summary": "Dashboard test surface: invoke an MCP tool by slug (FEATHER_MCP_CLIENT)", "description": "Fire a real ``FEATHER_MCP_CLIENT`` invocation from the Integrations dashboard.\n\nVerifies the parent connection is owned by the caller's org (404\notherwise), resolves the slug to ``(connection, tool)`` via\n``ToolService.resolve_by_slug``, then dispatches through our MCP client \u2192\nthe customer's MCP server (decrypt creds \u2192 open session \u2192 ``call_tool``).\nThis is the only non-agent way to exercise ``FEATHER_MCP_CLIENT``, so a\ngreen result here is strong evidence the whole custom-MCP invoke path works\nend-to-end. Returns the raw MCP result and emits an ``integration_tool_call``\nTinybird row with ``mode=feather_mcp_client`` / ``reason=\"ui_mcp_test_call\"``.\nAn unresolved/disabled slug surfaces as ``ToolUnavailableError`` (400).", "operationId": "testMcpCallConnection", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "connection_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Connection Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionTestMcpCallRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionTestMcpCallResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/integrations/connections/{connection_id}/test-lease": { "post": { "tags": [ "integrations" ], "summary": "Dashboard test surface: lease a provider token (FEATHER_API)", "description": "Lease a provider token via ``FEATHER_API`` and prove it works.\n\nOpens ``lease_provider_token`` for the connection and, for Slack, calls\n``auth.test`` with the leased token to echo the workspace name. The token\nis never returned \u2014 only the provider's identity response. Emits a\n``feather_api_token_lease`` Tinybird row.", "operationId": "testLeaseConnection", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "connection_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Connection Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectionTestLeaseResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/integrations/webhook-events": { "get": { "tags": [ "integrations" ], "summary": "Recent webhook events for the org (testing/observability)", "description": "Org-scoped, read-only view of recently received webhook events.\n\nReads the Redis audit log written by ``WebhookService.ingest`` and\nreturns only events that resolve to one of the caller-org's connections\n(by ``vendor_connection_id`` or Slack ``team_id``), annotated with the\nresolved nickname. Forward events (Slack ``app_mention`` etc.) are\naudit-only in v1 \u2014 this surface confirms inbound events arrive and route\nto the right connection; it does not act on them. (The cross-org\n``_internal/webhook-events`` endpoint is ``require_internal`` and can't\nback a normal-API-key dashboard, hence this org-scoped read.)", "operationId": "listWebhookEvents", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "vendor", "in": "query", "required": false, "schema": { "type": "string", "description": "Vendor key, e.g. 'nango'", "default": "nango", "title": "Vendor" }, "description": "Vendor key, e.g. 'nango'" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WebhookEventResponse" }, "title": "Response Listwebhookevents" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tools": { "post": { "tags": [ "tools" ], "summary": "Create an API tool", "operationId": "createTool", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "tools" ], "summary": "List API tools", "operationId": "listTools", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_type", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/ToolType" }, { "type": "null" } ], "description": "Filter by tool kind, e.g. 'call_transfer' for the shared transfer-target picker or 'api_call' for HTTP tools.", "title": "Tool Type" }, "description": "Filter by tool kind, e.g. 'call_transfer' for the shared transfer-target picker or 'api_call' for HTTP tools." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_ToolResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tools/{tool_id}": { "get": { "tags": [ "tools" ], "summary": "Get an API tool by ID", "operationId": "getTool", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Tool Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "tools" ], "summary": "Update an API tool", "operationId": "updateTool", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Tool Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "tools" ], "summary": "Delete an API tool", "operationId": "deleteTool", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Tool Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tools/{tool_id}/execute": { "post": { "tags": [ "tools" ], "summary": "Execute an API tool", "operationId": "executeTool", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Tool Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolExecuteRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolExecuteResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tools/{tool_id}/revisions/{revision_id}/test": { "post": { "tags": [ "tools" ], "summary": "Preview a revision's RAW response + narrowed field map (no persist)", "description": "Run a revision's HTTP config and return the RAW body + a narrowed preview.\n\nPowers the dashboard field-map editor (ENG-631). Unlike ``/execute`` (which\nruns the active revision and narrows by its saved map), this runs the given\nrevision with no narrowing so the raw side is always raw, then computes\n``narrowed`` from the effective field map (request override \u2192 the revision's\nsaved ``response_schema`` \u2192 none). Verifies the revision belongs to the\ncaller's org AND to ``tool_id`` (404 otherwise). Persists nothing.", "operationId": "testToolRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Tool Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolRevisionTestRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolRevisionTestResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tools/{tool_id}/revisions/{revision_id}/preview-transfer-destination": { "post": { "tags": [ "tools" ], "summary": "Dry-run a dynamic transfer-destination lookup (no persist)", "description": "Resolve a transfer target's destination exactly as the voice host would.\n\nPowers the authoring UI's \"what number would this resolve to?\" preview: the\nrequest's ``input_mapping`` is rendered against sample ``context_vars`` and\nexecuted through the same shared lookup core as a live transfer (same\nrenderer, same revalidation gates, same extraction), so preview and runtime\ncannot drift. Verifies the revision belongs to the caller's org AND to\n``tool_id`` (404 otherwise). Persists nothing; API inputs, response bodies,\nand the resolved destination are never logged.", "operationId": "previewTransferDestination", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Tool Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransferDestinationPreviewRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransferDestinationPreviewResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tools/{tool_id}/enable": { "post": { "tags": [ "tools" ], "summary": "Enable an API tool", "operationId": "enableTool", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Tool Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tools/{tool_id}/disable": { "post": { "tags": [ "tools" ], "summary": "Disable an API tool", "operationId": "disableTool", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Tool Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tools/{tool_id}/revisions": { "post": { "tags": [ "tools" ], "summary": "Create a tool revision", "operationId": "createToolRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Tool Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolRevisionCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolRevisionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "tools" ], "summary": "List tool revisions", "operationId": "listToolRevisions", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Tool Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_ToolRevisionResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tools/revisions/{revision_id}": { "get": { "tags": [ "tools" ], "summary": "Get a tool revision", "operationId": "getToolRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolRevisionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "tools" ], "summary": "Update a tool revision", "operationId": "updateToolRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolRevisionUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolRevisionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "tools" ], "summary": "Delete a tool revision", "operationId": "deleteToolRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tools/{tool_id}/set-active-revision": { "post": { "tags": [ "tools" ], "summary": "Set the active tool revision", "operationId": "setActiveToolRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Tool Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetActiveRevisionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolRevisionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/tools/{tool_id}/revisions/{revision_id}/impact": { "get": { "tags": [ "tools" ], "summary": "Analyze which assistants would be affected if this tool revision is promoted", "description": "Impact analysis: which assistants use this tool and have configurations\nincompatible with the specified revision? Pre-prod: advisory only \u2014 the\npromotion itself always succeeds.", "operationId": "getToolRevisionImpact", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Tool Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolCompatibilityReportResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mocks": { "post": { "tags": [ "mocks" ], "summary": "Create a mock", "operationId": "createMock", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MockCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MockResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "mocks" ], "summary": "List mocks", "operationId": "listMocks", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_MockResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mocks/{mock_id}": { "get": { "tags": [ "mocks" ], "summary": "Get a mock", "operationId": "getMock", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "mock_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Mock Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MockResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "mocks" ], "summary": "Update a mock", "operationId": "updateMock", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "mock_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Mock Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MockUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MockResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "mocks" ], "summary": "Delete a mock", "operationId": "deleteMock", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "mock_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Mock Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mocks/{mock_id}/enable": { "post": { "tags": [ "mocks" ], "summary": "Enable a mock", "operationId": "enableMock", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "mock_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Mock Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MockResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mocks/{mock_id}/disable": { "post": { "tags": [ "mocks" ], "summary": "Disable a mock", "operationId": "disableMock", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "mock_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Mock Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MockResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mocks/{mock_id}/scenarios": { "post": { "tags": [ "mocks" ], "summary": "Create a scenario for a mock", "operationId": "createMockScenario", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "mock_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Mock Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MockScenarioCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MockScenarioResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "mocks" ], "summary": "List scenarios on a mock (priority ASC)", "operationId": "listMockScenarios", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "mock_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Mock Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MockScenarioResponse" }, "title": "Response Listmockscenarios" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "mocks" ], "summary": "Atomically replace all scenarios on a mock", "operationId": "bulkReplaceMockScenarios", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "mock_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Mock Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkScenarioReplaceRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MockScenarioResponse" }, "title": "Response Bulkreplacemockscenarios" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mocks/{mock_id}/scenarios/reorder": { "post": { "tags": [ "mocks" ], "summary": "Bulk update scenario priorities", "operationId": "reorderMockScenarios", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "mock_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Mock Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScenarioReorderRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MockScenarioResponse" }, "title": "Response Reordermockscenarios" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mocks/scenarios/{scenario_id}": { "get": { "tags": [ "mocks" ], "summary": "Get a scenario", "operationId": "getMockScenario", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "scenario_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Scenario Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MockScenarioResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "mocks" ], "summary": "Update a scenario", "operationId": "updateMockScenario", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "scenario_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Scenario Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MockScenarioUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MockScenarioResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "mocks" ], "summary": "Delete a scenario", "operationId": "deleteMockScenario", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "scenario_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Scenario Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mocks/{mock_id}/requests": { "get": { "tags": [ "mocks" ], "summary": "Paginated, filterable list of dispatcher requests for a mock", "operationId": "listMockRequestLogs", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "mock_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Mock Id" } }, { "name": "scenario_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Scenario Id" } }, { "name": "since", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "ISO 8601 timestamp or relative duration: 30s, 5m, 1h, 7d.", "title": "Since" }, "description": "ISO 8601 timestamp or relative duration: 30s, 5m, 1h, 7d." }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 599, "minimum": 100 }, { "type": "null" } ], "title": "Status" } }, { "name": "method", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Method" } }, { "name": "path_contains", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Path Contains" } }, { "name": "matched_only", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Matched Only" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_MockRequestLogCompact_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mocks/requests/{request_id}": { "get": { "tags": [ "mocks" ], "summary": "Get a single dispatcher request log entry (verbose)", "operationId": "getMockRequestLog", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Request Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MockRequestLogVerbose" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/webchat/widgets": { "get": { "tags": [ "webchat" ], "summary": "List webchat widgets", "operationId": "list_widgets_v1_webchat_widgets_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/WidgetResponse" }, "type": "array", "title": "Response List Widgets V1 Webchat Widgets Get" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "post": { "tags": [ "webchat" ], "summary": "Create a webchat widget", "operationId": "create_widget_v1_webchat_widgets_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/webchat/widgets/{widget_id}": { "get": { "tags": [ "webchat" ], "summary": "Get a webchat widget", "operationId": "get_widget_v1_webchat_widgets__widget_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "widget_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Widget Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "webchat" ], "summary": "Update a webchat widget", "operationId": "update_widget_v1_webchat_widgets__widget_id__patch", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "widget_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Widget Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "webchat" ], "summary": "Delete a webchat widget", "operationId": "delete_widget_v1_webchat_widgets__widget_id__delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "widget_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Widget Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/webchat/widgets/{widget_id}/rotate-key": { "post": { "tags": [ "webchat" ], "summary": "Rotate a widget's public embed key", "operationId": "rotate_key_v1_webchat_widgets__widget_id__rotate_key_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "widget_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Widget Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/webchat/widgets/{widget_id}/kill": { "post": { "tags": [ "webchat" ], "summary": "Revoke every live session token for a widget", "operationId": "kill_sessions_v1_webchat_widgets__widget_id__kill_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "widget_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Widget Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WidgetResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/webchat/widgets/{widget_id}/domains": { "post": { "tags": [ "webchat" ], "summary": "Add an allowed embed domain", "operationId": "add_domain_v1_webchat_widgets__widget_id__domains_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "widget_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Widget Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DomainCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DomainResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/webchat/widgets/{widget_id}/domains/{domain_id}": { "delete": { "tags": [ "webchat" ], "summary": "Remove an allowed embed domain", "operationId": "remove_domain_v1_webchat_widgets__widget_id__domains__domain_id__delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "widget_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Widget Id" } }, { "name": "domain_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Domain Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/webchat/widgets/{widget_id}/domains/{domain_id}/verify": { "post": { "tags": [ "webchat" ], "summary": "Check a domain's DNS TXT record now", "description": "Synchronous check so the dashboard can show a result immediately.\n\nThe weekly sweep (``webchat.recheck_domains``) is what keeps it honest\nafterwards; this is the impatient-customer path.", "operationId": "verify_domain_now_v1_webchat_widgets__widget_id__domains__domain_id__verify_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "widget_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Widget Id" } }, { "name": "domain_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Domain Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DomainResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/hitl/approval-messages": { "get": { "tags": [ "hitl" ], "summary": "Get the org's HITL approval-UX lines (resolved)", "operationId": "get_approval_messages_v1_hitl_approval_messages_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApprovalMessagesResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "hitl" ], "summary": "Set/clear the org's HITL approval-UX lines", "operationId": "set_approval_messages_v1_hitl_approval_messages_put", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApprovalMessagesUpdate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApprovalMessagesResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/hitl/approvals": { "get": { "tags": [ "hitl" ], "summary": "List approval requests", "operationId": "list_approvals_v1_hitl_approvals_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Filter to a single conversation (session).", "title": "Conversation Id" }, "description": "Filter to a single conversation (session)." }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by status; 'all' lists every status.", "default": "pending", "title": "Status" }, "description": "Filter by status; 'all' lists every status." }, { "name": "approver_role", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter to a single approver role.", "title": "Approver Role" }, "description": "Filter to a single approver role." }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_ApprovalRequestSummary_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/hitl/approvals/{approval_id}": { "get": { "tags": [ "hitl" ], "summary": "Get an approval request", "operationId": "get_approval_v1_hitl_approvals__approval_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "approval_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Approval Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApprovalRequestDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/hitl/approvals/{approval_id}/decide": { "post": { "tags": [ "hitl" ], "summary": "Decide an approval request (approve / deny)", "operationId": "decide_approval_v1_hitl_approvals__approval_id__decide_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "approval_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Approval Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DecideApprovalRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApprovalRequestDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/hitl/handoffs": { "get": { "tags": [ "hitl" ], "summary": "List handoffs", "operationId": "list_handoffs_v1_hitl_handoffs_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Filter to a single conversation (session).", "title": "Conversation Id" }, "description": "Filter to a single conversation (session)." }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by handoff status; 'all' lists every status.", "title": "Status" }, "description": "Filter by handoff status; 'all' lists every status." }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HandoffPage" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/hitl/handoffs/{handoff_id}": { "get": { "tags": [ "hitl" ], "summary": "Get a handoff", "operationId": "get_handoff_v1_hitl_handoffs__handoff_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "handoff_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Handoff Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HandoffRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/hitl/handoffs/{handoff_id}/messages": { "post": { "tags": [ "hitl" ], "summary": "Relay an operator message on a handed-off conversation", "description": "Persist an OUTBOUND operator message (\u00a76.4.1) then deliver it.\n\nPersists a ``role='assistant'`` ``ConvMessage`` attributed to the relaying\noperator (``authored_by='human_operator'`` + ``operator_actor_id``),\nsoft-claims the handoff if unassigned, then hands the already-persisted row\nto the channel delivery adapter (the adapter never mints a new message).", "operationId": "relay_handoff_message_v1_hitl_handoffs__handoff_id__messages_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "handoff_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Handoff Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HandoffRelayRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HandoffMessageRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/hitl/handoffs/{handoff_id}/resolve": { "post": { "tags": [ "hitl" ], "summary": "Resolve a handoff and close its conversation", "description": "End the session: ``set_status(resolved)`` + conversation ``\u2192 CLOSED``\nwith ``termination_reason = HANDOFF_RESOLVED``, in one transaction (\u00a76.4).", "operationId": "resolve_handoff_v1_hitl_handoffs__handoff_id__resolve_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "handoff_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Handoff Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HandoffRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/hitl/failed-transfers": { "get": { "tags": [ "hitl" ], "summary": "List failed warm-transfer attempts", "description": "Read-only inbox of warm transfers whose supervisor leg never connected.\n\nPure visibility: the live call has already self-recovered (AI resumed / cold\ntransfer) by the time this is read. Each item deep-links to its session so an\noperator can review and call the customer back.", "operationId": "list_failed_transfers_v1_hitl_failed_transfers_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_FailedTransferRead_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/personas": { "post": { "tags": [ "personas" ], "summary": "Create a persona", "operationId": "createPersona", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "personas" ], "summary": "List personas", "operationId": "listPersonas", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "is_active", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_PersonaResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/personas/{persona_id}": { "get": { "tags": [ "personas" ], "summary": "Get a persona", "operationId": "getPersona", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "personas" ], "summary": "Update a persona", "operationId": "updatePersona", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "personas" ], "summary": "Delete a persona", "operationId": "deletePersona", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/personas/{persona_id}/call-settings": { "get": { "tags": [ "personas" ], "summary": "Get a persona's voice call behavior settings", "description": "Return the persona's canonical ``VoiceCallSettings``.\n\nPersona reads never consult the legacy VPC scalar columns: a ``NULL``/\nempty JSON column means schema defaults. These settings drive the persona\n(eval-user) side of voice simulations.", "operationId": "getPersonaCallSettings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceCallSettings" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "personas" ], "summary": "Update a persona's voice call behavior settings", "description": "Partially update a persona's voice call behavior settings.\n\nUnset fields are left unchanged; the merged result is fully validated.\nThe write is row-locked and actor-audited; persona settings drive the\npersona side of voice simulations (overlaid onto the simulation pipeline\nconfiguration at run setup).", "operationId": "updatePersonaCallSettings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceCallSettingsUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceCallSettings" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations": { "post": { "tags": [ "conversations" ], "summary": "Get or create a v2 conversation", "operationId": "getOrCreateV2Conversation", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "conversations" ], "summary": "List v2 conversations", "operationId": "listV2Conversations", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" } }, { "name": "end_user_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "End User Id" } }, { "name": "assigned_agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assigned Agent Id" } }, { "name": "priority", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Priority" } }, { "name": "started_after", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Lower-bound (inclusive) on conversation ``started_at``.", "title": "Started After" }, "description": "Lower-bound (inclusive) on conversation ``started_at``." }, { "name": "started_before", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Upper-bound (inclusive) on conversation ``started_at``.", "title": "Started Before" }, "description": "Upper-bound (inclusive) on conversation ``started_at``." }, { "name": "q", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Case-insensitive substring match on subject/summary.", "title": "Q" }, "description": "Case-insensitive substring match on subject/summary." }, { "name": "eval_filter", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "has_evals", "no_evals", "all_passed", "any_failed" ], "type": "string" }, { "type": "null" } ], "title": "Eval Filter" } }, { "name": "from_number", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Originating phone number, matched as normalized E.164. On an inbound session this is the customer's caller ID; on an outbound one it is the platform number that dialed. Applies to voice and SMS.", "title": "From Number" }, "description": "Originating phone number, matched as normalized E.164. On an inbound session this is the customer's caller ID; on an outbound one it is the platform number that dialed. Applies to voice and SMS." }, { "name": "to_number", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Destination phone number, matched as normalized E.164. On an inbound session this is the platform number that was dialed; on an outbound one it is the customer's number. Applies to voice and SMS.", "title": "To Number" }, "description": "Destination phone number, matched as normalized E.164. On an inbound session this is the platform number that was dialed; on an outbound one it is the customer's number. Applies to voice and SMS." }, { "name": "email", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Sessions whose end user owns this email address (case-insensitive).", "title": "Email" }, "description": "Sessions whose end user owns this email address (case-insensitive)." }, { "name": "id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Exact-match lookup by session id.", "title": "Id" }, "description": "Exact-match lookup by session id." }, { "name": "external_session_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Exact-match lookup by the caller-supplied external session id.", "title": "External Session Id" }, "description": "Exact-match lookup by the caller-supplied external session id." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__shared__pagination__CursorPage_SessionResponse___1" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/{conversation_id}/turns": { "post": { "tags": [ "conversations" ], "summary": "Run one turn of a v2 conversation", "operationId": "runV2ConversationTurn", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TurnRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__runtime__conversation_schemas__TurnResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "The conversation changed during computation. Safe to retry after the advertised delay; model and tool work was not replayed internally.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "503": { "description": "The turn outcome is uncertain after output, a possible external action, or an unresolved commit. Do not retry automatically.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "conversations" ], "summary": "List a v2 conversation's transcript", "operationId": "listV2ConversationTurns", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "role", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Role" } }, { "name": "include_compacted", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Include rows folded into the rolling summary by compaction; folded rows carry is_compacted=true so clients can badge them.", "default": true, "title": "Include Compacted" }, "description": "Include rows folded into the rolling summary by compaction; folded rows carry is_compacted=true so clients can badge them." }, { "name": "include_evidence", "in": "query", "required": false, "schema": { "type": "boolean", "description": "[ENG-670 T3] Attach each row's evidence package (the KB sources shown to the model). Off by default \u2014 the hot read DEFERS the large citations column; opt in to load and project it.", "default": false, "title": "Include Evidence" }, "description": "[ENG-670 T3] Attach each row's evidence package (the KB sources shown to the model). Off by default \u2014 the hot read DEFERS the large citations column; opt in to load and project it." }, { "name": "evidence_view", "in": "query", "required": false, "schema": { "enum": [ "display", "full" ], "type": "string", "description": "Serialization view when include_evidence=true. The transcript default is 'full' (staff/audit \u2014 raw scores, hashes, chunk ids, status_reason); 'display' is the end-user source-card subset. (The live-turn surface defaults to 'display' instead.)", "default": "full", "title": "Evidence View" }, "description": "Serialization view when include_evidence=true. The transcript default is 'full' (staff/audit \u2014 raw scores, hashes, chunk ids, status_reason); 'display' is the end-user source-card subset. (The live-turn surface defaults to 'display' instead.)" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TurnListResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/{conversation_id}": { "get": { "tags": [ "conversations" ], "summary": "Get a v2 conversation with recent turns", "operationId": "getV2Conversation", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__conversation__schemas__SessionDetailResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "conversations" ], "summary": "Delete a v2 conversation and purge its data + blobs", "description": "Hard-delete a conversation, its entire subtree, and its S3 blobs.\n\nRefuses (409) a live (non-terminal) conversation \u2014 close it first.\nCross-org / missing ids collapse to 404 via the global handler.", "operationId": "deleteV2Conversation", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/{conversation_id}/close": { "post": { "tags": [ "conversations" ], "summary": "Close a v2 conversation", "operationId": "closeV2Conversation", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/SessionClose" }, { "type": "null" } ], "title": "Body" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__conversation__schemas__SessionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/{conversation_id}/end_session": { "post": { "tags": [ "conversations" ], "summary": "End a v2 conversation through the close pipeline (admin)", "description": "conv_* replacement for the retired ``POST /v1/runtime/end_session``.\n\nThe legacy endpoint drove ``Runtime.end_session(triggered_by=\"admin\")``,\nwhich under ``PersistStrategy.PER_TURN`` (every HTTP channel) reduced to the\nsame unified close pipeline ``SessionService.close_session`` now owns: flip\nto CLOSED, stamp the meta close-out columns + retention, and enqueue the\npost-session finalize chain (PII scrub \u2192 summarize + memory-sync). So this\nis a straight call to ``close_session`` \u2014 there is no separate v2 ``Runtime``\nto construct.\n\nThe conversation id is taken from the PATH and org-scoped (cross-org /\nmissing \u2192 404 inside ``close_session`` \u2192 ``get_session_for_org``); the legacy\nbody's ``session_id`` / ``end_user_id`` / ``agent_id`` / ``channel`` fields\nare accepted for wire-compat but ignored. ``reason`` defaults to\n``AGENT_INITIATED`` (the same RESOLVED outcome category the legacy admin\nclose used when no explicit reason was supplied).\n\nResponse mirrors the legacy ``TurnResult`` shape (``messages=[]``,\n``status=\"ended\"``) \u2014 the admin UI ignores the body and only awaits the 200.", "operationId": "endV2ConversationSession", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/EndSessionRequest" }, { "type": "null" } ], "title": "Body" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TurnResult" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/test-chat": { "post": { "tags": [ "conversations" ], "summary": "Mint a fresh test-type v2 conversation bound to an agent or team", "description": "conv_* replacement for the retired ``POST /v1/runtime/test-chat``.\n\nMints a ``session_type=\"test\"`` ``Conversation`` on the ``chat`` channel /\n``dashboard`` surface (ADR-001 \u2014 the operator initiated it, so\n``origin=\"outbound\"``). Identity is\nper ``body.test_features.identity_resolution`` (default off): off binds a throwaway\nrandom ``end_user_id`` with no identity-graph call; on binds the authenticated\ncaller's resolved ``internal:`` EndUser. The ``test`` discriminator\nstill gates memory sync / summary generation / extraction / evaluations /\nknowledge-gap analysis per the resolved snapshot (``src.conversation.test_features``),\nso a feature-off test session remains as ephemeral as before. The dashboard \"Try\nthis \u2026\" panel then drives turns via ``POST /conversations/{id}/turns/stream``\npassing the returned id.\n\nBinds to exactly one of a single Assistant (``agent_id``) or a Team\n(``team_id`` + optional ``team_revision_id``); the request schema enforces\nthat XOR. Either way the bound entity is resolved + org-scoped BEFORE the\nconversation is created (``get_agent_for_runtime`` / ``get_team_for_org``\nboth raise 404 for a missing or cross-org id), so a bare test row can never\nbind to another org's agent/team.\n\nFor a team, ``team_revision_id`` defaults to the team's\n``active_revision_id`` when omitted; ``bootstrap_team_conversation`` binds the\nteam revision. Under DD-5 the roster resolves LIVE per turn (member pin, else\nlive active revision) \u2014 it is not pinned at bind. No first greeting: the\nlegacy endpoint emitted none, so there is nothing to replicate here.", "operationId": "startV2TestChat", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TestChatStartRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TestChatStartResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/conversations/{conversation_id}/messages": { "get": { "tags": [ "conversations" ], "summary": "Poll a v2 conversation for its status and the message tail since a seq", "description": "The HITL-04 \u00a76.6 poll primitive \u2014 net-new, message+seq shaped.\n\nDistinct from ``GET /{id}/turns`` (cursor-paginated over *turns*): this is\nthe one round-trip a caller loops on while a turn is parked, returning the\nconversation's current ``session_status`` AND every message with\n``seq > since_seq``. The SAME primitive serves approval-resume polling\n(``awaiting_approval`` \u2192 ``active``) and handoff operator-relay polling\n(``waiting_for_human`` \u2192 ``closed``); the uniform waker generates+persists\nthe resumed/operator message and the caller's next poll picks it up.\n\nThe caller watermarks on the returned ``next_seq`` (the max ``seq`` of the\ntail, or the request ``since_seq`` when the tail is empty so an idle poll\nnever rewinds). Borrows the read-router message-row + worst-of-N delivery-\nstatus plumbing; ordered by ``seq`` ascending. Org-scoped: cross-org /\nmissing id \u2192 404 before any read.", "operationId": "pollV2ConversationMessages", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } }, { "name": "since_seq", "in": "query", "required": false, "schema": { "type": "integer", "minimum": -1, "description": "Watermark: return only messages with ``seq > since_seq`` (exclusive). Message seqs are 0-based, so seed with the default ``-1`` to fetch from the very start (includes seq 0), then pass the response's ``next_seq`` back.", "default": -1, "title": "Since Seq" }, "description": "Watermark: return only messages with ``seq > since_seq`` (exclusive). Message seqs are 0-based, so seed with the default ``-1`` to fetch from the very start (includes seq 0), then pass the response's ``next_seq`` back." }, { "name": "include_evidence", "in": "query", "required": false, "schema": { "type": "boolean", "description": "[ENG-670 T3] Attach each message's evidence package (the KB sources shown to the model). Off by default \u2014 the poll DEFERS the large citations column; opt in to load and project it.", "default": false, "title": "Include Evidence" }, "description": "[ENG-670 T3] Attach each message's evidence package (the KB sources shown to the model). Off by default \u2014 the poll DEFERS the large citations column; opt in to load and project it." }, { "name": "evidence_view", "in": "query", "required": false, "schema": { "enum": [ "display", "full" ], "type": "string", "description": "Serialization view when include_evidence=true. Poll default is 'full' (staff/audit), matching the transcript page; 'display' is the end-user source-card subset.", "default": "full", "title": "Evidence View" }, "description": "Serialization view when include_evidence=true. Poll default is 'full' (staff/audit), matching the transcript page; 'display' is the end-user source-card subset." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConversationMessagesPoll" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/{conversation_id}/trace": { "get": { "tags": [ "conversations" ], "summary": "Get the customer-readable trace for a v2 conversation", "operationId": "getV2ConversationTrace", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } }, { "name": "turn_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Turn Id" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "category", "in": "query", "required": false, "schema": { "enum": [ "product", "engineering", "all" ], "type": "string", "default": "product", "title": "Category" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionTraceResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/{conversation_id}/trace/grouped": { "get": { "tags": [ "conversations" ], "summary": "Get the customer-readable trace for a v2 conversation, nested Session\u2192Turn\u2192node\u2192step", "description": "The nested tree variant of the session trace (Phase D), paginated by TURN. Same auth\n(TRACE_READ) + org scoping + terminal-session cache as the flat read. The full tree is built +\ncached once, then a window of ``limit`` turns from ``cursor`` is returned with a ``next_cursor``\nfor the next block (``None`` on the last page). ``header`` + session lane ride every page.", "operationId": "getV2ConversationTraceGrouped", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } }, { "name": "turn_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Turn Id" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Turn-pagination cursor: pass the previous page's ``next_cursor`` to load the next block of turns. Omit for the first page.", "title": "Cursor" }, "description": "Turn-pagination cursor: pass the previous page's ``next_cursor`` to load the next block of turns. Omit for the first page." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "description": "Max TURNS per page (the grouped tree paginates by turn, not by raw step).", "default": 25, "title": "Limit" }, "description": "Max TURNS per page (the grouped tree paginates by turn, not by raw step)." }, { "name": "category", "in": "query", "required": false, "schema": { "enum": [ "product", "engineering", "all" ], "type": "string", "default": "product", "title": "Category" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionTraceGroupedResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/{conversation_id}/turns/{turn_id}/trace": { "get": { "tags": [ "conversations" ], "summary": "Get the customer-readable trace for a single v2 turn", "operationId": "getV2ConversationTurnTrace", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } }, { "name": "turn_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Turn Id" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "category", "in": "query", "required": false, "schema": { "enum": [ "product", "engineering", "all" ], "type": "string", "default": "product", "title": "Category" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionTraceResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/{conversation_id}/engineering/turns": { "get": { "tags": [ "conversations" ], "summary": "List the per-turn engineering-waterfall summaries for a v2 conversation", "description": "Session-level engineering list, reconstructed from Langfuse (ENG-689 T3).\n\nReplaces the retired self-hosted ``\u2026/telemetry`` list. Same row contract as the old\n``TurnTelemetryListItem`` so the frontend list is unchanged; the source is now Langfuse\nobservations rebuilt into the per-turn waterfall shape.", "operationId": "listV2ConversationEngineeringTurns", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EngineeringTurnSummary" }, "title": "Response Listv2Conversationengineeringturns" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/{conversation_id}/engineering/turns/{turn_id}": { "get": { "tags": [ "conversations" ], "summary": "Get the reconstructed engineering waterfall for a single v2 turn", "description": "Per-turn engineering waterfall, reconstructed from Langfuse (ENG-689 T3).\n\nReplaces the retired self-hosted ``\u2026/turns/{turn_id}/telemetry`` read. Returns the\n``TurnState.to_telemetry_dict()`` artifact the rich waterfall UI already renders (full detail,\nPII-scrubbed per the org's config at emit time \u2014 ENG-686 T4).", "operationId": "getV2ConversationEngineeringTurn", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } }, { "name": "turn_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Turn Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TurnWaterfallResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/{conversation_id}/reevaluate": { "post": { "tags": [ "conversations" ], "summary": "Re-run all current evaluator bindings against a v2 conversation", "description": "v2 alias of ``POST /v1/sessions/{id}/reevaluate``.\n\nThe legacy eval endpoint already operates on the conv_* ``Conversation``\nmodel and works unchanged \u2014 this thin alias keeps the admin UI's path\nfamily consistent under ``/conversations``. Wipes existing EvalRuns and\nre-runs the currently bound evaluators with fresh snapshots; rejects (409)\nwhile any run for the conversation is ``pending`` / ``running``.", "operationId": "reevaluateV2Conversation", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvalTaskAcceptedResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/{conversation_id}/turns/stream": { "post": { "tags": [ "conversations" ], "summary": "Run one v2 conversation turn with an SSE response", "description": "SSE counterpart to ``POST /conversations/{id}/turns``.\n\nToken streaming: the v2 ``ConversationTurnDriver`` prepares a snapshot,\ncomputes without a checked-out connection, and then finalizes atomically. It accepts an\n``on_token`` callback that\nthe orchestrators/runnables fire as the *answer* streams (speculative losers\nand transferring members are filtered upstream \u2014 a Supervisor buffers the\nspeculation and flushes only on ``continue``). We bridge that push-callback\nto this pull-generator with an :class:`asyncio.Queue`: the driver runs as a\ntask that enqueues each token delta, and the generator drains the queue into\n``delta`` frames as they arrive. When the driver finishes we emit a\n``complete`` frame carrying the v2 ``TurnResponse`` JSON (including the\nserver-measured ``turn_ttft_ms``). The wire contract (``delta`` /\n``complete`` / ``error`` frames) matches ``/v1/runtime/turn/stream`` so the\nUI needs no change.\n\nDB session lifecycle: the per-request ``session`` commits admission before the response is\nconstructed, is connection-free while the driver task computes, and commits finalization\nbefore the ``complete`` frame. The generator only touches the session after the driver task\nhas finished, so the two never race on it.", "operationId": "runV2ConversationTurnStream", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } }, { "name": "trace", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Trace" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TurnRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "The conversation changed during computation. Safe to retry after the advertised delay; model and tool work was not replayed internally.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "503": { "description": "The turn outcome is uncertain after output, a possible external action, or an unresolved commit. Do not retry automatically.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants": { "post": { "tags": [ "assistants" ], "summary": "Create an assistant (agent + workflow) as one unit", "description": "Create an assistant (agent + parent workflow) with an inactive initial\nrevision in one transaction. Activate explicitly to go live.", "operationId": "createAssistantComposite", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantCreateComposite" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantCompositeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "assistants" ], "summary": "List assistants (cursor-paginated)", "description": "List assistants with cursor pagination. Archived excluded by default.", "operationId": "listAssistants", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "description": "Page size; values above 200 are capped at 200.", "default": 50, "title": "Limit" }, "description": "Page size; values above 200 are capped at 200." }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "include_archived", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Include Archived" } }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Search by name or description", "title": "Search" }, "description": "Search by name or description" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/channel-prompts": { "get": { "tags": [ "assistants" ], "summary": "Get the org-level channel-prompt override map", "operationId": "getAssistantOrgChannelPrompts", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgChannelPromptsResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "assistants" ], "summary": "Set/clear the org-level channel-prompt override map", "operationId": "setAssistantOrgChannelPrompts", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgChannelPromptsUpdate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgChannelPromptsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/assistants/current-time": { "get": { "tags": [ "assistants" ], "summary": "Get the org-level current-time context configuration", "operationId": "getAssistantOrgCurrentTime", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CurrentTimeConfigResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "assistants" ], "summary": "Set/clear the org-level current-time context configuration", "operationId": "setAssistantOrgCurrentTime", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CurrentTimeSettingsUpdate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CurrentTimeConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/assistants/platform-tools/catalog": { "get": { "tags": [ "assistants" ], "summary": "List the platform tools an assistant can enable", "description": "Static projection of the hard-coded platform-tool registry.", "operationId": "getAssistantPlatformToolCatalog", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformToolCatalogResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/assistants/{agent_id}": { "get": { "tags": [ "assistants" ], "summary": "Get an assistant (config + all revisions)", "description": "Compose the full assistant view: agent config + all revisions + active flow.", "operationId": "getAssistant", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantDetailResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "assistants" ], "summary": "Update stable identity (name, description, metadata, voice concurrency cap)", "description": "In-place identity update \u2014 no run semantics (\u00a73.3).\n\nAlso the write path for ``max_active_calls``, the per-agent voice concurrency cap\n(Layer 2c) \u2014 a top-level ``Agent`` column, so it does not belong on a revision\nPATCH. Passing ``model_fields_set`` through is what makes the cap's tri-state work:\nomitted leaves it alone, explicit ``null`` clears it. A cap that exceeds the org's\nactive-call cap is rejected 422 by the service (the org cap is the hard ceiling on\nevery admit, so a higher per-agent cap is unreachable).", "operationId": "patchAssistantIdentity", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantIdentityUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/archive": { "post": { "tags": [ "assistants" ], "summary": "Archive an assistant (blocked by active deployments)", "description": "Archive an assistant. Blocked by active phone/email/team bindings (\u00a78).", "operationId": "archiveAssistant", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ArchiveRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/restore": { "post": { "tags": [ "assistants" ], "summary": "Restore an archived assistant", "description": "Restore an archived assistant (reversible, \u00a78).", "operationId": "restoreAssistant", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/deployments": { "get": { "tags": [ "assistants" ], "summary": "List deployment bindings (archive blockers)", "description": "Enumerate active deployment bindings that block archival (\u00a78).", "operationId": "listAssistantDeployments", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeploymentsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/operational-settings": { "get": { "tags": [ "assistants" ], "summary": "Get operational settings (eval toggles, release-gate config)", "description": "Get the operational settings that live in-place on the stable Agent (\u00a73.2).", "operationId": "getAssistantOperationalSettings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OperationalSettingsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/operational-settings/evaluation": { "patch": { "tags": [ "assistants" ], "summary": "Update evaluation toggles (requires evals:configure_live)", "description": "Update eval toggles (\u00a73.2). Requires evals:configure_live.", "operationId": "patchAssistantEvaluationSettings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluationSettingsUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OperationalSettingsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/operational-settings/analysis": { "patch": { "tags": [ "assistants" ], "summary": "Update knowledge-gap analysis toggle", "description": "Update knowledge-gap analysis toggle (\u00a73.2).", "operationId": "patchAssistantAnalysisSettings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnalysisSettingsUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OperationalSettingsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/operational-settings/release-gate": { "patch": { "tags": [ "assistants" ], "summary": "Update release-gate config", "description": "Update release-gate config (\u00a73.2).", "operationId": "patchAssistantReleaseGateSettings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReleaseGateSettingsUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OperationalSettingsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/revisions": { "post": { "tags": [ "assistants" ], "summary": "Create a new revision (optionally branch from an existing one)", "description": "Create a new revision. Optionally branch from ``based_on_revision_id``.", "operationId": "createAssistantRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRevisionRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentRevisionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "assistants" ], "summary": "List the revision stack (newest first)", "description": "Paginated revision stack (\u00a72.2).", "operationId": "listAssistantRevisions", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevisionStackResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/revisions/{revision_id}": { "patch": { "tags": [ "assistants" ], "summary": "Update revision config (any revision, in place)", "description": "Apply config updates to any revision in place.", "operationId": "patchAssistantRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevisionConfigUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevisionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "assistants" ], "summary": "Delete a revision (cannot delete the active revision)", "description": "Delete a revision. Cannot delete the active revision.", "operationId": "deleteAssistantRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "assistants" ], "summary": "Get a specific revision", "description": "Get a specific revision by ID (\u00a710.1).", "operationId": "getAssistantRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentRevisionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/revisions/{revision_id}/current-time": { "get": { "tags": [ "assistants" ], "summary": "Get a revision's effective current-time context configuration", "operationId": "getAssistantRevisionCurrentTime", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CurrentTimeConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "assistants" ], "summary": "Set/clear a revision's current-time context configuration", "operationId": "setAssistantRevisionCurrentTime", "deprecated": true, "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevisionCurrentTimeSettingsUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CurrentTimeConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/revisions/{revision_id}/effective-runtime-config": { "get": { "tags": [ "assistants" ], "summary": "Get resolved bare/workflow runtime configuration", "operationId": "getAssistantEffectiveRuntimeConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EffectiveRuntimeConfigResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/revisions/{revision_id}/context-schema": { "get": { "tags": [ "assistants" ], "summary": "Get ownership-separated system and workflow context schemas", "operationId": "getAssistantRevisionContextSchema", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantContextSchemaResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/revisions/{revision_id}/graph": { "get": { "tags": [ "assistants" ], "summary": "Get a revision's flow graph", "description": "Get a revision's root workflow revision graph.", "operationId": "getAssistantRevisionGraph", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantWorkflowGraphUpdateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "assistants" ], "summary": "Replace or clear a revision's flow graph", "description": "Persist a graph edit, or clear it with ``compiled_graph: null``.", "operationId": "putAssistantRevisionGraph", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantWorkflowGraphRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantWorkflowGraphUpdateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/revisions/{revision_id}/effective-tool-surface": { "get": { "tags": [ "assistants" ], "summary": "Resolve inherited and node-local tools for a revision's flow", "description": "Return the backend-owned effective surface with provenance for every AgentNode.\n\nFree revision model: resolved for the specific revision addressed in the path.\nThe client performs no inheritance or precedence logic of its own.", "operationId": "getAssistantEffectiveToolSurface", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EffectiveToolSurfaceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/revisions/{revision_id}/graph/ops": { "post": { "tags": [ "assistants" ], "summary": "Apply graph ops to a revision's flow", "description": "Apply graph ops to a revision's flow.", "operationId": "patchAssistantRevisionGraph", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowGraphOpsRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantWorkflowGraphUpdateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/revisions/{revision_id}/activate": { "post": { "tags": [ "assistants" ], "summary": "Activate a revision (pure FK flip, no clone)", "description": "Activate a revision \u2014 sets it as the active revision. No clone created.", "operationId": "activateAssistantRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActivateRequest", "default": {} } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentRevisionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/revisions/{revision_id}/release-check": { "post": { "tags": [ "assistants" ], "summary": "Dispatch the assistant's release simulation suite against a candidate revision", "description": "Dispatch the assistant's configured release suite pinned to ``revision_id``.", "operationId": "runAssistantReleaseCheck", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteRunResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "assistants" ], "summary": "Latest release-check verdict for a candidate revision", "description": "Return the latest release-check ``SimulationSuiteRun`` for the revision.", "operationId": "getAssistantRevisionReleaseCheck", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteRunResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/variables": { "get": { "tags": [ "assistants" ], "summary": "List the legacy merged context-variable projection", "description": "Compatibility projection. New clients should use the revision ``context-schema`` route.", "operationId": "listAssistantVariables", "deprecated": true, "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Resolve against this revision", "title": "Revision Id" }, "description": "Resolve against this revision" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentVariablesResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/platform-tools": { "get": { "tags": [ "assistants" ], "summary": "Get the assistant's enabled platform tools (from active revision)", "description": "Get platform_tools from the active revision.", "operationId": "getAssistantPlatformTools", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentPlatformToolsResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/eval-config": { "get": { "tags": [ "assistants" ], "summary": "Get per-assistant eval configuration", "operationId": "getAssistantEvalConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentEvalConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "assistants" ], "summary": "Set per-assistant eval configuration", "operationId": "setAssistantEvalConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentEvalConfigUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentEvalConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/revisions/{revision_id}/tool-input-defaults": { "get": { "tags": [ "assistants" ], "summary": "Get an assistant revision's tool-input defaults (enriched view)", "operationId": "getAssistantRevisionToolInputDefaults", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolInputDefaultsViewResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "assistants" ], "summary": "Replace an assistant revision's tool-input defaults", "operationId": "setAssistantRevisionToolInputDefaults", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolInputDefaultsPutRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolInputDefaultsViewResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/audit-log": { "get": { "tags": [ "assistants" ], "summary": "Unified audit timeline (revisions + operational + dependency events)", "description": "Unified audit timeline (\u00a75.6).", "operationId": "getAssistantAuditLog", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditLogResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/revisions/{revision_id}/call-settings": { "get": { "tags": [ "assistants" ], "summary": "Get a revision's voice call behavior settings", "description": "Return this revision's canonical ``VoiceCallSettings``.\n\nRevision-scoped reads never consult the legacy VPC scalar columns: a\n``NULL``/empty JSON column means schema defaults. This is the LIVE value\neven while a saved config is linked \u2014 saved configs are pipeline-only and\nnever carry call behavior.", "operationId": "getAssistantRevisionCallSettings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceCallSettings" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "assistants" ], "summary": "Update a revision's voice call behavior settings", "description": "Partially update voice call behavior settings on this revision.\n\nUnset fields are left unchanged; the merged result is fully validated.\nThe write is strictly revision-scoped and goes through the revision\nlifecycle door (agent lock + version bump + audit + fingerprint) \u2014 the\nruntime overlays this JSON onto the in-memory pipeline configuration at\ncall setup, so the (possibly saved/shared) VPC row is never mutated by a\nrevision edit.", "operationId": "updateAssistantRevisionCallSettings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceCallSettingsUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceCallSettings" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies": { "post": { "tags": [ "policies" ], "summary": "Create a policy", "operationId": "createPolicy", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "policies" ], "summary": "List policies", "operationId": "listPolicies", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_PolicyListResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/enforcement": { "get": { "tags": [ "policies" ], "summary": "Get the org-wide policy enforcement switch", "operationId": "getOrgPolicyEnforcement", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgPolicyEnforcementResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "policies" ], "summary": "Enable/disable all policy enforcement for the org (kill switch)", "operationId": "setOrgPolicyEnforcement", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgPolicyEnforcementUpdate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgPolicyEnforcementResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/policies/judge-model": { "get": { "tags": [ "policies" ], "summary": "Get the org-level llm_judge model default", "operationId": "getOrgPolicyJudgeModel", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgPolicyJudgeModelResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "policies" ], "summary": "Set/clear the org-level llm_judge model default", "operationId": "setOrgPolicyJudgeModel", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgPolicyJudgeModelUpdate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgPolicyJudgeModelResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/policies/evaluations": { "get": { "tags": [ "policies" ], "summary": "List policy evaluation audit rows (what enforcement happened, newest-first)", "operationId": "listPolicyEvaluations", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Conversation Id" } }, { "name": "policy_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Policy Id" } }, { "name": "result", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/PolicyEvaluationResult" }, { "type": "null" } ], "title": "Result" } }, { "name": "enforcement_point", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/PolicyEnforcementPoint" }, { "type": "null" } ], "title": "Enforcement Point" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_PolicyEvaluationResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/expression-schema": { "get": { "tags": [ "policies" ], "summary": "Describe the expression-check DSL (paths per point, predicates, operators)", "operationId": "getPolicyExpressionSchema", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExpressionSchemaResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/policies/capabilities": { "get": { "tags": [ "policies" ], "summary": "Describe the policy authoring cascade + per-transport runtime resolution", "operationId": "getPolicyCapabilities", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyCapabilitiesResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/policies/tool-schema": { "get": { "tags": [ "policies" ], "summary": "Resolve a tool's input/output schema for policy authoring", "operationId": "getPolicyToolSchema", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool", "in": "query", "required": true, "schema": { "type": "string", "description": "canonical tool key, e.g. api:", "title": "Tool" }, "description": "canonical tool key, e.g. api:" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyToolSchemaResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/{policy_id}": { "get": { "tags": [ "policies" ], "summary": "Get a policy", "operationId": "getPolicy", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "policies" ], "summary": "Update a policy's identity fields", "operationId": "updatePolicy", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "policies" ], "summary": "Delete a policy", "operationId": "deletePolicy", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/{policy_id}/revisions": { "post": { "tags": [ "policies" ], "summary": "Create a policy revision", "operationId": "createPolicyRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRevisionCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRevisionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "policies" ], "summary": "List policy revisions", "operationId": "listPolicyRevisions", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_PolicyRevisionResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/revisions/{revision_id}": { "get": { "tags": [ "policies" ], "summary": "Get a policy revision", "operationId": "getPolicyRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRevisionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "policies" ], "summary": "Delete a policy revision", "operationId": "deletePolicyRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/policies/{policy_id}/set-active-revision": { "post": { "tags": [ "policies" ], "summary": "Set active policy revision", "operationId": "setActivePolicyRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Policy Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetActivePolicyRevisionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyRevisionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/revisions/{revision_id}/policies": { "get": { "tags": [ "policies" ], "summary": "Get an assistant revision's attached policies", "operationId": "getAssistantRevisionPolicies", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyAttachmentResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "policies" ], "summary": "Attach/detach policies on an assistant revision", "operationId": "setAssistantRevisionPolicies", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyAttachmentUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyAttachmentResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "policies" ], "summary": "Detach all policies from an assistant revision", "operationId": "detachAssistantRevisionPolicies", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyAttachmentResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/enforcement-plan": { "get": { "tags": [ "policies" ], "summary": "Describe an assistant's policy enforcement plan (per point, per transport)", "operationId": "getAssistantEnforcementPlan", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnforcementPlanResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/teams": { "post": { "tags": [ "teams" ], "summary": "Create a team", "operationId": "createTeam", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "teams" ], "summary": "List teams", "operationId": "listTeams", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_TeamListResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/teams/{team_id}": { "get": { "tags": [ "teams" ], "summary": "Get a team", "operationId": "getTeam", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "teams" ], "summary": "Update a team", "operationId": "updateTeam", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "teams" ], "summary": "Delete a team", "operationId": "deleteTeam", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/teams/{team_id}/revisions": { "post": { "tags": [ "teams" ], "summary": "Create a team revision", "operationId": "createTeamRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamRevisionCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamRevisionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "teams" ], "summary": "List team revisions", "operationId": "listTeamRevisions", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_TeamRevisionResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/teams/revisions/{revision_id}": { "get": { "tags": [ "teams" ], "summary": "Get a team revision", "operationId": "getTeamRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamRevisionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/teams/{team_id}/set-active-revision": { "post": { "tags": [ "teams" ], "summary": "Set active team revision", "operationId": "setActiveTeamRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetActiveRevisionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamRevisionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/teams/revisions/{revision_id}/members": { "get": { "tags": [ "teams" ], "summary": "List members on a team revision", "operationId": "listTeamMembers", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TeamMemberResponse" }, "title": "Response Listteammembers" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "teams" ], "summary": "Add a member to a team revision", "operationId": "addTeamMember", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamMemberCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamMemberResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/teams/revisions/{revision_id}/members/{member_id}": { "put": { "tags": [ "teams" ], "summary": "Update a member on a team revision", "operationId": "updateTeamMember", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } }, { "name": "member_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Member Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamMemberUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamMemberResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "teams" ], "summary": "Remove a member from a team revision", "operationId": "removeTeamMember", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } }, { "name": "member_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Member Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/teams/{team_id}/call-settings": { "get": { "tags": [ "teams" ], "summary": "Get a team's voice call behavior settings", "description": "Return the team's canonical ``VoiceCallSettings``.\n\nTeam-scoped reads never consult the legacy VPC scalar columns: a\n``NULL``/empty JSON column means schema defaults. This is the LIVE value\neven while a saved config is linked \u2014 saved configs are pipeline-only and\nnever carry call behavior.", "operationId": "getTeamCallSettings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceCallSettings" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "teams" ], "summary": "Update a team's voice call behavior settings", "description": "Partially update voice call behavior settings on this team.\n\nUnset fields are left unchanged; the merged result is fully validated.\nThe write is strictly team-scoped (row-locked, actor-audited) \u2014 the\nruntime overlays this JSON onto the in-memory pipeline configuration at\ncall setup, so the (possibly saved/shared) VPC row is never mutated by a\nteam settings edit.", "operationId": "updateTeamCallSettings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceCallSettingsUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceCallSettings" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/scenarios": { "post": { "tags": [ "scenarios" ], "summary": "Create a scenario", "operationId": "createScenario", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScenarioCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScenarioResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "scenarios" ], "summary": "List scenarios", "operationId": "listScenarios", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "source", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/ScenarioSource" }, { "type": "null" } ], "title": "Source" } }, { "name": "source_agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Source Agent Id" } }, { "name": "source_persona_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Source Persona Id" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "tags", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ], "title": "Tags" } }, { "name": "created_after", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created After" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_ScenarioResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/scenarios/draft": { "post": { "tags": [ "scenarios" ], "summary": "Generate an unsaved scenario draft from a brief", "operationId": "draftScenario", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScenarioDraftRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScenarioDraft" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/scenarios/draft-from-session": { "post": { "tags": [ "scenarios" ], "summary": "Generate an unsaved scenario draft from a captured session", "operationId": "draftScenarioFromSession", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScenarioDraftFromSessionRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScenarioDraft" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/scenarios/{scenario_id}": { "get": { "tags": [ "scenarios" ], "summary": "Get a scenario", "operationId": "getScenario", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "scenario_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Scenario Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScenarioResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "scenarios" ], "summary": "Update a scenario", "operationId": "updateScenario", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "scenario_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Scenario Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScenarioUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScenarioResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "scenarios" ], "summary": "Delete a scenario", "operationId": "deleteScenario", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "scenario_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Scenario Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/sim-suites": { "post": { "tags": [ "sim_suites" ], "summary": "Create a simulation suite", "operationId": "createSimulationSuite", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "sim_suites" ], "summary": "List simulation suites", "description": "Suites are definitions that change slowly \u2014 a client-side cache of 30-60s is safe. No `ETag`/`Cache-Control` is emitted; always revalidate if you need certainty after a write.", "operationId": "listSimulationSuites", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "is_active", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" } }, { "name": "name_contains", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Name Contains" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_SimulationSuiteResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/sim-suites/runs": { "get": { "tags": [ "sim_suites" ], "summary": "List simulation suite runs across the org", "description": "Suite-run batches across the whole org, newest first \u2014 replaces fanning out one `GET /v1/sim-suites/{suite_id}/runs` call per suite. Each row inlines `suite_name` and swaps the per-suite endpoint's full child-run array for `counts`, so a page stays small. Live operational data: always revalidate. There is no `status` filter \u2014 the rollup is computed from child runs rather than stored, so filter on it client-side.", "operationId": "listAllSimulationSuiteRuns", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Suite Id" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_SimulationSuiteRunSummaryResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/sim-suites/{suite_id}": { "get": { "tags": [ "sim_suites" ], "summary": "Get a simulation suite", "operationId": "getSimulationSuite", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "sim_suites" ], "summary": "Update a simulation suite", "operationId": "updateSimulationSuite", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "sim_suites" ], "summary": "Delete a simulation suite", "operationId": "deleteSimulationSuite", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/sim-suites/{suite_id}/clone": { "post": { "tags": [ "sim_suites" ], "summary": "Clone a simulation suite", "operationId": "cloneSimulationSuite", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteCloneRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/sim-suites/{suite_id}/items": { "post": { "tags": [ "sim_suites" ], "summary": "Add an item to a simulation suite", "operationId": "addSimulationSuiteItem", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteItemCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteItemResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/sim-suites/{suite_id}/items/{item_id}": { "put": { "tags": [ "sim_suites" ], "summary": "Update a simulation suite item", "operationId": "updateSimulationSuiteItem", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } }, { "name": "item_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Item Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteItemUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteItemResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "sim_suites" ], "summary": "Remove a simulation suite item", "operationId": "removeSimulationSuiteItem", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } }, { "name": "item_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Item Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/sim-suites/{suite_id}/runs": { "post": { "tags": [ "sim_suites" ], "summary": "Dispatch a simulation suite run (fan-out per item)", "operationId": "dispatchSimulationSuiteRun", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteRunDispatch" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteRunResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "sim_suites" ], "summary": "List simulation suite runs for a suite", "operationId": "listSimulationSuiteRuns", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_SimulationSuiteRunResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/sim-suites/{suite_id}/runs/{suite_run_id}": { "get": { "tags": [ "sim_suites" ], "summary": "Get a simulation suite run with its child runs", "operationId": "getSimulationSuiteRun", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } }, { "name": "suite_run_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Run Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteRunResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/sim-suites/{suite_id}/runs/{suite_run_id}/cancel": { "post": { "tags": [ "sim_suites" ], "summary": "Cancel every non-terminal child of a suite run", "operationId": "cancelSimulationSuiteRun", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } }, { "name": "suite_run_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Run Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteRunResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/sim-suites/{suite_id}/runs/{suite_run_id}/retry-failed": { "post": { "tags": [ "sim_suites" ], "summary": "Re-dispatch every failed child of a suite run", "operationId": "retryFailedSimulationSuiteRun", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "suite_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Id" } }, { "name": "suite_run_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Suite Run Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationSuiteRunResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulation/runs": { "post": { "tags": [ "simulation_runs" ], "summary": "Dispatch a simulation run", "operationId": "dispatchSimulationRun", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationRunDispatch" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationRunResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "simulation_runs" ], "summary": "List simulation runs", "description": "Live operational data \u2014 always revalidate; do not rely on a client-side cache. Follow `next_cursor` to page; cursors stay valid across concurrent writes.", "operationId": "listSimulationRuns", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/SimulationRunStatus" }, { "type": "null" } ], "title": "Status" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/ScenarioChannel" }, { "type": "null" } ], "description": "Filter by run modality (`text` or `voice`).", "title": "Channel" }, "description": "Filter by run modality (`text` or `voice`)." }, { "name": "q", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "description": "Case-insensitive substring match on the agent, persona and scenario names, plus the run id (exact UUID, or an 8+ character id prefix). Names are matched against the **current** persona/scenario/agent records, while each row displays the names frozen at dispatch time, so a renamed entity is found by its new name.", "title": "Q" }, "description": "Case-insensitive substring match on the agent, persona and scenario names, plus the run id (exact UUID, or an 8+ character id prefix). Names are matched against the **current** persona/scenario/agent records, while each row displays the names frozen at dispatch time, so a renamed entity is found by its new name." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_SimulationRunResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulation/runs/{sim_run_id}": { "get": { "tags": [ "simulation_runs" ], "summary": "Get a simulation run", "operationId": "getSimulationRun", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "sim_run_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Sim Run Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationRunResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulation/runs/{sim_run_id}/cancel": { "post": { "tags": [ "simulation_runs" ], "summary": "Cancel a simulation run", "description": "Cooperatively cancels a pending or running simulation run: the row is marked `cancelled` and the worker's Celery task is best-effort revoked. The database is the source of truth \u2014 the worker re-reads the row before every terminal write, so a missed revoke signal is safe.\n\nIdempotent: a run that has already reached a terminal status is returned unchanged with 200, so this is safe to call twice.", "operationId": "cancelSimulationRun", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "sim_run_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Sim Run Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimulationRunResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulation/runs/{sim_run_id}/trace": { "get": { "tags": [ "simulation_runs" ], "summary": "Get the customer-readable trace for a simulation run", "operationId": "getSimulationRunTrace", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "sim_run_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Sim Run Id" } }, { "name": "turn_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Turn Id" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "category", "in": "query", "required": false, "schema": { "enum": [ "product", "engineering", "all" ], "type": "string", "default": "product", "title": "Category" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionTraceResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/simulation/runs/{sim_run_id}/turns/{turn_id}/trace": { "get": { "tags": [ "simulation_runs" ], "summary": "Get the customer-readable trace for one turn of a simulation run", "operationId": "getSimulationRunTurnTrace", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "sim_run_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Sim Run Id" } }, { "name": "turn_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Turn Id" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "category", "in": "query", "required": false, "schema": { "enum": [ "product", "engineering", "all" ], "type": "string", "default": "product", "title": "Category" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionTraceResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluators": { "post": { "tags": [ "evals", "evals" ], "summary": "Create an evaluator", "operationId": "createEvaluator", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluatorCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluatorResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "evals", "evals" ], "summary": "List evaluators", "description": "Evaluators are definitions that change slowly \u2014 a client-side cache of 30-60s is safe. No `ETag`/`Cache-Control` is emitted; always revalidate if you need certainty after a write.", "operationId": "listEvaluators", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kind", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "model_judge", "deterministic" ], "type": "string" }, { "type": "null" } ], "title": "Kind" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "active", "inactive", "archived" ], "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "tag", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tag" } }, { "name": "name_contains", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "description": "Case-insensitive substring match on the evaluator name.", "title": "Name Contains" }, "description": "Case-insensitive substring match on the evaluator name." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_EvaluatorResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluators/{evaluator_id}": { "get": { "tags": [ "evals", "evals" ], "summary": "Get an evaluator", "operationId": "getEvaluator", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "evaluator_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluator Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluatorResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "evals", "evals" ], "summary": "Update an evaluator", "operationId": "updateEvaluator", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "evaluator_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluator Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluatorUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluatorResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluators/{evaluator_id}/archive": { "post": { "tags": [ "evals", "evals" ], "summary": "Archive an evaluator", "operationId": "archiveEvaluator", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "evaluator_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Evaluator Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluatorResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluator-bindings": { "post": { "tags": [ "evals", "evals" ], "summary": "Create an evaluator binding", "operationId": "createEvaluatorBinding", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluatorBindingCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluatorBindingResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "evals", "evals" ], "summary": "List evaluator bindings", "operationId": "listEvaluatorBindings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "evaluator_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Evaluator Id" } }, { "name": "scope", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "scenario", "agent" ], "type": "string" }, { "type": "null" } ], "title": "Scope" } }, { "name": "scenario_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Scenario Id" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_EvaluatorBindingResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evaluator-bindings/{binding_id}": { "get": { "tags": [ "evals", "evals" ], "summary": "Get an evaluator binding", "operationId": "getEvaluatorBinding", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "binding_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Binding Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluatorBindingResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "evals", "evals" ], "summary": "Update an evaluator binding", "operationId": "updateEvaluatorBinding", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "binding_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Binding Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluatorBindingUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvaluatorBindingResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "evals", "evals" ], "summary": "Delete an evaluator binding", "operationId": "deleteEvaluatorBinding", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "binding_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Binding Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/eval-runs": { "get": { "tags": [ "evals", "evals" ], "summary": "List eval runs", "description": "Live operational data \u2014 always revalidate; do not rely on a client-side cache. Follow `next_cursor` to page; cursors stay valid across concurrent writes. Note that filters derived from other tables (`outcome`, `score_min`/`score_max`) are re-evaluated per page, so a run whose scores land mid-walk can be missed \u2014 it can never be returned twice.", "operationId": "listEvalRuns", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" } }, { "name": "evaluator_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Evaluator Id" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "pending", "running", "completed", "failed", "errored" ], "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "scope", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "live", "simulation", "test" ], "type": "string" }, { "type": "null" } ], "title": "Scope" } }, { "name": "outcome", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "passed", "failed", "no_verdict", "errored" ], "type": "string" }, { "type": "null" } ], "title": "Outcome" } }, { "name": "score_min", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "number", "maximum": 1, "minimum": 0 }, { "type": "null" } ], "description": "Min normalized score, matched against EvalScore.value [0,1]. numeric-format evaluators store their signal in raw_value (value is null), so they are not matched by score_min/score_max.", "title": "Score Min" }, "description": "Min normalized score, matched against EvalScore.value [0,1]. numeric-format evaluators store their signal in raw_value (value is null), so they are not matched by score_min/score_max." }, { "name": "score_max", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "number", "maximum": 1, "minimum": 0 }, { "type": "null" } ], "description": "Max normalized score [0,1]; see score_min re: numeric evaluators.", "title": "Score Max" }, "description": "Max normalized score [0,1]; see score_min re: numeric evaluators." }, { "name": "severity", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "info", "low", "medium", "high", "critical" ], "type": "string" }, { "type": "null" } ], "title": "Severity" } }, { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" } }, { "name": "created_from", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created From" } }, { "name": "created_to", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created To" } }, { "name": "is_critical", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Filter on the run's `is_critical_snapshot`. Omit for all runs; `false` returns non-critical runs only.", "title": "Is Critical" }, "description": "Filter on the run's `is_critical_snapshot`. Omit for all runs; `false` returns non-critical runs only." }, { "name": "q", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "description": "Case-insensitive substring match on the agent and evaluator names, plus the run / session / agent / evaluator ids (exact UUID, or an 8+ character id prefix). Runs whose `agent_id` is null (legacy rows) cannot be matched by agent name.", "title": "Q" }, "description": "Case-insensitive substring match on the agent and evaluator names, plus the run / session / agent / evaluator ids (exact UUID, or an 8+ character id prefix). Runs whose `agent_id` is null (legacy rows) cannot be matched by agent name." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_EvalRunResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/eval-runs/activity": { "get": { "tags": [ "evals", "evals" ], "summary": "Day-bucketed eval-run activity", "description": "One row per **UTC** day over the requested window, for the activity calendar \u2014 so a 12-month chart costs ~365 small rows instead of every raw eval run. Every day is present, including zero days. `failed` uses the same definition as `GET /v1/eval-runs?outcome=failed` (a completed run with at least one failing score), so clicking a cell and drilling into the list agrees with the chart. Server-side cached for 60s; the window is capped at 400 days.", "operationId": "getEvalRunActivity", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "created_from", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Inclusive lower bound; defaults to 365 days ago.", "title": "Created From" }, "description": "Inclusive lower bound; defaults to 365 days ago." }, { "name": "created_to", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "description": "Upper bound; defaults to now. A date-only value (midnight) includes that whole day, matching the list endpoint.", "title": "Created To" }, "description": "Upper bound; defaults to now. A date-only value (midnight) includes that whole day, matching the list endpoint." }, { "name": "scope", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "live", "simulation", "test" ], "type": "string" }, { "type": "null" } ], "title": "Scope" } }, { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" } }, { "name": "evaluator_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Evaluator Id" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvalActivityResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/eval-runs/{run_id}": { "get": { "tags": [ "evals", "evals" ], "summary": "Get an eval run (optionally with embedded evidence)", "description": "Read one eval run. With no ``include`` the response is the shallow\nrun+scores shape (back-compat); each ``include`` token adds the matching\nevidence section. Unknown tokens are ignored. Cross-org/unknown \u2192 404.", "operationId": "getEvalRun", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Run Id" } }, { "name": "include", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "comma-separated evidence to embed: session,turns,recording", "title": "Include" }, "description": "comma-separated evidence to embed: session,turns,recording" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvalRunDetailResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "evals", "evals" ], "summary": "Delete a terminal eval run", "description": "Hard-delete a terminal eval run; its scores cascade (ORM\n``delete-orphan`` + DB FK ``ON DELETE CASCADE``).\n\nTerminal-only **allow-list**: rejects (409) anything not\n``completed``/``failed``/``errored`` \u2014 so pending/running and any future\nnon-terminal state are blocked. Cross-org/unknown \u2192 404. ``get_session()``\nauto-commits on success.", "operationId": "deleteEvalRun", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Run Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/eval-runs/{run_id}/retry": { "post": { "tags": [ "evals", "evals" ], "summary": "Retry a failed or errored eval run", "operationId": "retryEvalRun", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Run Id" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvalTaskAcceptedResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/eval-scores/{score_id}": { "get": { "tags": [ "evals", "evals" ], "summary": "Get an eval score", "operationId": "getEvalScore", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "score_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Score Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvalScoreResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/evals/signals": { "get": { "tags": [ "evals", "evals" ], "summary": "List deterministic signals available to evaluators", "description": "Closed catalog of signals a deterministic evaluator can be bound to.\n\nDrives the frontend's signal-picker UI when creating an evaluator with\n``kind='deterministic'``. Sourced from the in-process probe registry \u2014\nno DB hit.", "operationId": "listEvalSignals", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignalCatalogResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/evals/synthesize-failure": { "post": { "tags": [ "evals", "evals" ], "summary": "(dev only) Fabricate failing eval runs and fire the real eval.failed emitter", "description": "Fabricate failing eval runs for an agent and run the REAL ENG-604 emitter.\n\nExercises the full classification/escalation/digest/dedupe-key path that plain\n``test-send`` bypasses: builds the ``eval.failed`` payload exactly as the eval\norchestrator would, then enqueues ``dispatch`` (the notify Celery task) \u2014 so a\nbackground worker is required for the message to actually deliver.", "operationId": "synthesizeEvalFailure", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SynthesizeEvalFailureRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SynthesizeEvalFailureResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/sessions/{session_id}/reevaluate": { "post": { "tags": [ "evals", "evals" ], "summary": "Re-run all current evaluator bindings against a session", "description": "Wipe all existing EvalRuns for this session and re-run the currently\nbound evaluators with fresh snapshots. Rejects (409) when any run for\nthe session is in ``pending`` or ``running`` \u2014 caller should wait for\nthose to terminate first to avoid orphaning an in-flight worker.", "operationId": "reevaluateSession", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvalTaskAcceptedResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/library/personas": { "post": { "tags": [ "library" ], "summary": "Add a persona to the global library (Feather staff only)", "operationId": "createLibraryPersona", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LibraryPersonaCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LibraryPersonaResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "library" ], "summary": "Browse the persona library", "operationId": "listLibraryPersonas", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tag", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tag" } }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_LibraryPersonaResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/library/personas/{persona_id}": { "get": { "tags": [ "library" ], "summary": "Get a library persona", "operationId": "getLibraryPersona", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LibraryPersonaResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "library" ], "summary": "Update a library persona (Feather staff only)", "operationId": "updateLibraryPersona", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LibraryPersonaUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LibraryPersonaResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "library" ], "summary": "Delete a library persona (Feather staff only)", "operationId": "deleteLibraryPersona", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/library/personas/{persona_id}/install": { "post": { "tags": [ "library" ], "summary": "Install a library persona into the caller's workspace", "operationId": "installLibraryPersona", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstallPersonaRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/library/personas/{persona_id}/voice-config": { "post": { "tags": [ "library" ], "summary": "Attach a voice preset to a library persona (Feather staff only)", "operationId": "createLibraryPersonaVoiceConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LibraryVoiceConfigCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoicePipelineConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "library" ], "summary": "Get the voice preset attached to a library persona", "operationId": "getLibraryPersonaVoiceConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoicePipelineConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "library" ], "summary": "Update the voice preset on a library persona (Feather staff only)", "operationId": "updateLibraryPersonaVoiceConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoicePipelineConfigUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoicePipelineConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "library" ], "summary": "Detach the voice preset from a library persona (Feather staff only)", "operationId": "deleteLibraryPersonaVoiceConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/library/personas/{persona_id}/call-settings": { "get": { "tags": [ "library" ], "summary": "Get a library persona's voice call behavior settings", "description": "Return the library persona's canonical ``VoiceCallSettings``\n(``NULL``/empty JSON means schema defaults \u2014 never a legacy-column read).", "operationId": "getLibraryPersonaCallSettings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceCallSettings" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "library" ], "summary": "Update a library persona's voice call behavior settings (Feather staff only)", "description": "Partially update a library persona's voice call behavior settings.\n\nRow-locked and actor-audited; library installs copy this JSON onto the\npersona installed into the caller's org.", "operationId": "updateLibraryPersonaCallSettings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceCallSettingsUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceCallSettings" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/privacy/config": { "get": { "tags": [ "privacy" ], "summary": "Get privacy config for organization (creates defaults if none)", "operationId": "getPrivacyConfig", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrivacyConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "privacy" ], "summary": "Upsert privacy config for organization", "operationId": "upsertPrivacyConfig", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrivacyConfigUpsert" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrivacyConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "delete": { "tags": [ "privacy" ], "summary": "Delete privacy config (reverts to defaults)", "operationId": "deletePrivacyConfig", "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/privacy/audit-logs": { "get": { "tags": [ "privacy" ], "summary": "List PII scrub audit events", "operationId": "listPrivacyAuditLogs", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "from", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "From" } }, { "name": "to", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "To" } }, { "name": "source", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "conversation_turn", "memory_sync", "voice_call" ], "type": "string" }, { "type": "null" } ], "title": "Source" } }, { "name": "entity_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Entity Type" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_PIIScrubLogResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/privacy/audit-stats": { "get": { "tags": [ "privacy" ], "summary": "Aggregate PII scrub stats", "operationId": "getPrivacyAuditStats", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "from", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "From" } }, { "name": "to", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "To" } }, { "name": "bucket", "in": "query", "required": false, "schema": { "enum": [ "day", "hour" ], "type": "string", "default": "day", "title": "Bucket" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuditStatsResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/communication/phone-numbers": { "post": { "tags": [ "communication" ], "summary": "Register an org phone number", "operationId": "createPhoneNumber", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PhoneNumberCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PhoneNumberResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "communication" ], "summary": "List org phone numbers", "operationId": "listPhoneNumbers", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "capability", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Capability" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PhoneNumberResponse" }, "title": "Response Listphonenumbers" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/communication/phone-numbers/{phone_number_id}": { "get": { "tags": [ "communication" ], "summary": "Get a phone number by id (org-scoped)", "operationId": "getPhoneNumber", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "phone_number_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Phone Number Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PhoneNumberResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "communication" ], "summary": "Update a phone number", "operationId": "updatePhoneNumber", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "phone_number_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Phone Number Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PhoneNumberUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PhoneNumberResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "communication" ], "summary": "Retire a phone number (soft, default) or hard-delete (force=true, internal only)", "description": "Retire (default) or hard-delete (``force=true``, internal only) a\nphone number.\n\nDefault \u2014 soft-retire (ENG-847, HV-17): flips status to RETIRED, tears\ndown per-number SIP infra best-effort, stamps actor/timestamp, and keeps\nthe row and every dependent evidence row (SMS/voice usage, and the\nENG-846 durable chunk/attempt/outbox/operation chain) intact. This is\nnow the day-to-day, audited, reversible path (see ``.../restore``).\n\n``force=true`` is the internal-only escape hatch that performs the\nactual, permanent hard delete (evidence-safe: dependent SMS/voice usage\nrows detach via ``ON DELETE SET NULL`` rather than cascading away) \u2014 the\nexplicit, policy-driven purge, not an accidental cascade. Non-internal\ncallers that pass ``force=true`` are rejected with 403.", "operationId": "deletePhoneNumber", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "phone_number_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Phone Number Id" } }, { "name": "force", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Force" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/communication/phone-numbers/{phone_number_id}/restore": { "post": { "tags": [ "communication" ], "summary": "Restore a retired phone number to active", "operationId": "restorePhoneNumber", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "phone_number_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Phone Number Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PhoneNumberResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/communication/phone-numbers/{phone_number_id}/channels": { "post": { "tags": [ "communication" ], "summary": "Bind an agent or team to a channel on a phone number", "operationId": "addPhoneNumberChannel", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "phone_number_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Phone Number Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChannelCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChannelResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "communication" ], "summary": "List channel bindings for a phone number", "operationId": "listPhoneNumberChannels", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "phone_number_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Phone Number Id" } }, { "name": "channel_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel Type" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ChannelResponse" }, "title": "Response Listphonenumberchannels" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/communication/phone-numbers/{phone_number_id}/channels/{channel_id}": { "delete": { "tags": [ "communication" ], "summary": "Remove a channel binding", "operationId": "removePhoneNumberChannel", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "phone_number_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Phone Number Id" } }, { "name": "channel_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Channel Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/communication/phone-numbers/{phone_number_id}/channels/{channel_type}": { "put": { "tags": [ "communication" ], "summary": "Replace the full binding set for a channel on a phone number", "operationId": "replacePhoneNumberChannelBindings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "phone_number_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Phone Number Id" } }, { "name": "channel_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Channel Type" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChannelBindingsReplace" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ChannelResponse" }, "title": "Response Replacephonenumberchannelbindings" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/communication/compliance": { "get": { "tags": [ "communication" ], "summary": "Get the org's compliance settings (creates default on first read)", "operationId": "getCompliance", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplianceResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "communication" ], "summary": "Update the org's allowed-countries list", "operationId": "updateCompliance", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplianceUpdate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplianceResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/sms/send": { "post": { "tags": [ "sms" ], "summary": "Send an outbound SMS (queued; delivered asynchronously)", "operationId": "sendSms", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendSmsRequest" } } }, "required": true }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendSmsResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "idempotency_key already used with a different request (destination, body, media, or agent)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/sms/operations/{operation_id}": { "get": { "tags": [ "sms" ], "summary": "Get an SMS outbound operation's full delivery/reconciliation tree", "operationId": "getSmsOperation", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "operation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Operation Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SmsOutboundOperationDetail" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/sms/operations": { "get": { "tags": [ "sms" ], "summary": "List SMS outbound operations for a session", "operationId": "listSmsOperations", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_SmsOutboundOperationSummary_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/sms/settings": { "get": { "tags": [ "sms" ], "summary": "Get the org's SMS settings", "operationId": "getSmsSettings", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SmsSettingsResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "sms" ], "summary": "Update the org's SMS settings (partial)", "operationId": "updateSmsSettings", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SmsSettingsUpdateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SmsSettingsResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/email/accounts/connect": { "post": { "tags": [ "email" ], "summary": "Begin connecting a mailbox via the hosted-auth flow", "operationId": "connectEmailMailbox", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectMailboxRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectMailboxResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/email/accounts": { "get": { "tags": [ "email" ], "summary": "List connected mailboxes for the caller's organization", "operationId": "listEmailMailboxes", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListMailboxAccountsResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/email/accounts/{account_id}": { "delete": { "tags": [ "email" ], "summary": "Revoke the mailbox grant and retire the local row", "operationId": "disconnectEmailMailbox", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "account_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Account Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "email" ], "summary": "Update mutable mailbox settings (e.g., default signature)", "description": "Partial-update endpoint. Only fields present in the request body\nare applied \u2014 omitted keys leave the row unchanged. Explicit\n``null`` on ``default_signature_html`` clears the signature.\n\nRebind path: when ``agent_id`` or ``team_id`` is present in the body,\nthe mailbox binding is updated in place (no OAuth re-run). At most one\nof the two may be set (the schema validator enforces it); an explicit\n``null`` on a present key clears that side of the binding.", "operationId": "updateEmailMailbox", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "account_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Account Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMailboxAccountRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MailboxAccountResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/email/drafts": { "post": { "tags": [ "email-drafts" ], "summary": "Author a new outbound email draft", "operationId": "createEmailDraft", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDraftRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DraftResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "email-drafts" ], "summary": "List drafts for the caller's organization", "operationId": "listEmailDrafts", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/DraftStatus" }, { "type": "null" } ], "title": "Status" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListDraftsResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/email/drafts/{draft_id}": { "get": { "tags": [ "email-drafts" ], "summary": "Read one draft, including its ENG-420 audit snapshot when present", "operationId": "getEmailDraft", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Draft Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DraftResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "email-drafts" ], "summary": "Edit a draft (only allowed while status='draft')", "operationId": "updateEmailDraft", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Draft Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateDraftRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DraftResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "email-drafts" ], "summary": "Soft-discard a draft (forbidden once dispatch has started)", "operationId": "discardEmailDraft", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Draft Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/email/drafts/{draft_id}/approve": { "post": { "tags": [ "email-drafts" ], "summary": "Approve a draft and dispatch it. The caller's OrgMember is recorded as the approver; the SendOrchestrator runs immediately.", "operationId": "approveEmailDraft", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "draft_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Draft Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DraftResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/email/threads/{thread_id}": { "post": { "tags": [ "email" ], "summary": "Ingest a canonical EmailInboundEvent for the given thread. Bypasses the vendor webhook; used by sandbox / replay / direct integrators.", "description": "Canonical ingest endpoint.\n\nThe path's ``{thread_id}`` and the body's\n``event.provider_thread_id`` must match \u2014 defense against\naccidentally (or maliciously) posting an event whose body claims a\ndifferent thread than the URL.", "operationId": "ingestEmailThread", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Thread Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IngestEmailThreadRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IngestEmailThreadResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "email" ], "summary": "Read an email thread by Nylas provider_thread_id", "operationId": "getEmailThread", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Thread Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThreadResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/email/messages/{message_id}/events": { "get": { "tags": [ "email" ], "summary": "Delivery event audit trail for a single email message", "description": "Path param is the Nylas ``provider_message_id``. Org-scoping\nhappens via the JOIN to ``EmailChannelAccount`` inside the service.", "operationId": "listEmailMessageEvents", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Message Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListMessageEventsResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/configs": { "post": { "tags": [ "voice" ], "summary": "Create a voice pipeline config for an agent or persona (1:1)", "operationId": "createVoicePipelineConfig", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoicePipelineConfigCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoicePipelineConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "voice" ], "summary": "List voice pipeline configs for the org", "operationId": "listVoicePipelineConfigs", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "team_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" } }, { "name": "persona_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Persona Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/VoicePipelineConfigResponse" }, "title": "Response Listvoicepipelineconfigs" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/configs/{config_id}": { "get": { "tags": [ "voice" ], "summary": "Get a voice pipeline config by id", "operationId": "getVoicePipelineConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Config Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoicePipelineConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "voice" ], "summary": "Partial update of a voice pipeline config", "operationId": "updateVoicePipelineConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Config Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoicePipelineConfigUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoicePipelineConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "voice" ], "summary": "Delete a voice pipeline config", "operationId": "deleteVoicePipelineConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Config Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/saved-configs": { "get": { "tags": [ "voice" ], "summary": "List saved voice configs for the org", "operationId": "listSavedVoiceConfigs", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/VoicePipelineConfigResponse" }, "type": "array", "title": "Response Listsavedvoiceconfigs" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "post": { "tags": [ "voice" ], "summary": "Create a reusable named voice config", "operationId": "createSavedVoiceConfig", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedVoiceConfigCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoicePipelineConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/voice/saved-configs/{config_id}": { "get": { "tags": [ "voice" ], "summary": "Get a saved voice config by id", "operationId": "getSavedVoiceConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Config Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoicePipelineConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "voice" ], "summary": "Partial update of a saved voice config", "operationId": "updateSavedVoiceConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Config Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedVoiceConfigUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoicePipelineConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "voice" ], "summary": "Delete a saved voice config", "operationId": "deleteSavedVoiceConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "config_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Config Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/assistants/{agent_id}/voice-config": { "get": { "tags": [ "voice" ], "summary": "Get the effective voice pipeline config for an assistant (inline or saved)", "operationId": "getVoicePipelineConfigForAgent", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentVoiceConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/assistants/{agent_id}/voice-config-source": { "put": { "tags": [ "voice" ], "summary": "Set the voice source (saved config link) for an assistant", "operationId": "setAgentVoiceSource", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentVoiceSourceRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentVoiceConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/assistants/{agent_id}/voice-config/detach": { "post": { "tags": [ "voice" ], "summary": "Detach an assistant from a saved config into an inline copy", "operationId": "detachAgentVoiceConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentVoiceConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/teams/{team_id}/voice-config": { "get": { "tags": [ "voice" ], "summary": "Get the effective voice pipeline config for a team (inline or saved)", "operationId": "getVoicePipelineConfigForTeam", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamVoiceConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/teams/{team_id}/voice-config-source": { "put": { "tags": [ "voice" ], "summary": "Set the voice source (saved config link) for a team", "operationId": "setTeamVoiceSource", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentVoiceSourceRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamVoiceConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/teams/{team_id}/voice-config/detach": { "post": { "tags": [ "voice" ], "summary": "Detach a team from a saved config into an inline copy", "operationId": "detachTeamVoiceConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Team Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamVoiceConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/personas/{persona_id}/voice-config": { "get": { "tags": [ "voice" ], "summary": "Get the voice pipeline config for a persona", "operationId": "getVoicePipelineConfigForPersona", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "persona_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Persona Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoicePipelineConfigResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/call-window": { "get": { "tags": [ "voice" ], "summary": "Get the org's outbound calling-hours window", "operationId": "getCallWindow", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallWindowSettings" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "voice" ], "summary": "Set the org's outbound calling-hours window", "operationId": "updateCallWindow", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallWindowSettings" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallWindowSettings" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/voice/call-expiry": { "get": { "tags": [ "voice" ], "summary": "Get the org's queued-call expiry TTL", "operationId": "getCallExpiry", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallExpirySettings" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "voice" ], "summary": "Set the org's queued-call expiry TTL", "operationId": "updateCallExpiry", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallExpirySettings" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallExpirySettings" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/voice/holiday-calendar": { "get": { "tags": [ "voice" ], "summary": "Get the org's outbound holiday calendar", "operationId": "getHolidayCalendar", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HolidayCalendarSettings" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "voice" ], "summary": "Set the org's outbound holiday calendar", "operationId": "updateHolidayCalendar", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HolidayCalendarSettings" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HolidayCalendarSettings" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/voice/outbound/controls": { "get": { "tags": [ "voice" ], "summary": "Get the org's outbound pause/cancel control state", "operationId": "getOutboundControls", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutboundControlsResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/voice/outbound/pause": { "post": { "tags": [ "voice" ], "summary": "Pause outbound dialing for the org, an agent, or a team", "operationId": "pauseOutbound", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PauseRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutboundControlsResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/voice/outbound/resume": { "post": { "tags": [ "voice" ], "summary": "Resume outbound dialing for the org, an agent, or a team", "operationId": "resumeOutbound", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PauseRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutboundControlsResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/voice/outbound/cancel": { "post": { "tags": [ "voice" ], "summary": "Cancel the queued outbound backlog for the org, an agent, or a team", "operationId": "cancelOutbound", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CancelRequest" } } }, "required": true }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkCancelAccepted" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/voice/outbound/queued": { "get": { "tags": [ "voice" ], "summary": "List queued outbound calls (optionally filtered by agent/team/paused)", "operationId": "listQueuedCalls", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Filter to a single bound agent.", "title": "Agent Id" }, "description": "Filter to a single bound agent." }, { "name": "team_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "description": "Filter to a single bound team.", "title": "Team Id" }, "description": "Filter to a single bound team." }, { "name": "paused", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "True \u2192 only paused calls; False \u2192 only actively-queued calls.", "title": "Paused" }, "description": "True \u2192 only paused calls; False \u2192 only actively-queued calls." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_QueuedCall_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/outbound/queued/{conversation_id}/cancel": { "post": { "tags": [ "voice" ], "summary": "Cancel a single queued outbound call", "operationId": "cancelQueuedCall", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueuedCallActionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/outbound/queued/{conversation_id}/pause": { "post": { "tags": [ "voice" ], "summary": "Pause a single queued outbound call", "operationId": "pauseQueuedCall", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueuedCallActionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/outbound/queued/{conversation_id}/resume": { "post": { "tags": [ "voice" ], "summary": "Resume a single paused outbound call", "operationId": "resumeQueuedCall", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueuedCallActionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/outbound/attempts/{attempt_id}/replay": { "post": { "tags": [ "voice" ], "summary": "Replay a poison-terminalized delivery attempt after an operator repair", "operationId": "replayDispatchAttempt", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "attempt_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Attempt Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttemptReplayResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/voices": { "get": { "tags": [ "voice" ], "summary": "List Voices", "operationId": "list_voices_v1_voice_voices_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "elevenlabs", "inworld" ], "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "language", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 16 }, { "type": "null" } ], "title": "Language" } }, { "name": "is_active", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "title": "Is Active" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/voices/{voice_id}": { "get": { "tags": [ "voice" ], "summary": "Get Voice", "operationId": "get_voice_v1_voice_voices__voice_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "voice_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Voice Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/tts-models": { "get": { "tags": [ "voice" ], "summary": "List Tts Models", "operationId": "list_tts_models_v1_voice_tts_models_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "elevenlabs", "inworld" ], "type": "string" }, { "type": "null" } ], "title": "Provider" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TTSModelListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/stt-models": { "get": { "tags": [ "voice" ], "summary": "List Stt Models", "operationId": "list_stt_models_v1_voice_stt_models_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ], "title": "Provider" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/STTModelListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/recordings/{recording_id}/playback-url": { "get": { "tags": [ "voice" ], "summary": "Get Recording Playback Url", "operationId": "get_recording_playback_url_v1_voice_recordings__recording_id__playback_url_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "recording_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Recording Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecordingPlaybackResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/warm-transfer/{conversation_id}/transfer-detail": { "get": { "tags": [ "voice" ], "summary": "Get Warm Transfer Detail", "description": "Consult recording (File B) + scrubbed consult transcript.", "operationId": "get_warm_transfer_detail_v1_voice_warm_transfer__conversation_id__transfer_detail_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Conversation Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransferDetailResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/voice/outbound": { "post": { "tags": [ "voice" ], "summary": "Outbound", "operationId": "outbound_v1_voice_outbound_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutboundRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutboundResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/voice/web-call": { "post": { "tags": [ "voice" ], "summary": "Web Call", "description": "Mint a LiveKit access token + auto-dispatch directive for a browser call.\n\nThe browser passes the returned ``access_token`` to ``livekit-client``'s\n``connect(livekit_url, access_token)``. LiveKit creates the room and\nauto-dispatches the voice-worker into it. The selected agent-or-team\nbinding is JWT-signed and tamper-proof. A single-agent call uses the\nagent's active revision, or ``assistant_revision_id`` when the caller pins\na draft; a team call pins the current active team revision and its roster.\nAn unpinned member still follows that member's active assistant revision\nwhen the call's turn plan resolves. The session is created\nwith ``session_type=\"test\"`` so post-processing is gated by\n``test_features`` (see ``src.conversation.test_features``).\n\nThis route is reachable by an org-scoped API key (unlike ``/test-chat``,\nwhich is dashboard/Clerk-only) \u2014 it depends only on\n``Permission.RUNTIME_EXECUTE``. So identity resolution + policy is\nresolved HERE, in the router, rather than in the voice service, which is\ndeliberately auth-free: ``resolve_test_features`` raises ``ValidationError``\n(422) up front for a bad/team-incompatible request, and\n``select_test_session_end_user`` raises ``ValidationError`` (422) when\n``identity_resolution=true`` and the caller (e.g. an API key) has no\n``clerk_user_id`` \u2014 both short-circuit before any LiveKit work.", "operationId": "web_call_v1_voice_web_call_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebCallRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebCallResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/analytics/tools/usage/timeseries": { "get": { "tags": [ "analytics" ], "summary": "Tool invocations bucketed over time", "operationId": "getToolUsageTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "tool_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Type" } }, { "name": "tool_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__tools__schemas__InvocationsTimeseriesRow" }, "title": "Response Gettoolusagetimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/usage/by-type": { "get": { "tags": [ "analytics" ], "summary": "Tool invocations grouped by tool_type", "operationId": "getToolUsageByType", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/InvocationsByTypeRow" }, "title": "Response Gettoolusagebytype" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/usage/by-tool": { "get": { "tags": [ "analytics" ], "summary": "Top-N tools by invocation count", "operationId": "getToolUsageByTool", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Type" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 10, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/InvocationsByToolRow" }, "title": "Response Gettoolusagebytool" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/usage/by-agent": { "get": { "tags": [ "analytics" ], "summary": "Tool invocations grouped by agent_id", "operationId": "getToolUsageByAgent", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/InvocationsByAgentRow" }, "title": "Response Gettoolusagebyagent" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/usage/unique-conversations": { "get": { "tags": [ "analytics" ], "summary": "Distinct conversations per tool", "operationId": "getToolUniqueConversations", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UniqueConversationsRow" }, "title": "Response Gettooluniqueconversations" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/performance/timeseries": { "get": { "tags": [ "analytics" ], "summary": "Latency percentiles bucketed over time", "operationId": "getToolPerformanceTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "tool_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Type" } }, { "name": "tool_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__tools__schemas__LatencyTimeseriesRow" }, "title": "Response Gettoolperformancetimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/performance/by-tool": { "get": { "tags": [ "analytics" ], "summary": "Top-N slowest tools by p95", "operationId": "getToolPerformanceByTool", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Type" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 10, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LatencyByToolRow" }, "title": "Response Gettoolperformancebytool" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/performance/distribution": { "get": { "tags": [ "analytics" ], "summary": "Latency histogram across fixed buckets", "operationId": "getToolPerformanceDistribution", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LatencyDistributionRow" }, "title": "Response Gettoolperformancedistribution" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/performance/by-provider": { "get": { "tags": [ "analytics" ], "summary": "Latency percentiles grouped by provider", "operationId": "getToolPerformanceByProvider", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LatencyByProviderRow" }, "title": "Response Gettoolperformancebyprovider" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/performance/retry-analysis": { "get": { "tags": [ "analytics" ], "summary": "Per-retry-count breakdown with avg/p95 latency", "operationId": "getToolPerformanceRetryAnalysis", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RetryAnalysisRow" }, "title": "Response Gettoolperformanceretryanalysis" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/reliability/success-rate-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Success rate (%) bucketed over time", "operationId": "getToolReliabilitySuccessRateTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "tool_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Type" } }, { "name": "tool_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__tools__schemas__SuccessRateTimeseriesRow" }, "title": "Response Gettoolreliabilitysuccessratetimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/reliability/error-breakdown": { "get": { "tags": [ "analytics" ], "summary": "Failed-invocation count grouped by error_category", "operationId": "getToolReliabilityErrorBreakdown", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Type" } }, { "name": "tool_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__tools__schemas__ErrorBreakdownRow" }, "title": "Response Gettoolreliabilityerrorbreakdown" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/reliability/error-breakdown-by-status": { "get": { "tags": [ "analytics" ], "summary": "Failed-invocation count grouped by HTTP status_code", "operationId": "getToolReliabilityErrorBreakdownByStatus", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Type" } }, { "name": "tool_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ErrorBreakdownByStatusRow" }, "title": "Response Gettoolreliabilityerrorbreakdownbystatus" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/reliability/ranking": { "get": { "tags": [ "analytics" ], "summary": "Per-tool success rate ranked worst-first", "operationId": "getToolReliabilityRanking", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Type" } }, { "name": "min_invocations", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 10, "title": "Min Invocations" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ReliabilityRankingRow" }, "title": "Response Gettoolreliabilityranking" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/reliability/error-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Error count over time, split by error_category", "operationId": "getToolReliabilityErrorTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "tool_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" } }, { "name": "error_category", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Category" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__tools__schemas__ErrorTimeseriesRow" }, "title": "Response Gettoolreliabilityerrortimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/reliability/error-trend": { "get": { "tags": [ "analytics" ], "summary": "Current vs previous window error-rate comparison", "operationId": "getToolReliabilityErrorTrend", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ErrorTrendRow" }, "title": "Response Gettoolreliabilityerrortrend" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/reliability/timeout-analysis": { "get": { "tags": [ "analytics" ], "summary": "Per-tool timeout rate and latency tail", "operationId": "getToolReliabilityTimeoutAnalysis", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Id" } }, { "name": "min_invocations", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 10, "title": "Min Invocations" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TimeoutAnalysisRow" }, "title": "Response Gettoolreliabilitytimeoutanalysis" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/dashboard": { "get": { "tags": [ "analytics" ], "summary": "Combined tool analytics dashboard envelope", "description": "Single call that fans out to the four ENG-154 dashboard pipes.\n\nEach underlying pipe is independently cached at 60s, so within a one\nminute window this endpoint serves entirely from Redis.", "operationId": "getToolDashboard", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "tool_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Type" } }, { "name": "revision_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Id" } }, { "name": "top_tools_limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 10, "title": "Top Tools Limit" } }, { "name": "health_matrix_limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Health Matrix Limit" } }, { "name": "recent_errors_limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Recent Errors Limit" } }, { "name": "min_invocations", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 10, "title": "Min Invocations" } }, { "name": "latency_ceiling_ms", "in": "query", "required": false, "schema": { "type": "number", "exclusiveMinimum": 0, "default": 5000.0, "title": "Latency Ceiling Ms" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__analytics__tools__schemas__DashboardEnvelope" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/monitoring/anomaly-detection": { "get": { "tags": [ "analytics" ], "summary": "Per-tool z-score anomaly scan vs a rolling baseline (window <= 1 day)", "operationId": "getToolMonitoringAnomalyDetection", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "baseline_days", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 30, "minimum": 1, "default": 7, "title": "Baseline Days" } }, { "name": "z_threshold", "in": "query", "required": false, "schema": { "type": "number", "exclusiveMinimum": 0, "default": 2.0, "title": "Z Threshold" } }, { "name": "min_invocations", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 5, "title": "Min Invocations" } }, { "name": "tool_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" } }, { "name": "tool_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Type" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AnomalyDetectionRow" }, "title": "Response Gettoolmonitoringanomalydetection" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/tools/monitoring/health-check": { "get": { "tags": [ "analytics" ], "summary": "Per-tool health (healthy/degraded/critical) with threshold violations", "operationId": "getToolMonitoringHealthCheck", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "silent_lookback_seconds", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 86400, "title": "Silent Lookback Seconds" } }, { "name": "min_invocations", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 5, "title": "Min Invocations" } }, { "name": "error_rate_warning", "in": "query", "required": false, "schema": { "type": "number", "maximum": 1, "minimum": 0, "default": 0.05, "title": "Error Rate Warning" } }, { "name": "error_rate_critical", "in": "query", "required": false, "schema": { "type": "number", "maximum": 1, "minimum": 0, "default": 0.2, "title": "Error Rate Critical" } }, { "name": "p95_latency_warning_ms", "in": "query", "required": false, "schema": { "type": "number", "exclusiveMinimum": 0, "default": 5000.0, "title": "P95 Latency Warning Ms" } }, { "name": "p95_latency_critical_ms", "in": "query", "required": false, "schema": { "type": "number", "exclusiveMinimum": 0, "default": 15000.0, "title": "P95 Latency Critical Ms" } }, { "name": "tool_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" } }, { "name": "tool_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Type" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/HealthCheckRow" }, "title": "Response Gettoolmonitoringhealthcheck" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/sessions/volume-timeseries": { "get": { "tags": [ "analytics" ], "summary": "New-session counts bucketed over time, split by channel", "operationId": "getSessionVolumeTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "priority", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Priority" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__sessions__schemas__VolumeTimeseriesRow" }, "title": "Response Getsessionvolumetimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/sessions/status-breakdown": { "get": { "tags": [ "analytics" ], "summary": "Current distribution of sessions across statuses", "operationId": "getSessionStatusBreakdown", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/StatusBreakdownRow" }, "title": "Response Getsessionstatusbreakdown" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/sessions/resolution-time": { "get": { "tags": [ "analytics" ], "summary": "Resolution-time percentiles by channel and priority", "operationId": "getSessionResolutionTime", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" } }, { "name": "priority", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Priority" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ResolutionTimeRow" }, "title": "Response Getsessionresolutiontime" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/sessions/first-response-time": { "get": { "tags": [ "analytics" ], "summary": "Time-to-first-response percentiles", "operationId": "getSessionFirstResponseTime", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FirstResponseTimeRow" }, "title": "Response Getsessionfirstresponsetime" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/sessions/by-channel": { "get": { "tags": [ "analytics" ], "summary": "Per-channel comparison of session volume and quality", "operationId": "getSessionByChannel", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ByChannelRow" }, "title": "Response Getsessionbychannel" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/sessions/escalation-rate": { "get": { "tags": [ "analytics" ], "summary": "Per-bucket escalation rate timeseries", "operationId": "getSessionEscalationRate", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EscalationRateRow" }, "title": "Response Getsessionescalationrate" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/sessions/message-distribution": { "get": { "tags": [ "analytics" ], "summary": "Histogram of message count per session", "operationId": "getSessionMessageDistribution", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MessageDistributionRow" }, "title": "Response Getsessionmessagedistribution" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/sessions/turn-depth": { "get": { "tags": [ "analytics" ], "summary": "Turn-depth summary (avg / single-turn rate / quantiles)", "operationId": "getSessionTurnDepth", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TurnDepthRow" }, "title": "Response Getsessionturndepth" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/voice/volume-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Terminated-call counts bucketed over time (completed / failed / no_answer)", "operationId": "getVoiceCallVolumeTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__voice__schemas__VolumeTimeseriesRow" }, "title": "Response Getvoicecallvolumetimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/voice/outcome-breakdown": { "get": { "tags": [ "analytics" ], "summary": "Distribution of terminated calls across call-statuses", "operationId": "getVoiceCallOutcomeBreakdown", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "direction", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Direction" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OutcomeBreakdownRow" }, "title": "Response Getvoicecalloutcomebreakdown" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/voice/answer-rate-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Per-bucket answer/connection rate over time (share of LIVE calls that connected)", "operationId": "getVoiceCallAnswerRateTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AnswerRateTimeseriesRow" }, "title": "Response Getvoicecallanswerratetimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/voice/warm-transfers/summary": { "get": { "tags": [ "analytics", "analytics" ], "summary": "Outbound warm-transfer success rate and successful setup latency", "operationId": "getVoiceWarmTransferSummary", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WarmTransferSummaryRow" }, "title": "Response Getvoicewarmtransfersummary" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/voice/warm-transfers/failure-reasons": { "get": { "tags": [ "analytics", "analytics" ], "summary": "Outbound warm-transfer failures grouped by normalized reason", "operationId": "getVoiceWarmTransferFailureReasons", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WarmTransferFailureReasonRow" }, "title": "Response Getvoicewarmtransferfailurereasons" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/voice/warm-transfers/setup-latency-timeseries": { "get": { "tags": [ "analytics", "analytics" ], "summary": "Successful outbound warm-transfer setup latency over time", "operationId": "getVoiceWarmTransferSetupLatencyTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WarmTransferSetupLatencyRow" }, "title": "Response Getvoicewarmtransfersetuplatencytimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/voice/warm-transfers/dashboard": { "get": { "tags": [ "analytics", "analytics" ], "summary": "One-shot envelope of all outbound warm-transfer analytics", "operationId": "getVoiceWarmTransferDashboard", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WarmTransferDashboardEnvelope" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/knowledge/documents/adoption": { "get": { "tags": [ "analytics" ], "summary": "Per-KB adoption rate and document counts", "operationId": "getKnowledgeBaseAdoption", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "knowledge_base_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Knowledge Base Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/KbAdoptionRow" }, "title": "Response Getknowledgebaseadoption" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/knowledge/documents/ingestion-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Document-ingestion counts bucketed over time", "operationId": "getDocumentIngestionTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "knowledge_base_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Knowledge Base Id" } }, { "name": "source_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Type" } }, { "name": "hash_method", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Hash Method" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentIngestionTimeseriesRow" }, "title": "Response Getdocumentingestiontimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/knowledge/documents/processing-latency": { "get": { "tags": [ "analytics" ], "summary": "Document processing-time percentiles bucketed over time", "operationId": "getDocumentProcessingLatency", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "knowledge_base_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Knowledge Base Id" } }, { "name": "source_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Type" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentProcessingLatencyRow" }, "title": "Response Getdocumentprocessinglatency" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/knowledge/documents/cleanup-summary": { "get": { "tags": [ "analytics" ], "summary": "Failure-recovery analytics: failed / archived / cleaned_up / recovered", "operationId": "getDocumentCleanupSummary", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "knowledge_base_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Knowledge Base Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentCleanupSummaryRow" }, "title": "Response Getdocumentcleanupsummary" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/knowledge/documents/retrieval-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Search-call volume and latency percentiles bucketed over time", "operationId": "getDocumentRetrievalTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "caller", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "pattern": "^(api|aop_tool|aop_action_node)$" }, { "type": "null" } ], "title": "Caller" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentRetrievalTimeseriesRow" }, "title": "Response Getdocumentretrievaltimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/knowledge/documents/retrieval-by-agent": { "get": { "tags": [ "analytics" ], "summary": "Per-agent retrieval breakdown: volume, hit-rate, and avg latency", "operationId": "getDocumentRetrievalByAgent", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "caller", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "pattern": "^(api|aop_tool|aop_action_node)$" }, { "type": "null" } ], "title": "Caller" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DocumentRetrievalByAgentRow" }, "title": "Response Getdocumentretrievalbyagent" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/knowledge/documents/top-retrieved": { "get": { "tags": [ "analytics" ], "summary": "Top-N most-retrieved documents in a window", "operationId": "getTopRetrievedDocuments", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Kb Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TopRetrievedDocumentRow" }, "title": "Response Gettopretrieveddocuments" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/knowledge/documents/stale": { "get": { "tags": [ "analytics" ], "summary": "Documents currently active but unretrieved (or stale beyond N days)", "operationId": "getStaleDocuments", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Kb Id" } }, { "name": "stale_after_days", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 365, "minimum": 1, "default": 30, "title": "Stale After Days" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/StaleDocumentRow" }, "title": "Response Getstaledocuments" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/knowledge/inventory": { "get": { "tags": [ "analytics" ], "summary": "Current-state KB inventory shape", "operationId": "getKnowledgeInventory", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "knowledge_base_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Knowledge Base Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InventoryEnvelope" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/knowledge/connectors/freshness": { "get": { "tags": [ "analytics" ], "summary": "Per-source latest sync state and time-since-last-event", "operationId": "getConnectorFreshness", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "knowledge_base_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Knowledge Base Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConnectorFreshnessRow" }, "title": "Response Getconnectorfreshness" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/knowledge/dashboard": { "get": { "tags": [ "analytics" ], "summary": "One-shot envelope of every knowledge analytics pipe", "operationId": "getKnowledgeDashboard", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "knowledge_base_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Knowledge Base Id" } }, { "name": "source_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Type" } }, { "name": "hash_method", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Hash Method" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeDashboardEnvelope" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-gaps/summary": { "get": { "tags": [ "knowledge-gap-analytics" ], "summary": "Headline knowledge-gap KPIs for the org over a date window", "operationId": "getKnowledgeGapSummary", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SummaryResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-gaps/clusters": { "get": { "tags": [ "knowledge-gap-analytics" ], "summary": "Paginated list of knowledge-gap clusters with filters and sort", "operationId": "listKnowledgeGapClusters", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "gap_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Gap Type" } }, { "name": "product_area", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Product Area" } }, { "name": "priority", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Priority" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Status filter. Omit for the default (open statuses: active, acknowledged, in_progress, reopened). Pass 'all' to include terminal states, or a comma-separated allowlist.", "title": "Status" }, "description": "Status filter. Omit for the default (open statuses: active, acknowledged, in_progress, reopened). Pass 'all' to include terminal states, or a comma-separated allowlist." }, { "name": "owner_user_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Owner User Id" } }, { "name": "sort", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(impact_score:desc|last_seen_at:desc|affected_sessions:desc)$", "default": "impact_score:desc", "title": "Sort" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClusterListResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-gaps/clusters/{cluster_id}": { "get": { "tags": [ "knowledge-gap-analytics" ], "summary": "Detail view of a single knowledge-gap cluster", "operationId": "getKnowledgeGapClusterDetail", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "cluster_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Cluster Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClusterDetailResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-gaps/evidence/turns": { "get": { "tags": [ "knowledge-gap-analytics" ], "summary": "Resolve conversation turns referenced by knowledge-gap evidence", "operationId": "getKnowledgeGapEvidenceTurns", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "turn_ids", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "string", "format": "uuid" }, "description": "Repeated turn IDs to resolve.", "title": "Turn Ids" }, "description": "Repeated turn IDs to resolve." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EvidenceTurnListResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-gaps/sessions/{session_id}/analysis": { "get": { "tags": [ "knowledge-gap-analytics" ], "summary": "Per-session analysis result, signals, gap events, and linked clusters", "operationId": "getKnowledgeGapSessionAnalysis", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionAnalysisDetailResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-gaps/documents/health": { "get": { "tags": [ "knowledge-gap-analytics" ], "summary": "Per-document retrieval / citation / implication counts with failure rate", "operationId": "getKnowledgeGapDocumentHealth", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "sort", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(failure_rate:desc|retrieved_count:desc)$", "default": "failure_rate:desc", "title": "Sort" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentHealthResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-gaps/clusters/{cluster_id}/owner": { "patch": { "tags": [ "knowledge-gap-analytics" ], "summary": "Assign or clear the owner of a knowledge-gap cluster", "operationId": "assignKnowledgeGapClusterOwner", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "cluster_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Cluster Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssignOwnerRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LifecycleTransitionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-gaps/clusters/{cluster_id}/status": { "post": { "tags": [ "knowledge-gap-analytics" ], "summary": "Transition a cluster through the lifecycle state machine", "operationId": "changeKnowledgeGapClusterStatus", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "cluster_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Cluster Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangeStatusRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LifecycleTransitionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/knowledge-gaps/clusters/{cluster_id}/lifecycle-events": { "get": { "tags": [ "knowledge-gap-analytics" ], "summary": "Audit-trail of lifecycle transitions for a cluster", "operationId": "listKnowledgeGapClusterLifecycleEvents", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "cluster_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Cluster Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LifecycleEventsResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/memory/ingestion-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Memory episode counts bucketed over time", "operationId": "getMemoryIngestionTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "episode_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Episode Type" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MemoryIngestionTimeseriesRow" }, "title": "Response Getmemoryingestiontimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/memory/coverage": { "get": { "tags": [ "analytics" ], "summary": "Memory coverage: users-with-memory / active-end-users (clamped 100%)", "operationId": "getMemoryCoverage", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryCoverageEnvelope" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/memory/recalls/timeseries": { "get": { "tags": [ "analytics" ], "summary": "Memory recall volume bucketed over time with hit/miss + latency percentiles", "operationId": "getMemoryRecallTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RecallTimeseriesRow" }, "title": "Response Getmemoryrecalltimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/memory/users/distribution": { "get": { "tags": [ "analytics" ], "summary": "Per-user engagement quantiles (episodes/messages/recalls)", "operationId": "getMemoryUserDistribution", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDistributionRow" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/memory/dashboard": { "get": { "tags": [ "analytics" ], "summary": "One-shot envelope of every memory analytics pipe", "operationId": "getMemoryDashboard", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MemoryDashboardEnvelope" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/mocks/summary": { "get": { "tags": [ "analytics" ], "summary": "Single-row dashboard summary: requests, match/error rates, latency", "operationId": "getMockAnalyticsSummary", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "mock_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Mock Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MockSummaryRow" }, "title": "Response Getmockanalyticssummary" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/mocks/requests-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Mock request volume bucketed over time", "operationId": "getMockRequestsTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "mock_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Mock Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MockRequestsTimeseriesRow" }, "title": "Response Getmockrequeststimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/mocks/latency-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Mock latency percentiles bucketed over time", "operationId": "getMockLatencyTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "mock_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Mock Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MockLatencyTimeseriesRow" }, "title": "Response Getmocklatencytimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/mocks/match-rate-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Mock scenario match rate bucketed over time", "operationId": "getMockMatchRateTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "mock_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Mock Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MockMatchRateTimeseriesRow" }, "title": "Response Getmockmatchratetimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/mocks/top-scenarios": { "get": { "tags": [ "analytics" ], "summary": "Top-N mock scenarios by request count", "operationId": "getMockTopScenarios", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "mock_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Mock Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 10, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MockTopScenarioRow" }, "title": "Response Getmocktopscenarios" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/mocks/dashboard": { "get": { "tags": [ "analytics" ], "summary": "One-shot envelope of every mock analytics pipe", "operationId": "getMockDashboard", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "mock_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Mock Id" } }, { "name": "top_scenarios_limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 10, "title": "Top Scenarios Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MockDashboardEnvelope" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/integrations/summary": { "get": { "tags": [ "analytics" ], "summary": "Single-row summary: invocations, failures, success rate, latency (vs prior window)", "operationId": "getIntegrationAnalyticsSummary", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "integration_key", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Integration Key" } }, { "name": "mode", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mode" } }, { "name": "slug", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Slug" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__integrations__schemas__DashboardSummaryRow" }, "title": "Response Getintegrationanalyticssummary" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/integrations/usage-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Integration tool-call volume bucketed over time", "operationId": "getIntegrationUsageTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "integration_key", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Integration Key" } }, { "name": "mode", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mode" } }, { "name": "slug", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Slug" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__integrations__schemas__InvocationsTimeseriesRow" }, "title": "Response Getintegrationusagetimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/integrations/success-rate-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Effective success rate (%) bucketed over time", "operationId": "getIntegrationSuccessRateTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "integration_key", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Integration Key" } }, { "name": "mode", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mode" } }, { "name": "slug", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Slug" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__integrations__schemas__SuccessRateTimeseriesRow" }, "title": "Response Getintegrationsuccessratetimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/integrations/latency-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Integration tool-call latency percentiles bucketed over time", "operationId": "getIntegrationLatencyTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "integration_key", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Integration Key" } }, { "name": "mode", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mode" } }, { "name": "slug", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Slug" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__integrations__schemas__LatencyTimeseriesRow" }, "title": "Response Getintegrationlatencytimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/integrations/by-integration": { "get": { "tags": [ "analytics" ], "summary": "Volume + reliability + p95 latency grouped by integration_key", "operationId": "getIntegrationUsageByIntegration", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "mode", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mode" } }, { "name": "slug", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Slug" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/InvocationsByIntegrationRow" }, "title": "Response Getintegrationusagebyintegration" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/integrations/by-mode": { "get": { "tags": [ "analytics" ], "summary": "Volume + reliability + p95 latency grouped by mode (vendor_api/feather_mcp_client)", "operationId": "getIntegrationUsageByMode", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "integration_key", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Integration Key" } }, { "name": "slug", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Slug" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/InvocationsByModeRow" }, "title": "Response Getintegrationusagebymode" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/integrations/error-breakdown": { "get": { "tags": [ "analytics" ], "summary": "Failures grouped by error_category (vendor_error / exception:)", "operationId": "getIntegrationErrorBreakdown", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "integration_key", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Integration Key" } }, { "name": "mode", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mode" } }, { "name": "slug", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Slug" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__integrations__schemas__ErrorBreakdownRow" }, "title": "Response Getintegrationerrorbreakdown" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/integrations/dashboard": { "get": { "tags": [ "analytics" ], "summary": "One-shot envelope of every integration analytics pipe", "operationId": "getIntegrationDashboard", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "integration_key", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Integration Key" } }, { "name": "mode", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mode" } }, { "name": "slug", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Slug" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__analytics__integrations__schemas__DashboardEnvelope" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/integrations/connections/summary": { "get": { "tags": [ "analytics" ], "summary": "Single-row connection-health summary: events, failures, success rate, latency", "operationId": "getIntegrationConnectionSummary", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "integration_key", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Integration Key" } }, { "name": "nickname_slug", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Nickname Slug" } }, { "name": "event_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Type" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConnectionSummaryRow" }, "title": "Response Getintegrationconnectionsummary" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/integrations/connections/by-integration": { "get": { "tags": [ "analytics" ], "summary": "Connection health grouped by integration_key (events, success rate, p95 latency)", "operationId": "getIntegrationConnectionByIntegration", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "nickname_slug", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Nickname Slug" } }, { "name": "event_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Type" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConnectionByIntegrationRow" }, "title": "Response Getintegrationconnectionbyintegration" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/integrations/connections/events-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Connection lifecycle event volume (events/successes/failures) over time", "operationId": "getIntegrationConnectionEventsTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "integration_key", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Integration Key" } }, { "name": "nickname_slug", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Nickname Slug" } }, { "name": "event_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Type" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConnectionEventsTimeseriesRow" }, "title": "Response Getintegrationconnectioneventstimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/integrations/connections/success-rate-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Connection lifecycle effective success rate (%) over time", "operationId": "getIntegrationConnectionSuccessRateTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "integration_key", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Integration Key" } }, { "name": "nickname_slug", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Nickname Slug" } }, { "name": "event_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Event Type" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConnectionSuccessRateTimeseriesRow" }, "title": "Response Getintegrationconnectionsuccessratetimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/integrations/connections/failure-breakdown": { "get": { "tags": [ "analytics" ], "summary": "Connection lifecycle failures grouped by event_type + error_category", "operationId": "getIntegrationConnectionFailureBreakdown", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "integration_key", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Integration Key" } }, { "name": "nickname_slug", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Nickname Slug" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConnectionFailureBreakdownRow" }, "title": "Response Getintegrationconnectionfailurebreakdown" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/policies/violation-rate": { "get": { "tags": [ "analytics" ], "summary": "Per-policy violation rate + action counts within a window", "operationId": "getPolicyViolationRate", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "enforcement_point", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Enforcement Point" } }, { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" } }, { "name": "strictness", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Strictness" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ViolationRateRow" }, "title": "Response Getpolicyviolationrate" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/policies/action-breakdown": { "get": { "tags": [ "analytics" ], "summary": "Action counts split into taken (enforced) vs would-be (monitor-mode shadow)", "operationId": "getPolicyActionBreakdown", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "enforcement_point", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Enforcement Point" } }, { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" } }, { "name": "policy_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Policy Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ActionBreakdownRow" }, "title": "Response Getpolicyactionbreakdown" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/policies/violations-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Evaluation + violation volume bucketed over time (enforced vs shadow)", "operationId": "getPolicyViolationsTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "policy_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Policy Id" } }, { "name": "enforcement_point", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Enforcement Point" } }, { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ViolationsTimeseriesRow" }, "title": "Response Getpolicyviolationstimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/policies/monitor-rollout": { "get": { "tags": [ "analytics" ], "summary": "Enforce-after-measure: per monitor-mode policy, would-be impact + TTFT-delta", "operationId": "getPolicyMonitorRollout", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/MonitorRolloutRow" }, "title": "Response Getpolicymonitorrollout" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/policies/dashboard": { "get": { "tags": [ "analytics" ], "summary": "One-shot envelope of every policy analytics pipe", "operationId": "getPolicyDashboard", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "hour", "title": "Granularity" } }, { "name": "channel", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__analytics__policy__schemas__DashboardEnvelope" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/policies/revisions/{revision_id}/disclaimer-status": { "get": { "tags": [ "analytics" ], "summary": "Whether an enforcing agent_response policy is attached (TTFT disclaimer)", "operationId": "getPolicyDisclaimerStatus", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } }, { "name": "channel", "in": "query", "required": false, "schema": { "type": "string", "default": "text", "title": "Channel" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DisclaimerStatus" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/cost/by-org-daily": { "get": { "tags": [ "analytics" ], "summary": "Model-router cost bucketed over time", "operationId": "getModelRouterCostByOrgDaily", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "day", "title": "Granularity" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "served_model", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Served Model" } }, { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostByOrgDailyRow" }, "title": "Response Getmodelroutercostbyorgdaily" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/cost/by-agent": { "get": { "tags": [ "analytics" ], "summary": "Top-N agents by model-router spend", "operationId": "getModelRouterCostByAgent", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "served_model", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Served Model" } }, { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 10, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostByAgentRow" }, "title": "Response Getmodelroutercostbyagent" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/cost/by-model": { "get": { "tags": [ "analytics" ], "summary": "Top-N served models by spend", "operationId": "getModelRouterCostByModel", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 10, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostByModelRow" }, "title": "Response Getmodelroutercostbymodel" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/cost/by-operation": { "get": { "tags": [ "analytics" ], "summary": "Cost and reliability grouped by operation", "operationId": "getModelRouterCostByOperation", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "served_model", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Served Model" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostByOperationRow" }, "title": "Response Getmodelroutercostbyoperation" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/cost/by-provider": { "get": { "tags": [ "analytics" ], "summary": "Cost and reliability grouped by provider", "operationId": "getModelRouterCostByProvider", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostByProviderRow" }, "title": "Response Getmodelroutercostbyprovider" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/cost/by-session": { "get": { "tags": [ "analytics" ], "summary": "Top-N sessions (conversations) by spend", "operationId": "getModelRouterCostBySession", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostBySessionRow" }, "title": "Response Getmodelroutercostbysession" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/cost/by-router-config": { "get": { "tags": [ "analytics" ], "summary": "Top-N router configs by model-router spend", "operationId": "getModelRouterCostByRouterConfig", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "served_model", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Served Model" } }, { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 10, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostByRouterConfigRow" }, "title": "Response Getmodelroutercostbyrouterconfig" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/tokens/breakdown": { "get": { "tags": [ "analytics" ], "summary": "Per-model token usage breakdown (incl. billed tokens)", "operationId": "getModelRouterTokenBreakdown", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TokenBreakdownRow" }, "title": "Response Getmodelroutertokenbreakdown" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/cache/savings": { "get": { "tags": [ "analytics" ], "summary": "Per-model prompt-cache usage and cost", "operationId": "getModelRouterCacheSavings", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CacheSavingsRow" }, "title": "Response Getmodelroutercachesavings" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/latency": { "get": { "tags": [ "analytics" ], "summary": "Per-model latency percentiles (p50/p95/p99)", "operationId": "getModelRouterLatency", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LatencyRow" }, "title": "Response Getmodelrouterlatency" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/fallback/rate": { "get": { "tags": [ "analytics" ], "summary": "Fallback rate bucketed over time", "operationId": "getModelRouterFallbackRate", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "day", "title": "Granularity" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FallbackRateRow" }, "title": "Response Getmodelrouterfallbackrate" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/error/rate": { "get": { "tags": [ "analytics" ], "summary": "Terminal error rate over a window", "operationId": "getModelRouterErrorRate", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "served_model", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Served Model" } }, { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ErrorRateRow" }, "title": "Response Getmodelroutererrorrate" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/embeddings/cost/by-org-daily": { "get": { "tags": [ "analytics" ], "summary": "Embedding cost + tokens bucketed over time", "operationId": "getModelRouterEmbeddingCostByOrgDaily", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "day", "title": "Granularity" } }, { "name": "source", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" } }, { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "model", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model" } }, { "name": "embedding_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Type" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmbeddingCostByOrgDailyRow" }, "title": "Response Getmodelrouterembeddingcostbyorgdaily" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/embeddings/cost/by-model": { "get": { "tags": [ "analytics" ], "summary": "Top-N embedding models by spend", "operationId": "getModelRouterEmbeddingCostByModel", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "source", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" } }, { "name": "embedding_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Type" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 10, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmbeddingCostByModelRow" }, "title": "Response Getmodelrouterembeddingcostbymodel" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/embeddings/cost/by-source": { "get": { "tags": [ "analytics" ], "summary": "Embedding spend grouped by call site", "operationId": "getModelRouterEmbeddingCostBySource", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "embedding_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Type" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmbeddingCostBySourceRow" }, "title": "Response Getmodelrouterembeddingcostbysource" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/embeddings/cost/by-kb": { "get": { "tags": [ "analytics" ], "summary": "Top-N knowledge bases by embedding spend", "operationId": "getModelRouterEmbeddingCostByKb", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "source", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" } }, { "name": "embedding_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Type" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmbeddingCostByKbRow" }, "title": "Response Getmodelrouterembeddingcostbykb" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/embeddings/reliability": { "get": { "tags": [ "analytics" ], "summary": "Embedding reliability + throughput per model", "operationId": "getModelRouterEmbeddingReliability", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "source", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" } }, { "name": "embedding_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Type" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmbeddingReliabilityRow" }, "title": "Response Getmodelrouterembeddingreliability" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/smart-routing/impact": { "get": { "tags": [ "analytics" ], "summary": "Smart-routed vs non-smart-routed cost & reliability", "operationId": "getModelRouterSmartRoutingImpact", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SmartRoutingImpactRow" }, "title": "Response Getmodelroutersmartroutingimpact" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/error/breakdown": { "get": { "tags": [ "analytics" ], "summary": "Terminal errors grouped by error category", "operationId": "getModelRouterErrorBreakdown", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__model_router__schemas__ErrorBreakdownRow" }, "title": "Response Getmodelroutererrorbreakdown" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/error/timeseries": { "get": { "tags": [ "analytics" ], "summary": "Terminal error rate bucketed over time", "operationId": "getModelRouterErrorTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "day", "title": "Granularity" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__model_router__schemas__ErrorTimeseriesRow" }, "title": "Response Getmodelroutererrortimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/cost/trend": { "get": { "tags": [ "analytics" ], "summary": "Current vs previous equal-length window spend", "operationId": "getModelRouterCostTrend", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostTrendRow" }, "title": "Response Getmodelroutercosttrend" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/cost/per-successful-response": { "get": { "tags": [ "analytics" ], "summary": "Cost per terminal successful response, per model", "operationId": "getModelRouterCostPerSuccessfulResponse", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CostPerSuccessfulResponseRow" }, "title": "Response Getmodelroutercostpersuccessfulresponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/latency/timeseries": { "get": { "tags": [ "analytics" ], "summary": "Latency percentiles bucketed over time", "operationId": "getModelRouterLatencyTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "day", "title": "Granularity" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/src__analytics__model_router__schemas__LatencyTimeseriesRow" }, "title": "Response Getmodelrouterlatencytimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/latency/ttft-timeseries": { "get": { "tags": [ "analytics" ], "summary": "Time-to-first-token percentiles over time (streaming)", "operationId": "getModelRouterTtftTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "day", "title": "Granularity" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TtftTimeseriesRow" }, "title": "Response Getmodelrouterttfttimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/latency/ttft-by-model": { "get": { "tags": [ "analytics" ], "summary": "Time-to-first-token percentiles per model (streaming)", "operationId": "getModelRouterTtftByModel", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TtftByModelRow" }, "title": "Response Getmodelrouterttftbymodel" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/fallback/analysis": { "get": { "tags": [ "analytics" ], "summary": "Primary vs fallback leg cost & reliability", "operationId": "getModelRouterFallbackAnalysis", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FallbackAnalysisRow" }, "title": "Response Getmodelrouterfallbackanalysis" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/tokens/efficiency": { "get": { "tags": [ "analytics" ], "summary": "Token-usage efficiency ratios per model", "operationId": "getModelRouterTokenEfficiency", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TokenEfficiencyRow" }, "title": "Response Getmodelroutertokenefficiency" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/dashboard": { "get": { "tags": [ "analytics" ], "summary": "One-shot LLM analytics dashboard (fan-out of 6 pipes)", "operationId": "getModelRouterDashboard", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "day", "title": "Granularity" } }, { "name": "agent_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" } }, { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "operation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operation" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelRouterDashboardEnvelope" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/embeddings/dashboard": { "get": { "tags": [ "analytics" ], "summary": "One-shot embedding analytics dashboard (fan-out of 4 pipes)", "operationId": "getModelRouterEmbeddingDashboard", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "source", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" } }, { "name": "embedding_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Type" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmbeddingDashboardEnvelope" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/embeddings/cost/by-provider": { "get": { "tags": [ "analytics" ], "summary": "Embedding cost + error rate per provider", "operationId": "getModelRouterEmbeddingCostByProvider", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "embedding_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Type" } }, { "name": "source", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmbeddingCostByProviderRow" }, "title": "Response Getmodelrouterembeddingcostbyprovider" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/embeddings/error/breakdown": { "get": { "tags": [ "analytics" ], "summary": "Embedding failures grouped by error category", "operationId": "getModelRouterEmbeddingErrorBreakdown", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "embedding_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Type" } }, { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "source", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmbeddingErrorBreakdownRow" }, "title": "Response Getmodelrouterembeddingerrorbreakdown" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/embeddings/retry/impact": { "get": { "tags": [ "analytics" ], "summary": "First-try vs retry embedding spend (wasted re-embeds)", "operationId": "getModelRouterEmbeddingRetryImpact", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kb_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Kb Id" } }, { "name": "source", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmbeddingRetryImpactRow" }, "title": "Response Getmodelrouterembeddingretryimpact" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/embeddings/latency/timeseries": { "get": { "tags": [ "analytics" ], "summary": "Embedding latency percentiles bucketed over time", "operationId": "getModelRouterEmbeddingLatencyTimeseries", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(minute|hour|day|week)$", "default": "day", "title": "Granularity" } }, { "name": "embedding_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Type" } }, { "name": "provider", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" } }, { "name": "source", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmbeddingLatencyTimeseriesRow" }, "title": "Response Getmodelrouterembeddinglatencytimeseries" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/analytics/model-router/embeddings/dense-vs-sparse": { "get": { "tags": [ "analytics" ], "summary": "Dense vs sparse embedding cost / throughput / reliability", "operationId": "getModelRouterEmbeddingDenseVsSparse", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "source", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source" } }, { "name": "start_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "Start Date" } }, { "name": "end_date", "in": "query", "required": true, "schema": { "type": "string", "format": "date", "title": "End Date" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EmbeddingDenseVsSparseRow" }, "title": "Response Getmodelrouterembeddingdensevssparse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/billing/matrix": { "get": { "tags": [ "billing" ], "summary": "Plans x features grid plus the org's current plan and usage", "operationId": "getBillingMatrix", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingMatrixResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/billing/usage": { "get": { "tags": [ "billing" ], "summary": "Time-bucketed usage per metered feature over a range", "operationId": "getBillingUsage", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "granularity", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(hour|day|month)$", "default": "day", "title": "Granularity" } }, { "name": "range", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(24h|7d|30d|90d|last_cycle|1bc|3bc)$", "default": "30d", "title": "Range" } }, { "name": "feature_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "string", "minLength": 1 } }, { "type": "null" } ], "title": "Feature Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingUsageResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/billing/portal": { "post": { "tags": [ "billing" ], "summary": "Create a Stripe billing-portal URL for the org (manage / cancel subscription)", "operationId": "openBillingPortal", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "return_url", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Return Url" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BillingPortalResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/extraction-schemas": { "post": { "tags": [ "extraction-schemas" ], "summary": "Create a new extraction schema version for an agent", "operationId": "createExtractionSchema", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExtractionSchemaCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExtractionSchemaResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "extraction-schemas" ], "summary": "List extraction schema versions for an agent", "operationId": "listExtractionSchemas", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExtractionSchemaListResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{agent_id}/extraction-schemas/{schema_id}": { "get": { "tags": [ "extraction-schemas" ], "summary": "Get one extraction schema version", "operationId": "getExtractionSchema", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "schema_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Schema Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExtractionSchemaResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "extraction-schemas" ], "summary": "Update extraction schema (rename, activate, archive)", "operationId": "updateExtractionSchema", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent Id" } }, { "name": "schema_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Schema Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExtractionSchemaUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExtractionSchemaResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/{session_id}/extraction": { "get": { "tags": [ "extractions" ], "summary": "Get latest structured extraction for a session", "operationId": "getSessionExtraction", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExtractionResultResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/{session_id}/extraction/jobs": { "get": { "tags": [ "extractions" ], "summary": "List extraction jobs for a session", "operationId": "listSessionExtractionJobs", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExtractionJobListResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/conversations/{session_id}/extraction:rerun": { "post": { "tags": [ "extractions" ], "summary": "Re-run extraction for a closed session", "operationId": "rerunSessionExtraction", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExtractionRerunRequest" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Rerunsessionextraction" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/mcp-chat/tools": { "get": { "tags": [ "mcp-chat" ], "summary": "List the MCP tools available to the chat surface", "description": "Discovered MCP tools that the LLM can call from this chat surface.\n\nReturned to the UI so users can see what capabilities are available\n(knowledge-base search, conversation lookup, agent listings, etc.)\nwithout having to inspect tool calls after the fact.", "operationId": "list_tools_v1_mcp_chat_tools_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolListResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/mcp-chat/stream": { "post": { "tags": [ "mcp-chat" ], "summary": "Stream an LLM chat turn that uses the MCP server as its toolbelt", "description": "SSE stream of one chat turn.\n\nThe LLM (Claude) sees every tool registered on our MCP server. When\nthe model wants a tool, we dispatch it via ``mcp.call_tool`` \u2014 same\ncode path as remote MCP clients hitting ``/mcp/`` \u2014 and feed the\nresult back. ``end_user_id`` (optional) pins all end-user-scoped\ntool calls to that contact.\n\nThe endpoint streams an event-stream of:\n\n- ``text_delta`` \u2014 incremental assistant text (append to the bubble).\n- ``tool_call`` \u2014 model decided to call a tool (name, input).\n- ``tool_result`` \u2014 JSON-string result (or error).\n- ``turn_end`` \u2014 one Claude turn finished (may loop again for tools).\n- ``done`` \u2014 full turn complete.\n- ``error`` \u2014 fatal; stream closes.\n\nNo RBAC dependency on this endpoint itself \u2014 tools enforce their\nown permissions via the ``@cx_tool`` registry, so a viewer-role\ncaller chatting here can only invoke the read tools.", "operationId": "chat_stream_v1_mcp_chat_stream_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatStreamRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/ask-feather/workflows": { "get": { "tags": [ "ask-feather" ], "summary": "Get Workflows", "operationId": "get_workflows_v1_ask_feather_workflows_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__ask_feather__schemas__WorkflowListResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/ask-feather/limits": { "get": { "tags": [ "ask-feather" ], "summary": "Get Ask Feather Limits", "description": "Read the current Ask Feather cost/quota limits (from Redis). Internal-only\n(@featherhq.com) \u2014 these are platform-wide knobs, not per-org settings.", "operationId": "get_ask_feather_limits_v1_ask_feather_limits_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LimitsResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "put": { "tags": [ "ask-feather" ], "summary": "Update Ask Feather Limits", "description": "Update one or more Ask Feather limits in Redis (partial update; omitted\nfields keep their current value). Internal-only.", "operationId": "update_ask_feather_limits_v1_ask_feather_limits_put", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LimitsUpdate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LimitsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/ask-feather/sessions": { "post": { "tags": [ "ask-feather" ], "summary": "Create Session", "operationId": "create_session_v1_ask_feather_sessions_post", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSessionRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__ask_feather__schemas__SessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "ask-feather" ], "summary": "List Sessions", "operationId": "list_sessions_v1_ask_feather_sessions_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__shared__pagination__CursorPage_SessionResponse___2" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/ask-feather/sessions/{session_id}": { "get": { "tags": [ "ask-feather" ], "summary": "Get Session Detail", "operationId": "get_session_detail_v1_ask_feather_sessions__session_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__ask_feather__schemas__SessionDetailResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "ask-feather" ], "summary": "Delete Session", "description": "Hard-delete a session and all its turns/messages (cascade). 404 for non-owners.", "operationId": "delete_session_v1_ask_feather_sessions__session_id__delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/ask-feather/sessions/{session_id}/messages": { "get": { "tags": [ "ask-feather" ], "summary": "List Session Messages", "description": "Load-older transcript page (by ``seq``, descending \u2192 ascending).\n\nThe session-detail endpoint embeds the latest window; this endpoint walks\nolder pages for scroll-up / load-older affordances.", "operationId": "list_session_messages_v1_ask_feather_sessions__session_id__messages_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_MessageResponse_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "ask-feather" ], "summary": "Send Message", "description": "Enqueue a turn (Phase 3 split contract): run the same fast pre-flight gates\nas before, commit a durable ``queued`` turn row, drop a job on the ``ask_feather``\nworker queue, and return ``{turn_id}``. The client then opens a separate\n``\u2026/turns/{turn_id}/stream`` request to watch it. The web process holds no DB\nconnection and does no AI work past this point.", "operationId": "send_message_v1_ask_feather_sessions__session_id__messages_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__ask_feather__schemas__SendMessageRequest" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TurnAcceptedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/ask-feather/sessions/{session_id}/messages/approve": { "post": { "tags": [ "ask-feather" ], "summary": "Approve Message", "description": "Resume a turn paused for tool approval (Q7): validate ownership + that the\nnamed turn is awaiting approval, re-open the SAME row in place, and enqueue the\nresume leg. The client re-subscribes to the (refreshed) stream for the new leg.", "operationId": "approve_message_v1_ask_feather_sessions__session_id__messages_approve_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApproveMessageRequest" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TurnAcceptedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/ask-feather/sessions/{session_id}/turns/{turn_id}/stream": { "get": { "tags": [ "ask-feather" ], "summary": "Stream Turn", "description": "Subscribe to a turn's live SSE frames (Phase 3 split contract).\n\n**Auth is the security boundary:** ownership (org-scope + the session's\nowner) is asserted BEFORE a single frame streams \u2014 the ``turn_id`` UUID is\ndefense-in-depth, not the boundary. Deliberately does NOT use the\nrequest-scoped ``get_session`` dependency (that would pin a DB connection for\nthe whole relay); it opens a short-lived session only for the ownership check,\nthen reads the turn's Redis stream holding no DB connection.", "operationId": "stream_turn_v1_ask_feather_sessions__session_id__turns__turn_id__stream_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } }, { "name": "turn_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Turn Id" } } ], "responses": { "200": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/ask-feather/sessions/{session_id}/turns/{turn_id}/cancel": { "post": { "tags": [ "ask-feather" ], "summary": "Cancel Turn", "description": "Stop button (Q11): set the Redis cancel flag for a turn the caller owns; the\nworker finalizes ``cancelled`` at the next node boundary. Idempotent \u2014 a cancel\nfor an already-finished turn just sets a flag that self-expires.", "operationId": "cancel_turn_v1_ask_feather_sessions__session_id__turns__turn_id__cancel_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Session Id" } }, { "name": "turn_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Turn Id" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Cancel Turn V1 Ask Feather Sessions Session Id Turns Turn Id Cancel Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/webhooks/portal": { "post": { "tags": [ "webhooks" ], "summary": "Create a hosted Svix App Portal link for the caller's org", "description": "Mint a short-lived hosted App Portal link for the authenticated org.\n\nCapabilities follow the caller: ``webhooks:manage`` grants the manage set, any\nother caller (read-only role or a scope-narrowed API key) gets ``ViewBase``\nonly. Customers choose endpoint enablement and event subscriptions inside Svix.", "operationId": "createWebhookPortalLink", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortalLinkResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/webhooks/event-catalog": { "get": { "tags": [ "webhooks" ], "summary": "List supported customer webhook event types", "description": "Return the webhook events the caller's org may subscribe to.\n\nEndpoint enablement and per-event subscriptions are configured in Svix.", "operationId": "getWebhookEventCatalog", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EventCatalogResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/workflows": { "post": { "tags": [ "workflows" ], "summary": "Create a workflow", "operationId": "createWorkflow", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "workflows" ], "summary": "List workflows", "operationId": "listWorkflows", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "kind", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Kind" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_WorkflowListResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/workflows/generate": { "post": { "tags": [ "workflows" ], "summary": "Generate a workflow from a brief, template, or blank scaffold", "description": "Create a Workflow + one draft revision from a single seed.\n\n``brief`` runs the async compile pipeline (HTTP 202, poll\n``GET /workflows/revisions/{revision_id}``); ``template_id`` / ``blank`` seed a\ngraph synchronously (HTTP 201, LLM-free). Exactly one seed must be provided.", "operationId": "generateWorkflow", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "x-feather-client", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Feather-Client" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowGenerateRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowGenerateResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "202": { "description": "brief mode \u2014 the compile pipeline was enqueued (poll the revision).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowGenerateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/workflows/templates": { "get": { "tags": [ "workflows" ], "summary": "List available workflow templates", "operationId": "listWorkflowTemplates", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/WorkflowTemplateSummary" }, "type": "array", "title": "Response Listworkflowtemplates" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/workflows/{workflow_id}": { "get": { "tags": [ "workflows" ], "summary": "Get a workflow", "operationId": "getWorkflow", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "workflow_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Workflow Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowDetailResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "workflows" ], "summary": "Update a workflow", "operationId": "updateWorkflow", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "workflow_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Workflow Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "workflows" ], "summary": "Delete a workflow", "operationId": "deleteWorkflow", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "workflow_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Workflow Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/workflows/bulk-delete": { "post": { "tags": [ "workflows" ], "summary": "Bulk delete workflows", "operationId": "bulkDeleteWorkflows", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkDeleteRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkDeleteResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/workflows/{workflow_id}/dependents": { "get": { "tags": [ "workflows" ], "summary": "List parent workflows that embed this component", "description": "List parent workflows that embed this component (\u00a710.6).\n\nThe ``update_available`` flag is ``True`` when the pinned revision differs\nfrom the component's current active revision.", "operationId": "listComponentDependents", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "workflow_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Workflow Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/DependentResponse" }, "title": "Response Listcomponentdependents" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/workflows/{workflow_id}/revisions": { "post": { "tags": [ "workflows" ], "summary": "Create a workflow revision", "operationId": "createWorkflowRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "workflow_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Workflow Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowRevisionCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowRevisionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "workflows" ], "summary": "List workflow revisions", "operationId": "listWorkflowRevisions", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "workflow_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Workflow Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cursor" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_WorkflowRevisionResponse_" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/workflows/revisions/{revision_id}": { "get": { "tags": [ "workflows" ], "summary": "Get a workflow revision", "operationId": "getWorkflowRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowRevisionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "workflows" ], "summary": "Update a workflow revision", "operationId": "updateWorkflowRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowRevisionUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowRevisionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "workflows" ], "summary": "Delete a workflow revision", "operationId": "deleteWorkflowRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "204": { "description": "Successful Response" }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/workflows/{workflow_id}/revisions/diff": { "get": { "tags": [ "workflows" ], "summary": "Diff two workflow revisions", "description": "Compute a two-layer diff between two revisions of the same workflow.\n\nReturns:\n - ``source_diff``: deterministic diff of the authored config columns\n (always present, always exact).\n - ``graph_diff``: projected behavior diff over the compiled graphs\n (null when either side is uncompiled or the stored graph is unparseable).\n - ``fidelity``: ``\"exact\"`` | ``\"approximate\"`` | ``\"source_only\"``.", "operationId": "getWorkflowRevisionDiff", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "workflow_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Workflow Id" } }, { "name": "base", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Base" } }, { "name": "target", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Target" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowRevisionDiffResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/workflows/revisions/{revision_id}/graph": { "get": { "tags": [ "workflows" ], "summary": "Get a workflow revision's compiled graph", "operationId": "getWorkflowRevisionGraph", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } }, { "name": "x-feather-client", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Feather-Client" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowGraphResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "workflows" ], "summary": "Validate and manually replace a workflow revision's compiled graph", "operationId": "updateWorkflowRevisionGraph", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } }, { "name": "x-feather-client", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Feather-Client" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowGraphRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowGraphUpdateResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "graph_version conflict (concurrent edit)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The submitted graph failed schema or validator checks; no DB mutation occurred.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowGraphUpdateResponse" } } } } } } }, "/v1/workflows/revisions/{revision_id}/graph/validate": { "post": { "tags": [ "workflows" ], "summary": "Validate a workflow graph without saving it", "description": "Dry-run validation. ``?gate=draft_save`` answers \"would this save as a\ndraft?\" (completeness findings reported but non-blocking); the default\n``activate`` answers \"would this activate?\" \u2014 the same split the MCP\n``validate_workflow_graph`` tool exposes.", "operationId": "validateWorkflowRevisionGraph", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } }, { "name": "gate", "in": "query", "required": false, "schema": { "enum": [ "draft_save", "activate" ], "type": "string", "default": "activate", "title": "Gate" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowGraphRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowGraphValidationResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/workflows/revisions/{revision_id}/graph/ops": { "post": { "tags": [ "workflows" ], "summary": "Apply id-addressed PATCH ops to a workflow revision's graph", "description": "Apply an ordered batch of id-addressed ops to the stored graph, then validate\nand persist through the same chokepoint as PUT (gate ``draft_save``,\noptimistic-locked on ``base_version``). The orchestration (None-graph guard,\nop application, base_version defaulting) lives in ``svc.apply_ops`` so the MCP\n``patch_workflow_graph`` tool shares it verbatim \u2014 the router keeps only the\nHTTP-response concerns below.", "operationId": "patchWorkflowRevisionGraph", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } }, { "name": "x-feather-client", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Feather-Client" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowGraphOpsRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowGraphUpdateResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "graph_version conflict (concurrent edit)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "An op addressed something that isn't there, or the resulting graph failed validation; no DB mutation occurred.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowGraphUpdateResponse" } } } } } } }, "/v1/workflows/revisions/{revision_id}/tool-input-defaults": { "get": { "tags": [ "workflows" ], "summary": "Get a workflow revision's tool-input defaults (enriched view)", "operationId": "getWorkflowRevisionToolInputDefaults", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolInputDefaultsViewResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "workflows" ], "summary": "Replace a workflow revision's tool-input defaults (draft-only)", "operationId": "setWorkflowRevisionToolInputDefaults", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolInputDefaultsPutRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolInputDefaultsViewResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/workflows/{workflow_id}/set-active-revision": { "post": { "tags": [ "workflows" ], "summary": "Set the active workflow revision", "operationId": "setActiveWorkflowRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "workflow_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Workflow Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetActiveRevisionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowRevisionResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/workflow/playground/sessions": { "post": { "tags": [ "workflow-playground" ], "summary": "Create Session", "operationId": "create_session_v1_workflow_playground_sessions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePlaygroundSessionRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlaygroundSessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/v1/workflow/playground/sessions/{session_id}/messages": { "post": { "tags": [ "workflow-playground" ], "summary": "Send Message", "operationId": "send_message_v1_workflow_playground_sessions__session_id__messages_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/src__workflow__playground__schemas__SendMessageRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/workflow/playground/sessions/{session_id}/resume": { "post": { "tags": [ "workflow-playground" ], "summary": "Resume Approval", "description": "Approve/deny the approval a suspended session is parked on; stream the continuation.", "operationId": "resume_approval_v1_workflow_playground_sessions__session_id__resume_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResumeApprovalRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/workflow/playground/sessions/{session_id}": { "get": { "tags": [ "workflow-playground" ], "summary": "Get Session Info", "operationId": "get_session_info_v1_workflow_playground_sessions__session_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlaygroundSessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "ACLConfigResponse": { "properties": { "role_clearance_map": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Role Clearance Map" }, "role_audience_map": { "additionalProperties": { "items": { "type": "string" }, "type": "array" }, "type": "object", "title": "Role Audience Map" }, "classification_mode": { "type": "string", "title": "Classification Mode" } }, "type": "object", "required": [ "role_clearance_map", "role_audience_map", "classification_mode" ], "title": "ACLConfigResponse", "description": "Effective ACL config (custom map merged over defaults)." }, "ACLConfigUpdate": { "properties": { "role_clearance_map": { "anyOf": [ { "additionalProperties": { "type": "integer" }, "type": "object" }, { "type": "null" } ], "title": "Role Clearance Map" }, "role_audience_map": { "anyOf": [ { "additionalProperties": { "items": { "type": "string" }, "type": "array" }, "type": "object" }, { "type": "null" } ], "title": "Role Audience Map" }, "classification_mode": { "anyOf": [ { "type": "string", "enum": [ "auto", "kb_default" ] }, { "type": "null" } ], "title": "Classification Mode" } }, "additionalProperties": false, "type": "object", "title": "ACLConfigUpdate" }, "APICallConfiguration": { "properties": { "url": { "type": "string", "title": "Url", "description": "API endpoint URL \u2014 supports {{variable}} placeholders" }, "method": { "type": "string", "enum": [ "GET", "POST", "PUT", "PATCH", "DELETE" ], "title": "Method", "default": "GET" }, "headers": { "items": { "$ref": "#/components/schemas/HeaderConfig" }, "type": "array", "title": "Headers" }, "query_params": { "items": { "$ref": "#/components/schemas/QueryParamConfig" }, "type": "array", "title": "Query Params" }, "body": { "additionalProperties": true, "type": "object", "title": "Body" }, "timeout": { "type": "integer", "maximum": 300.0, "minimum": 1.0, "title": "Timeout", "description": "Request timeout in seconds", "default": 30 }, "variables": { "items": { "$ref": "#/components/schemas/VariableDefinition" }, "type": "array", "title": "Variables" }, "retry": { "anyOf": [ { "$ref": "#/components/schemas/RetryConfig" }, { "type": "null" } ], "description": "Per-tool retry configuration" } }, "type": "object", "required": [ "url" ], "title": "APICallConfiguration", "description": "Configuration for an API_CALL tool, stored in Tool.configuration.\n\nSupports ``{{variable}}`` placeholders in url, headers, and body that are\nresolved at execution time from the tool's input variables and runtime\nmetadata (via ``{{metadata.key}}``)." }, "ActionBreakdownRow": { "properties": { "action": { "type": "string", "title": "Action" }, "mode_bucket": { "type": "string", "title": "Mode Bucket" }, "count": { "type": "integer", "title": "Count" } }, "type": "object", "required": [ "action", "mode_bucket", "count" ], "title": "ActionBreakdownRow" }, "ActivateRequest": { "properties": { "activation_reason": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Activation Reason" } }, "additionalProperties": false, "type": "object", "title": "ActivateRequest", "description": "Request body for POST /assistants/{id}/revisions/{rid}/activate." }, "ActiveTurn": { "properties": { "turn_id": { "type": "string", "format": "uuid", "title": "Turn Id" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "turn_id", "status" ], "title": "ActiveTurn", "description": "The session's current in-flight turn, so a client that lost its turn_id\n(page refresh, new tab, dropped connection) can rediscover it and re-subscribe\nto ``\u2026/turns/{turn_id}/stream`` (ENG-860 Phase 4). ``None`` on session-detail\nwhen the latest turn is terminal (nothing to reconnect to)." }, "AddContactRequest": { "properties": { "channel": { "type": "string", "title": "Channel" }, "value": { "type": "string", "title": "Value" } }, "type": "object", "required": [ "channel", "value" ], "title": "AddContactRequest", "description": "Add a verified contact (e.g. promote a claim to a verified contact).\n\nThe channel + raw value together determine type and normalization. A typed\nchannel (in ``CHANNEL_REGISTRY`` \u2014 email, phone, sms, voice, whatsapp, slack,\ninstagram, facebook, twitter) produces a Contact with the matching type and\nfull cross-channel identity resolution. Any other channel is accepted as a\ntypeless Contact (``type=None``, trimmed value) \u2014 see ``normalization.py``;\ntypeless identities intentionally don't link or dedup." }, "AddEdgeOp": { "properties": { "op": { "type": "string", "const": "add_edge", "title": "Op" }, "edge": { "additionalProperties": true, "type": "object", "title": "Edge" } }, "type": "object", "required": [ "op", "edge" ], "title": "AddEdgeOp" }, "AgentEvalConfigResponse": { "properties": { "evaluate_live": { "type": "boolean", "title": "Evaluate Live" } }, "type": "object", "required": [ "evaluate_live" ], "title": "AgentEvalConfigResponse", "description": "Per-agent live-evaluation configuration." }, "AgentEvalConfigUpdate": { "properties": { "evaluate_live": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Evaluate Live" } }, "additionalProperties": false, "type": "object", "title": "AgentEvalConfigUpdate", "description": "Body for ``PUT /v1/assistants/{id}/eval-config``.\n\nAn omitted field means \"no change\"." }, "AgentPlatformToolsResponse": { "properties": { "platform_tools": { "additionalProperties": true, "type": "object", "title": "Platform Tools" }, "has_flow": { "type": "boolean", "title": "Has Flow", "default": false }, "continue_after_flow": { "anyOf": [ { "$ref": "#/components/schemas/ContinueAfterFlowResolved" }, { "type": "null" } ] }, "end_session_in_flow": { "type": "boolean", "title": "End Session In Flow", "default": false }, "end_session_after_flow": { "type": "boolean", "title": "End Session After Flow", "default": false } }, "type": "object", "title": "AgentPlatformToolsResponse" }, "AgentResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "active_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Active Revision Id" }, "active_revision": { "anyOf": [ { "$ref": "#/components/schemas/AgentRevisionResponse" }, { "type": "null" } ] }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "platform_tools": { "additionalProperties": true, "type": "object", "title": "Platform Tools" }, "knowledge_gap_analysis_enabled": { "type": "boolean", "title": "Knowledge Gap Analysis Enabled", "default": true }, "release_suite_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Release Suite Id" }, "release_gate_mode": { "$ref": "#/components/schemas/ReleaseGateMode", "default": "off" }, "release_gate_max_failures": { "type": "integer", "title": "Release Gate Max Failures", "default": 0 }, "max_active_calls": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Active Calls" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "created_at", "updated_at" ], "title": "AgentResponse" }, "AgentRevisionResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "persona": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Persona" }, "system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Prompt" }, "context_variables": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ContextVarSpec" }, "type": "array" }, { "type": "null" } ], "title": "Context Variables", "description": "Deprecated legacy projection; contains assistant SYSTEM declarations only. Use system_context_variables.", "deprecated": true }, "variable_defaults": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Variable Defaults" }, "tool_refs": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Tool Refs" }, "knowledge_base_refs": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Knowledge Base Refs" }, "platform_tools": { "additionalProperties": true, "type": "object", "title": "Platform Tools" }, "policies_enabled": { "type": "boolean", "title": "Policies Enabled", "default": true }, "policy_refs": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Policy Refs" }, "channel_specific_config": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/ChannelConfig" }, "propertyNames": { "$ref": "#/components/schemas/ConversationChannel" }, "type": "object" }, { "type": "null" } ], "title": "Channel Specific Config" }, "router_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Router Config Id" }, "model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "analyzer_model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "workflow_enabled": { "type": "boolean", "title": "Workflow Enabled", "default": false }, "memory_enabled": { "type": "boolean", "title": "Memory Enabled", "default": true }, "current_time": { "anyOf": [ { "$ref": "#/components/schemas/CurrentTimeSettings" }, { "type": "null" } ] }, "kb_clearance_level": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Kb Clearance Level" }, "kb_audience_tags": { "items": { "type": "string" }, "type": "array", "title": "Kb Audience Tags" }, "continue_after_flow": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Continue After Flow" }, "voice_call_settings": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Voice Call Settings" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "published_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Published At" }, "system_context_variables": { "anyOf": [ { "items": { "$ref": "#/components/schemas/SystemContextVariableSpec" }, "type": "array" }, { "type": "null" } ], "title": "System Context Variables", "description": "Assistant-owned immutable inputs. Derived variables belong to workflows.", "readOnly": true } }, "type": "object", "required": [ "id", "agent_id", "name", "created_at", "updated_at", "system_context_variables" ], "title": "AgentRevisionResponse" }, "AgentVariableResponse": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "title": "Type" }, "source": { "type": "string", "title": "Source" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "enum_values": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Enum Values" } }, "type": "object", "required": [ "name", "type", "source" ], "title": "AgentVariableResponse", "description": "One declared context variable from a bound workflow's compiled graph.\n\nMirrors the subset of the workflow IR's ``ContextVarSpec``\n(``src/workflow/ir/graph.py``) that the UI needs to drive a typo-safe\npicker for the ``agent.variable_extracted`` deterministic-eval signal." }, "AgentVariablesResponse": { "properties": { "variables": { "items": { "$ref": "#/components/schemas/AgentVariableResponse" }, "type": "array", "title": "Variables" } }, "type": "object", "required": [ "variables" ], "title": "AgentVariablesResponse" }, "AgentVoiceConfigResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Organization Id" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "persona_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Persona Id" }, "voice_id": { "type": "string", "format": "uuid", "title": "Voice Id" }, "voice": { "$ref": "#/components/schemas/VoiceOut" }, "voice_tuning": { "additionalProperties": true, "type": "object", "title": "Voice Tuning" }, "stt_provider": { "type": "string", "title": "Stt Provider" }, "stt_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Stt Model" }, "stt_language": { "type": "string", "title": "Stt Language" }, "stt_provider_data": { "additionalProperties": true, "type": "object", "title": "Stt Provider Data" }, "tts_speed": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Tts Speed" }, "tts_provider_data": { "additionalProperties": true, "type": "object", "title": "Tts Provider Data" }, "vad_provider": { "type": "string", "title": "Vad Provider" }, "vad_provider_data": { "additionalProperties": true, "type": "object", "title": "Vad Provider Data" }, "local_vad_params": { "additionalProperties": true, "type": "object", "title": "Local Vad Params" }, "turn_analyzer_params": { "additionalProperties": true, "type": "object", "title": "Turn Analyzer Params" }, "interruption_sensitivity": { "type": "number", "title": "Interruption Sensitivity" }, "hard_turn_timeout_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Hard Turn Timeout Ms" }, "min_endpoint_delay_ms": { "type": "integer", "title": "Min Endpoint Delay Ms" }, "max_endpoint_delay_ms": { "type": "integer", "title": "Max Endpoint Delay Ms" }, "preemptive_generation_enabled": { "type": "boolean", "title": "Preemptive Generation Enabled" }, "end_call_phrases": { "items": { "type": "string" }, "type": "array", "title": "End Call Phrases" }, "pronunciation_overrides": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Pronunciation Overrides" }, "noise_cancellation_enabled": { "type": "boolean", "title": "Noise Cancellation Enabled" }, "noise_cancellation_provider": { "$ref": "#/components/schemas/NoiseCancellationProvider" }, "normalize_for_speech": { "type": "boolean", "title": "Normalize For Speech" }, "audio_in_sample_rate": { "type": "integer", "title": "Audio In Sample Rate" }, "audio_out_sample_rate": { "type": "integer", "title": "Audio Out Sample Rate" }, "metrics_enabled": { "type": "boolean", "title": "Metrics Enabled" }, "usage_metrics_enabled": { "type": "boolean", "title": "Usage Metrics Enabled" }, "heartbeats_period_secs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Heartbeats Period Secs" }, "idle_pipeline_timeout_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Idle Pipeline Timeout Ms" }, "language": { "type": "string", "title": "Language" }, "locale": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Locale" }, "multilingual_enabled": { "type": "boolean", "title": "Multilingual Enabled" }, "multilingual_languages": { "items": { "type": "string" }, "type": "array", "title": "Multilingual Languages" }, "linked_agent_count": { "type": "integer", "title": "Linked Agent Count", "default": 0 }, "linked_agent_names": { "items": { "type": "string" }, "type": "array", "title": "Linked Agent Names" }, "linked_team_count": { "type": "integer", "title": "Linked Team Count", "default": 0 }, "linked_team_names": { "items": { "type": "string" }, "type": "array", "title": "Linked Team Names" }, "metadata_": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "first_speaking_config": { "anyOf": [ { "$ref": "#/components/schemas/FirstSpeakingConfig" }, { "type": "null" } ] }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings" }, "effective_stt_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Effective Stt Model" }, "effective_stt_provider_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Effective Stt Provider Data" }, "effective_tts_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Effective Tts Model" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "source": { "type": "string", "enum": [ "inline", "saved" ], "title": "Source" }, "saved_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Saved Config Id" }, "has_inline_fallback": { "type": "boolean", "title": "Has Inline Fallback" } }, "additionalProperties": false, "type": "object", "required": [ "id", "voice_id", "voice", "stt_provider", "stt_language", "vad_provider", "interruption_sensitivity", "min_endpoint_delay_ms", "max_endpoint_delay_ms", "preemptive_generation_enabled", "noise_cancellation_enabled", "noise_cancellation_provider", "normalize_for_speech", "audio_in_sample_rate", "audio_out_sample_rate", "metrics_enabled", "usage_metrics_enabled", "language", "multilingual_enabled", "created_at", "updated_at", "source", "has_inline_fallback" ], "title": "AgentVoiceConfigResponse", "description": "Config response for an agent, augmented with source metadata.\n\n``source`` is ``\"saved\"`` when the agent references a saved config via\n``Agent.voice_config_id``, or ``\"inline\"`` when using its own 1:1 row.\n``saved_config_id`` is the id of the linked saved config, if any.\n``has_inline_fallback`` reports whether an agent-owned inline row exists;\nthe UI uses it to know whether unlinking is safe (the agent falls back to\nits preserved inline config) or would leave the agent with no voice config." }, "AgentVoiceSourceRequest": { "properties": { "saved_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Saved Config Id" } }, "additionalProperties": false, "type": "object", "title": "AgentVoiceSourceRequest", "description": "Request body for setting an agent's voice source.\n\n``saved_config_id`` is the id of a saved (named) voice config to link,\nor ``None`` to unlink (falling back to inline config)." }, "AnalysisJobSummary": { "properties": { "job_id": { "type": "string", "format": "uuid", "title": "Job Id" }, "status": { "type": "string", "title": "Status" }, "attempts": { "type": "integer", "title": "Attempts" }, "current_stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Current Stage" }, "skip_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Skip Reason" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "failed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Failed At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "job_id", "status", "attempts", "created_at" ], "title": "AnalysisJobSummary" }, "AnalysisResultSummary": { "properties": { "deep_analysis_required": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Deep Analysis Required" }, "decision_source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Decision Source" }, "decision_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Decision Reason" }, "knowledge_gap_detected": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Knowledge Gap Detected" }, "analysis_confidence": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Analysis Confidence" }, "candidate_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Candidate Count" }, "total_gap_events": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Total Gap Events" }, "deep_analysis_reasons": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Deep Analysis Reasons" }, "unresolved_candidates": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Unresolved Candidates" }, "classified_gaps": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Classified Gaps" }, "retrieval_validation_results": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Retrieval Validation Results" } }, "type": "object", "title": "AnalysisResultSummary" }, "AnalysisSettingsUpdate": { "properties": { "knowledge_gap_analysis_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Knowledge Gap Analysis Enabled" } }, "additionalProperties": false, "type": "object", "title": "AnalysisSettingsUpdate", "description": "PATCH /assistants/{id}/operational-settings/analysis (\u00a73.2)." }, "AnomalyDetectionRow": { "properties": { "tool_id": { "type": "string", "title": "Tool Id" }, "tool_name": { "type": "string", "title": "Tool Name" }, "tool_type": { "type": "string", "title": "Tool Type" }, "invocation_count": { "type": "integer", "title": "Invocation Count" }, "error_count": { "type": "integer", "title": "Error Count" }, "current_error_rate": { "type": "number", "title": "Current Error Rate" }, "current_p95_latency_ms": { "type": "number", "title": "Current P95 Latency Ms" }, "baseline_valid_days": { "type": "integer", "title": "Baseline Valid Days" }, "baseline_error_rate_mean": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Baseline Error Rate Mean" }, "baseline_error_rate_stddev": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Baseline Error Rate Stddev" }, "baseline_p95_latency_mean": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Baseline P95 Latency Mean" }, "baseline_p95_latency_stddev": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Baseline P95 Latency Stddev" }, "error_rate_zscore": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Error Rate Zscore" }, "p95_latency_zscore": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "P95 Latency Zscore" }, "is_error_rate_anomaly": { "type": "integer", "title": "Is Error Rate Anomaly" }, "is_latency_anomaly": { "type": "integer", "title": "Is Latency Anomaly" }, "is_anomaly": { "type": "integer", "title": "Is Anomaly" } }, "type": "object", "required": [ "tool_id", "tool_name", "tool_type", "invocation_count", "error_count", "current_error_rate", "current_p95_latency_ms", "baseline_valid_days", "is_error_rate_anomaly", "is_latency_anomaly", "is_anomaly" ], "title": "AnomalyDetectionRow" }, "AnswerRateTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "answer_rate": { "type": "number", "title": "Answer Rate" }, "total_calls": { "type": "integer", "title": "Total Calls" } }, "type": "object", "required": [ "time_bucket", "answer_rate", "total_calls" ], "title": "AnswerRateTimeseriesRow" }, "ApiKeyCreateRequest": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "scopes": { "items": { "type": "string" }, "type": "array", "title": "Scopes" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" } }, "type": "object", "required": [ "name" ], "title": "ApiKeyCreateRequest" }, "ApiKeyCreateResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "key_prefix": { "type": "string", "title": "Key Prefix" }, "scopes": { "items": { "type": "string" }, "type": "array", "title": "Scopes" }, "is_active": { "type": "boolean", "title": "Is Active" }, "last_used_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Used At" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "plain_text_key": { "type": "string", "title": "Plain Text Key" } }, "type": "object", "required": [ "id", "name", "key_prefix", "scopes", "is_active", "last_used_at", "expires_at", "created_at", "plain_text_key" ], "title": "ApiKeyCreateResponse", "description": "Returned exactly once on creation. ``plain_text_key`` is never persisted\nand never returned again \u2014 the caller must store it immediately." }, "ApiKeyResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "key_prefix": { "type": "string", "title": "Key Prefix" }, "scopes": { "items": { "type": "string" }, "type": "array", "title": "Scopes" }, "is_active": { "type": "boolean", "title": "Is Active" }, "last_used_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Used At" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "name", "key_prefix", "scopes", "is_active", "last_used_at", "expires_at", "created_at" ], "title": "ApiKeyResponse" }, "ApprovalDecision": { "properties": { "tool_call_id": { "type": "string", "minLength": 1, "title": "Tool Call Id" }, "approved": { "type": "boolean", "title": "Approved" } }, "type": "object", "required": [ "tool_call_id", "approved" ], "title": "ApprovalDecision" }, "ApprovalMessagesResponse": { "properties": { "holding_line": { "type": "string", "title": "Holding Line" }, "waiting_reply": { "type": "string", "title": "Waiting Reply" } }, "type": "object", "required": [ "holding_line", "waiting_reply" ], "title": "ApprovalMessagesResponse", "description": "The org's two HITL approval-UX lines, RESOLVED (org value or code default).\n\nBoth are always concrete strings: when the org hasn't configured a line, the resolved\ncode default is surfaced so the UI shows exactly what an end-user will see. To revert a\nline to its default, PUT ``null`` for that field." }, "ApprovalMessagesUpdate": { "properties": { "holding_line": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Holding Line" }, "waiting_reply": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Waiting Reply" } }, "additionalProperties": false, "type": "object", "required": [ "holding_line", "waiting_reply" ], "title": "ApprovalMessagesUpdate", "description": "Set or clear the org's two HITL approval-UX lines (full-replace, PUT semantics).\n\nBoth fields are REQUIRED but nullable, so a full-replace can't silently wipe a line by\nomission: a non-blank string SETS that line; ``null`` (or blank) CLEARS it back to the code\ndefault; an OMITTED field is a 422 (send the complete desired state, both keys present)." }, "ApprovalRequestDetail": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "conversation_id": { "type": "string", "format": "uuid", "title": "Conversation Id" }, "conv_turn_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Conv Turn Id" }, "node_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Node Id" }, "subject_kind": { "$ref": "#/components/schemas/SubjectKind" }, "subject_ref": { "type": "string", "title": "Subject Ref" }, "payload": { "additionalProperties": true, "type": "object", "title": "Payload" }, "suspend_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Suspend Message" }, "approver_role": { "type": "string", "title": "Approver Role" }, "status": { "type": "string", "title": "Status" }, "decision": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Decision" }, "decided_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Decided By" }, "decided_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Decided At" }, "note": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Note" }, "timeout_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Timeout At" }, "resume_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resume Token" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "conversation_id", "conv_turn_id", "node_id", "subject_kind", "subject_ref", "approver_role", "status", "created_at" ], "title": "ApprovalRequestDetail", "description": "Full detail view of a single ``approval_requests`` row." }, "ApprovalRequestSummary": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "conversation_id": { "type": "string", "format": "uuid", "title": "Conversation Id" }, "node_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Node Id" }, "subject_kind": { "$ref": "#/components/schemas/SubjectKind" }, "subject_ref": { "type": "string", "title": "Subject Ref" }, "approver_role": { "type": "string", "title": "Approver Role" }, "status": { "type": "string", "title": "Status" }, "suspend_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Suspend Message" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "timeout_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Timeout At" } }, "type": "object", "required": [ "id", "conversation_id", "node_id", "subject_kind", "subject_ref", "approver_role", "status", "created_at" ], "title": "ApprovalRequestSummary", "description": "Inbox list item \u2014 the at-a-glance row for the approver queue." }, "ApproveMergeRequestBody": { "properties": { "survivor_end_user_id": { "type": "string", "format": "uuid", "title": "Survivor End User Id" }, "resolution_note": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resolution Note" } }, "type": "object", "required": [ "survivor_end_user_id" ], "title": "ApproveMergeRequestBody" }, "ApproveMessageRequest": { "properties": { "turn_id": { "type": "string", "format": "uuid", "title": "Turn Id" }, "decisions": { "items": { "$ref": "#/components/schemas/ApprovalDecision" }, "type": "array", "minItems": 1, "title": "Decisions" } }, "type": "object", "required": [ "turn_id", "decisions" ], "title": "ApproveMessageRequest" }, "ApproveUpdateConflictResponse": { "properties": { "error": { "type": "string", "const": "UPDATE_SUPERSEDED", "title": "Error", "default": "UPDATE_SUPERSEDED" }, "message": { "type": "string", "title": "Message" }, "rejected_request": { "$ref": "#/components/schemas/ReviewRequestResponse" }, "new_merge_request": { "$ref": "#/components/schemas/ReviewRequestResponse" } }, "type": "object", "required": [ "message", "rejected_request", "new_merge_request" ], "title": "ApproveUpdateConflictResponse", "description": "Returned with 409 when an UPDATE is approved but the proposed identifier\nhas been taken over by another user since the request was created. The\nUPDATE is auto-rejected and a new MERGE request is generated against the\nnew owner \u2014 the admin UI can redirect to ``new_merge_request``." }, "ApproveUpdateRequestBody": { "properties": { "resolution_note": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resolution Note" } }, "type": "object", "title": "ApproveUpdateRequestBody" }, "ArchiveRequest": { "properties": { "reason": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Reason" } }, "additionalProperties": false, "type": "object", "title": "ArchiveRequest", "description": "Request body for POST /assistants/{id}/archive (\u00a78)." }, "AssignOwnerRequest": { "properties": { "owner_user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Owner User Id", "description": "OrgMember.id of the new owner, or null to unassign." }, "note": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Note" } }, "type": "object", "required": [ "owner_user_id" ], "title": "AssignOwnerRequest", "description": "Body for ``PATCH /clusters/{cluster_id}/owner``.\n\n``owner_user_id=null`` clears ownership." }, "AssistantCompositeResponse": { "properties": { "agent": { "$ref": "#/components/schemas/AgentResponse" }, "agent_revision": { "$ref": "#/components/schemas/AgentRevisionResponse" }, "workflow": { "$ref": "#/components/schemas/WorkflowResponse" }, "workflow_revision_id": { "type": "string", "format": "uuid", "title": "Workflow Revision Id" } }, "type": "object", "required": [ "agent", "agent_revision", "workflow", "workflow_revision_id" ], "title": "AssistantCompositeResponse", "description": "Response for POST /assistants \u2014 the created agent + workflow." }, "AssistantContextSchemaResponse": { "properties": { "system": { "items": { "$ref": "#/components/schemas/ContextSchemaVariable" }, "type": "array", "title": "System" }, "workflow_inputs": { "items": { "$ref": "#/components/schemas/ContextSchemaVariable" }, "type": "array", "title": "Workflow Inputs" }, "workflow_derived": { "items": { "$ref": "#/components/schemas/ContextSchemaVariable" }, "type": "array", "title": "Workflow Derived" } }, "type": "object", "title": "AssistantContextSchemaResponse", "description": "Ownership-separated context contract for one assistant revision." }, "AssistantCreateComposite": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "persona": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Persona" }, "system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Prompt" }, "system_context_variables": { "anyOf": [ { "items": { "$ref": "#/components/schemas/SystemContextVariableSpec" }, "type": "array" }, { "type": "null" } ], "title": "System Context Variables" }, "context_variables": { "anyOf": [ { "items": { "$ref": "#/components/schemas/LegacySystemContextVariableSpec" }, "type": "array" }, { "type": "null" } ], "title": "Context Variables", "description": "Deprecated alias for system_context_variables.", "deprecated": true }, "variable_defaults": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Variable Defaults" }, "channel_specific_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Channel Specific Config" }, "router_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Router Config Id" }, "model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "current_time": { "anyOf": [ { "$ref": "#/components/schemas/CurrentTimeSettings" }, { "type": "null" } ] }, "analyzer_model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ], "description": "Assistant-revision override for the bound workflow analyzer; stored but inactive while the assistant has no effective workflow." }, "memory_enabled": { "type": "boolean", "title": "Memory Enabled", "description": "Enable semantic memory recall and ingestion for this revision.", "default": true }, "router_model_settings": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Router Model Settings" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "kb_clearance_level": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Kb Clearance Level" }, "kb_audience_tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Kb Audience Tags" }, "knowledge_gap_analysis_enabled": { "type": "boolean", "title": "Knowledge Gap Analysis Enabled", "default": true }, "tool_refs": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ToolRef" }, "type": "array" }, { "type": "null" } ], "title": "Tool Refs" }, "knowledge_base_refs": { "anyOf": [ { "items": { "$ref": "#/components/schemas/KnowledgeBaseRef" }, "type": "array" }, { "type": "null" } ], "title": "Knowledge Base Refs" }, "instructions": { "type": "string", "title": "Instructions", "default": "" }, "workflow_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Workflow Description" } }, "additionalProperties": false, "type": "object", "required": [ "name" ], "title": "AssistantCreateComposite", "description": "Request body for POST /assistants \u2014 create an agent + workflow as one unit.\n\nQ1: every assistant gets a workflow shell at creation; an empty flow\n(``instructions=\"\"``) is legal and runs the bare-agent path." }, "AssistantDetailResponse": { "properties": { "agent": { "$ref": "#/components/schemas/AgentResponse" }, "revisions": { "items": { "$ref": "#/components/schemas/AgentRevisionResponse" }, "type": "array", "title": "Revisions" }, "workflow_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Workflow Id" }, "active_flow_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Active Flow Revision Id" } }, "type": "object", "required": [ "agent" ], "title": "AssistantDetailResponse", "description": "Response for GET /assistants/{id} \u2014 the full assistant view." }, "AssistantIdentityUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "max_active_calls": { "anyOf": [ { "type": "integer", "maximum": 10000.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Max Active Calls" } }, "additionalProperties": false, "type": "object", "title": "AssistantIdentityUpdate", "description": "Request body for PATCH /assistants/{id} \u2014 stable identity (\u00a73.3).\n\nIn-place, immediate, no run semantics. ``extra=forbid``." }, "AssistantListResponse": { "properties": { "assistants": { "items": { "$ref": "#/components/schemas/AssistantSummary" }, "type": "array", "title": "Assistants" }, "has_more": { "type": "boolean", "title": "Has More", "default": false }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "assistants" ], "title": "AssistantListResponse", "description": "GET /assistants \u2014 cursor-paginated list (\u00a710.1)." }, "AssistantMessage": { "properties": { "turn_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Turn Id" }, "content": { "type": "string", "title": "Content" }, "sequence": { "type": "integer", "title": "Sequence", "default": 0 }, "producing_assistant_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Producing Assistant Id" } }, "type": "object", "required": [ "content" ], "title": "AssistantMessage", "description": "One assistant message produced by a single ``Runtime.run_turn`` call.\n\nA turn always returns at least one ``AssistantMessage`` (even an empty\nstring for a silent turn). Plan 5 introduces ``max_per_msg_len`` chunking\nfor SMS, at which point ``run_turn`` will return *N* messages for one\nturn (one per chunk). For Plan 3, the list always has length 1.\n\n``turn_id`` is populated when the runtime persisted the row inline\n(``PersistStrategy.PER_TURN``); for ``FLUSH_AT_END`` it stays ``None``\nuntil ``end_session`` flushes the buffer at which point the channel\nruntime no longer cares \u2014 voice has already streamed the audio, the\nDB row is now durable but its id is internal to the buffer flush." }, "AssistantSummary": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "active_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Active Revision Id" }, "active_revision_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Active Revision Name" }, "archived_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Archived At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "name", "created_at", "updated_at" ], "title": "AssistantSummary", "description": "One assistant in a paginated list (\u00a710.1 GET /assistants)." }, "AssistantWorkflowGraphRequest": { "properties": { "compiled_graph": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Compiled Graph" }, "base_version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Base Version" } }, "type": "object", "required": [ "compiled_graph" ], "title": "AssistantWorkflowGraphRequest", "description": "Replace or clear an assistant revision's private workflow graph.\n\n``compiled_graph=null`` is an explicit transition to the bare-assistant\nruntime. Standalone workflow graph endpoints intentionally retain their\nstricter request schema and still require a graph object." }, "AssistantWorkflowGraphUpdateResponse": { "properties": { "updated": { "type": "boolean", "title": "Updated" }, "validation": { "$ref": "#/components/schemas/WorkflowGraphValidationResponse" }, "revision": { "anyOf": [ { "$ref": "#/components/schemas/WorkflowRevisionResponse" }, { "type": "null" } ] }, "graph_version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Graph Version" }, "blocking_error_count": { "type": "integer", "title": "Blocking Error Count", "default": 0 }, "workflow_enabled": { "type": "boolean", "title": "Workflow Enabled" } }, "type": "object", "required": [ "updated", "validation", "workflow_enabled" ], "title": "AssistantWorkflowGraphUpdateResponse", "description": "Graph result plus the owning assistant revision's authored execution flag." }, "AttemptReplayResponse": { "properties": { "attempt_id": { "type": "string", "format": "uuid", "title": "Attempt Id" }, "job_id": { "type": "string", "format": "uuid", "title": "Job Id" }, "conversation_id": { "type": "string", "format": "uuid", "title": "Conversation Id" }, "already_replayed": { "type": "boolean", "title": "Already Replayed", "default": false }, "action": { "type": "string", "const": "replayed", "title": "Action", "default": "replayed" } }, "type": "object", "required": [ "attempt_id", "job_id", "conversation_id" ], "title": "AttemptReplayResponse", "description": "Result of replaying a poison-terminalized delivery attempt." }, "AuditEntityStat": { "properties": { "entity_type": { "type": "string", "title": "Entity Type" }, "event_count": { "type": "integer", "title": "Event Count" } }, "type": "object", "required": [ "entity_type", "event_count" ], "title": "AuditEntityStat" }, "AuditLogEntry": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "event_type": { "type": "string", "title": "Event Type" }, "actor_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Actor Id" }, "actor_principal_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Actor Principal Type" }, "actor_role": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Actor Role" }, "field_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Field Path" }, "old_value": { "title": "Old Value" }, "new_value": { "title": "New Value" }, "content_fingerprint": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content Fingerprint" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Revision Id" }, "stack_position": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Stack Position" }, "promoted_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Promoted At" } }, "type": "object", "required": [ "id", "event_type", "created_at" ], "title": "AuditLogEntry", "description": "One entry in the unified audit timeline (\u00a75.6)." }, "AuditLogResponse": { "properties": { "events": { "items": { "$ref": "#/components/schemas/AuditLogEntry" }, "type": "array", "title": "Events" }, "has_more": { "type": "boolean", "title": "Has More", "default": false }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "events" ], "title": "AuditLogResponse", "description": "GET /assistants/{id}/audit-log \u2014 unified audit timeline (\u00a75.6)." }, "AuditStatsResponse": { "properties": { "period_start": { "type": "string", "format": "date-time", "title": "Period Start" }, "period_end": { "type": "string", "format": "date-time", "title": "Period End" }, "total_events": { "type": "integer", "title": "Total Events" }, "total_detections": { "type": "integer", "title": "Total Detections" }, "by_source": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "By Source" }, "by_entity_type": { "items": { "$ref": "#/components/schemas/AuditEntityStat" }, "type": "array", "title": "By Entity Type" }, "trend": { "items": { "$ref": "#/components/schemas/AuditTrendBucket" }, "type": "array", "title": "Trend" } }, "type": "object", "required": [ "period_start", "period_end", "total_events", "total_detections", "by_source", "by_entity_type", "trend" ], "title": "AuditStatsResponse" }, "AuditTrendBucket": { "properties": { "bucket_start": { "type": "string", "format": "date-time", "title": "Bucket Start" }, "event_count": { "type": "integer", "title": "Event Count" }, "detection_count": { "type": "integer", "title": "Detection Count" } }, "type": "object", "required": [ "bucket_start", "event_count", "detection_count" ], "title": "AuditTrendBucket" }, "AvailableModel": { "properties": { "model_identifier": { "type": "string", "title": "Model Identifier" }, "provider": { "type": "string", "title": "Provider" }, "supports_streaming": { "type": "boolean", "title": "Supports Streaming" }, "supports_tools": { "type": "boolean", "title": "Supports Tools", "default": true }, "supports_vision": { "type": "boolean", "title": "Supports Vision", "default": false }, "max_context_window": { "type": "integer", "title": "Max Context Window" }, "regions": { "items": { "type": "string" }, "type": "array", "title": "Regions" }, "family": { "type": "string", "title": "Family", "default": "default" }, "supports_json_schema": { "type": "boolean", "title": "Supports Json Schema", "default": true }, "supports_reasoning_effort": { "type": "boolean", "title": "Supports Reasoning Effort", "default": false }, "allowed_efforts": { "items": { "type": "string" }, "type": "array", "title": "Allowed Efforts" }, "fastest_effort": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Fastest Effort" }, "supports_temperature": { "type": "boolean", "title": "Supports Temperature", "default": true }, "supports_thinking": { "type": "boolean", "title": "Supports Thinking", "default": false }, "supports_thinking_budget": { "type": "boolean", "title": "Supports Thinking Budget", "default": false }, "supports_audio": { "type": "boolean", "title": "Supports Audio", "default": false }, "compliance_tags": { "items": { "type": "string" }, "type": "array", "title": "Compliance Tags" }, "input_price_per_1m": { "type": "number", "title": "Input Price Per 1M" }, "output_price_per_1m": { "type": "number", "title": "Output Price Per 1M" } }, "type": "object", "required": [ "model_identifier", "provider", "supports_streaming", "max_context_window", "input_price_per_1m", "output_price_per_1m" ], "title": "AvailableModel" }, "BillingMatrixResponse": { "properties": { "enabled": { "type": "boolean", "title": "Enabled" }, "customer_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Customer Id" }, "plans": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Plans" }, "features": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Features" }, "customer": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Customer" } }, "type": "object", "required": [ "enabled" ], "title": "BillingMatrixResponse", "description": "Plans x features grid plus the org's current entitlements.\n\n``enabled`` is ``False`` when the Autumn kill-switch (``AUTUMN__ENABLED``)\nis off: the org may not exist in Autumn yet, so ``plans``/``features`` are\nempty and ``customer`` is ``None``, and the frontend renders a \"billing not\nconfigured\" state instead of erroring." }, "BillingPortalResponse": { "properties": { "url": { "type": "string", "title": "Url" }, "customer_id": { "type": "string", "title": "Customer Id" } }, "type": "object", "required": [ "url", "customer_id" ], "title": "BillingPortalResponse", "description": "A short-lived Stripe billing-portal URL for the org's customer." }, "BillingUsageResponse": { "properties": { "enabled": { "type": "boolean", "title": "Enabled" }, "customer_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Customer Id" }, "granularity": { "type": "string", "title": "Granularity" }, "range": { "type": "string", "title": "Range" }, "feature_ids": { "items": { "type": "string" }, "type": "array", "title": "Feature Ids" }, "series": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Series" }, "totals": { "additionalProperties": true, "type": "object", "title": "Totals" } }, "type": "object", "required": [ "enabled", "granularity", "range" ], "title": "BillingUsageResponse", "description": "Time-bucketed usage per metered feature over a range.\n\n``enabled=false`` mirrors the matrix kill-switch behavior. ``series`` is\nAutumn's per-bin list (each ``{period, values: {feature_id: n}}``);\n``totals`` is the per-feature ``{count, sum}`` over the whole range.\n``period`` is an epoch timestamp in Autumn's native unit \u2014 the frontend\nrenders it as-is." }, "BridgeNumberView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "phone_e164": { "type": "string", "title": "Phone E164" }, "twilio_sid": { "type": "string", "title": "Twilio Sid" }, "integration_connection_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Integration Connection Id" }, "status": { "type": "string", "title": "Status" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "phone_e164", "twilio_sid", "status", "created_at" ], "title": "BridgeNumberView", "description": "Public view of a bridge number \u2014 never exposes credentials." }, "BrowsePageItem": { "properties": { "provider_item_id": { "type": "string", "maxLength": 255, "title": "Provider Item Id" }, "title": { "type": "string", "maxLength": 500, "title": "Title" }, "icon": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Icon" }, "url": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Url" }, "parent_type": { "anyOf": [ { "type": "string", "maxLength": 50 }, { "type": "null" } ], "title": "Parent Type" }, "parent_title": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Parent Title" }, "last_edited_time": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Edited Time" } }, "type": "object", "required": [ "provider_item_id", "title" ], "title": "BrowsePageItem" }, "BrowseResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/BrowsePageItem" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More", "default": false } }, "type": "object", "required": [ "items" ], "title": "BrowseResponse" }, "BucketCount": { "properties": { "bucket": { "type": "string", "title": "Bucket" }, "count": { "type": "integer", "title": "Count" } }, "type": "object", "required": [ "bucket", "count" ], "title": "BucketCount", "description": "Generic (bucket-name, count) tuple \u2014 used for top_gap_types,\ntop_product_areas in the summary response." }, "BudgetStatus": { "properties": { "used_usd": { "type": "number", "title": "Used Usd" }, "limit_usd": { "type": "number", "title": "Limit Usd" }, "pct": { "type": "integer", "title": "Pct" }, "near_limit": { "type": "boolean", "title": "Near Limit" }, "reset_at": { "type": "integer", "title": "Reset At" } }, "type": "object", "required": [ "used_usd", "limit_usd", "pct", "near_limit", "reset_at" ], "title": "BudgetStatus", "description": "Daily org spend-budget snapshot for the client's soft-warning banner.\n\n``near_limit`` is set once spend crosses ``ask_feather_daily_org_budget_alert_ratio``\nof the budget; ``reset_at`` is epoch seconds of the next UTC midnight." }, "BulkCancelAccepted": { "properties": { "accepted": { "type": "boolean", "title": "Accepted", "description": "Always true on acceptance.", "default": true }, "scope": { "type": "string", "enum": [ "org", "agent", "team" ], "title": "Scope", "description": "The grain that was cancelled." }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id", "description": "Set when scope='agent'." }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id", "description": "Set when scope='team'." } }, "type": "object", "required": [ "scope" ], "title": "BulkCancelAccepted", "description": "202 Accepted response for the async bulk-cancel contract.\n\nThe exhaustive backlog terminalization + RESERVED recall run to\ncompletion in a Celery task (``bulk_cancel_outbound_dispatches``);\nthe HTTP request only accepts the work." }, "BulkDeleteRequest": { "properties": { "workflow_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Workflow Ids" } }, "type": "object", "required": [ "workflow_ids" ], "title": "BulkDeleteRequest" }, "BulkDeleteResponse": { "properties": { "deleted_count": { "type": "integer", "title": "Deleted Count" } }, "type": "object", "required": [ "deleted_count" ], "title": "BulkDeleteResponse" }, "BulkScenarioReplaceRequest": { "properties": { "scenarios": { "items": { "$ref": "#/components/schemas/MockScenarioCreate" }, "type": "array", "title": "Scenarios" } }, "type": "object", "required": [ "scenarios" ], "title": "BulkScenarioReplaceRequest", "description": "Atomic replacement: drops all existing scenarios, inserts the new set." }, "ByChannelRow": { "properties": { "channel": { "type": "string", "title": "Channel" }, "total_sessions": { "type": "integer", "title": "Total Sessions" }, "resolved_sessions": { "type": "integer", "title": "Resolved Sessions" }, "resolution_rate_pct": { "type": "number", "title": "Resolution Rate Pct" }, "avg_resolution_minutes": { "type": "number", "title": "Avg Resolution Minutes" }, "escalated_sessions": { "type": "integer", "title": "Escalated Sessions" }, "escalation_rate_pct": { "type": "number", "title": "Escalation Rate Pct" } }, "type": "object", "required": [ "channel", "total_sessions", "resolved_sessions", "resolution_rate_pct", "avg_resolution_minutes", "escalated_sessions", "escalation_rate_pct" ], "title": "ByChannelRow" }, "CSATEntry": { "properties": { "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp" }, "score": { "type": "integer", "title": "Score" }, "scale_max": { "type": "integer", "title": "Scale Max", "default": 5 } }, "type": "object", "required": [ "timestamp", "score" ], "title": "CSATEntry", "description": "CSAT score against a session. Nullable in v1 (no capture surface)." }, "CacheSavingsRow": { "properties": { "served_model": { "type": "string", "title": "Served Model" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" }, "cache_read_tokens": { "type": "integer", "title": "Cache Read Tokens" }, "cache_write_tokens": { "type": "integer", "title": "Cache Write Tokens" }, "cache_cost_usd": { "type": "number", "title": "Cache Cost Usd" }, "cache_savings_usd": { "type": "number", "title": "Cache Savings Usd" }, "input_cost_usd": { "type": "number", "title": "Input Cost Usd" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "invocations": { "type": "integer", "title": "Invocations" }, "cache_hit_rate": { "type": "number", "title": "Cache Hit Rate" } }, "type": "object", "required": [ "served_model", "cache_read_tokens", "cache_write_tokens", "cache_cost_usd", "cache_savings_usd", "input_cost_usd", "total_cost_usd", "invocations", "cache_hit_rate" ], "title": "CacheSavingsRow" }, "CallExpirySettings": { "properties": { "enabled": { "type": "boolean", "title": "Enabled", "default": false }, "days": { "type": "integer", "maximum": 30.0, "minimum": 0.0, "title": "Days", "default": 0 }, "hours": { "type": "integer", "maximum": 23.0, "minimum": 0.0, "title": "Hours", "default": 0 } }, "type": "object", "title": "CallExpirySettings", "description": "Per-org max wait for a queued outbound dial before it is expired.\n\nWhen ``enabled``, a dial that has waited ``days*24h + hours`` from its\nenqueue time is expired by the ``expire_queued_dispatches`` sweep.\nAbsent/disabled \u21d2 no expiry (unbounded)." }, "CallTransferIntent": { "properties": { "destination": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Destination" }, "destination_lookup": { "anyOf": [ { "$ref": "#/components/schemas/TransferDestinationLookup" }, { "type": "null" } ] }, "mode": { "type": "string", "enum": [ "cold", "warm" ], "title": "Mode", "default": "cold" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "connecting_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Connecting Text" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" }, "warm_destinations": { "items": { "type": "string" }, "type": "array", "title": "Warm Destinations" }, "max_retries": { "type": "integer", "maximum": 5.0, "minimum": 0.0, "title": "Max Retries", "default": 1 }, "retry_text": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Retry Text" }, "on_failure": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Failure" }, "warm": { "anyOf": [ { "$ref": "#/components/schemas/WarmTransferConfig" }, { "type": "null" } ] }, "warm_overrides": { "anyOf": [ { "$ref": "#/components/schemas/WarmTransferTargetOverride" }, { "type": "null" } ] } }, "additionalProperties": false, "type": "object", "title": "CallTransferIntent", "description": "The resolved, ready-to-execute transfer the voice host renders after a turn.\n\nBoth authoring surfaces converge on this: the assistant ``transfer_call`` platform\ntool (label \u2192 destination resolved from config) and the workflow ``HandoffNode``\nvoice transfer (deterministic single target, or LLM-picked among many) both produce a\n``CallTransferIntent``; the voice worker reads it via ``VoiceRuntime.pending_transfer``\nand issues the SIP REFER. ``connecting_text`` is the optional \"one moment, connecting\nyou\u2026\" line spoken before the transfer." }, "CallWindowSettings": { "properties": { "enabled": { "type": "boolean", "title": "Enabled", "default": false }, "timezone": { "type": "string", "title": "Timezone", "default": "America/Los_Angeles" }, "window_start": { "type": "string", "format": "time", "title": "Window Start", "default": "09:00:00" }, "window_end": { "type": "string", "format": "time", "title": "Window End", "default": "17:00:00" }, "days_of_week": { "items": { "type": "integer" }, "type": "array", "title": "Days Of Week", "description": "Weekdays the window applies to (0=Monday \u2026 6=Sunday); empty list = every day." } }, "type": "object", "title": "CallWindowSettings", "description": "Per-org outbound calling hours window.\n\nOutbound dials requested outside the window are deferred (queued) and\nauto-placed when the window next opens. Default: disabled \u2014 calls\ndispatch 24/7 with no calling-hours gate. Enabling the gate pre-fills\nthe template shape America/Los_Angeles, 09:00\u201317:00, Mon\u2013Fri." }, "CancelRequest": { "properties": { "scope": { "type": "string", "enum": [ "org", "agent", "team" ], "title": "Scope", "description": "The grain to cancel: the whole org, a single agent, or a team." }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id", "description": "Required when scope='agent'. Ignored otherwise." }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id", "description": "Required when scope='team'. Ignored otherwise." } }, "type": "object", "required": [ "scope" ], "title": "CancelRequest" }, "CannedToolResponse": { "properties": { "output": { "title": "Output" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "delay_ms": { "type": "integer", "maximum": 60000.0, "minimum": 0.0, "title": "Delay Ms", "default": 0 } }, "additionalProperties": false, "type": "object", "title": "CannedToolResponse", "description": "One canned response in tool_overrides \u2014 Option A grammar.\n\nExactly one of ``output`` / ``error`` must be set (ENG-133): a canned success carries\n``output`` (an explicit ``output: null`` is a valid null result), a canned failure carries a\nnon-empty ``error``. Set-ness is read from ``model_fields_set`` so an explicit ``output: null``\nis distinguished from an absent field; ``delay_ms`` simulates latency before the response." }, "CapacityScopeResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "scope_type": { "type": "string", "title": "Scope Type" }, "scope_key": { "type": "string", "title": "Scope Key" }, "configured_capacity": { "type": "integer", "title": "Configured Capacity" }, "operational_admission_capacity": { "type": "integer", "title": "Operational Admission Capacity" }, "used": { "type": "integer", "title": "Used" }, "override_requested_capacity": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Override Requested Capacity" }, "override_source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Override Source" }, "override_actor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Override Actor" }, "override_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Override Reason" }, "override_set_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Override Set At" }, "override_review_by": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Override Review By" } }, "type": "object", "required": [ "id", "scope_type", "scope_key", "configured_capacity", "operational_admission_capacity", "used" ], "title": "CapacityScopeResponse", "description": "One capacity scope row for the staff override picker." }, "ChangeStatusRequest": { "properties": { "to_status": { "type": "string", "enum": [ "acknowledged", "in_progress", "fixed", "reopened", "merged", "archived" ], "title": "To Status" }, "note": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Note" }, "target_cluster_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Target Cluster Id", "description": "Required when to_status == 'merged'; ignored otherwise." } }, "type": "object", "required": [ "to_status" ], "title": "ChangeStatusRequest", "description": "Body for ``POST /clusters/{cluster_id}/status``.\n\n``target_cluster_id`` is required when ``to_status='merged'`` and ignored\notherwise. The state-machine enforcement lives in\n``GapClusterLifecycleService``; this schema only constrains the wire\nshape." }, "ChannelBinding": { "properties": { "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "team_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Revision Id" } }, "type": "object", "title": "ChannelBinding" }, "ChannelBindingsReplace": { "properties": { "bindings": { "items": { "$ref": "#/components/schemas/ChannelBinding" }, "type": "array", "title": "Bindings", "description": "Desired set of bindings on this channel. Empty list drains the channel." } }, "type": "object", "title": "ChannelBindingsReplace" }, "ChannelConfig": { "properties": { "prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Prompt" }, "first_speaking_config": { "anyOf": [ { "$ref": "#/components/schemas/FirstSpeakingConfig" }, { "type": "null" } ] }, "warm_transfer": { "anyOf": [ { "$ref": "#/components/schemas/WarmTransferChannelConfig" }, { "type": "null" } ] } }, "type": "object", "title": "ChannelConfig", "description": "Per-channel agent config addon.\n\n``prompt`` is an additive system-prompt addon for this channel, rendered VERBATIM (v1 does\nNOT template ``{{var}}`` placeholders in it \u2014 this keeps it in the stable cacheable prefix\nand off the injection surface). ``first_speaking_config`` is the first-speaking config\nfor this channel (templated). ``warm_transfer`` carries the\nvoice-channel warm-transfer briefing script. All optional \u2014 a channel\nmay have any combination.\n\nStored as a JSON dict keyed by channel name on\n``AgentRevision.channel_specific_config``. Future channel-specific\nfields (tools, voice_config) extend this model additively." }, "ChannelCreate": { "properties": { "channel_type": { "$ref": "#/components/schemas/ChannelType" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "team_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Revision Id" } }, "type": "object", "required": [ "channel_type" ], "title": "ChannelCreate" }, "ChannelKind": { "type": "string", "enum": [ "slack" ], "title": "ChannelKind", "description": "The messaging channel a destination delivers through.\n\n``slack`` is the only kind in v1. New kinds are additive \u2014 add a member\nhere, a provider class, and a ``PROVIDER_REGISTRY`` entry." }, "ChannelResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "phone_number_id": { "type": "string", "format": "uuid", "title": "Phone Number Id" }, "channel_type": { "$ref": "#/components/schemas/ChannelType" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "team_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Revision Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "revision_state": { "anyOf": [ { "type": "string", "enum": [ "pinned_current", "pinned_stale", "legacy_unpinned" ] }, { "type": "null" } ], "title": "Revision State" }, "pinned_revision_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pinned Revision Name" }, "active_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Active Revision Id" } }, "type": "object", "required": [ "id", "phone_number_id", "channel_type", "created_at" ], "title": "ChannelResponse" }, "ChannelType": { "type": "string", "enum": [ "sms", "inbound_call", "outbound_call" ], "title": "ChannelType" }, "ChatMessage": { "properties": { "role": { "type": "string", "enum": [ "user", "assistant" ], "title": "Role" }, "content": { "type": "string", "title": "Content" } }, "type": "object", "required": [ "role", "content" ], "title": "ChatMessage", "description": "One conversation message in the rolling history sent from the UI." }, "ChatStreamRequest": { "properties": { "messages": { "items": { "$ref": "#/components/schemas/ChatMessage" }, "type": "array", "minItems": 1, "title": "Messages" }, "end_user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "End User Id" }, "model": { "type": "string", "title": "Model", "description": "Chat completions model identifier (OpenAI).", "default": "gpt-5.4-mini" }, "max_tokens": { "type": "integer", "maximum": 16384.0, "minimum": 1.0, "title": "Max Tokens", "default": 4096 } }, "type": "object", "required": [ "messages" ], "title": "ChatStreamRequest", "description": "Body for ``POST /v1/mcp-chat/stream``.\n\n``messages`` is the full rolling history. ``end_user_id`` (optional)\npins the bound end-user for the MCP tool calls \u2014 same semantics as\nthe ``x-end-user-id`` header on the MCP HTTP endpoint." }, "CitedChunk": { "properties": { "assistant_turn_id": { "type": "string", "format": "uuid", "title": "Assistant Turn Id" }, "kb_id": { "type": "string", "format": "uuid", "title": "Kb Id" }, "doc_id": { "type": "string", "title": "Doc Id" }, "chunk_id": { "type": "string", "title": "Chunk Id" }, "version_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Version Id" } }, "type": "object", "required": [ "assistant_turn_id", "kb_id", "doc_id", "chunk_id" ], "title": "CitedChunk", "description": "One chunk that the runtime exposed to the LLM (subset of retrieved).\n\n``assistant_turn_id`` ties each citation back to the assistant turn that\ncited it. Required: the producer always has the turn in scope when\nbuilding citations, and downstream stages (ENG-491 retrieval validation,\nENG-490 ``ClaimEvidenceRef`` widening) need the per-turn linkage to scope\ndoc-id subset constraints to a candidate's evidence_turn_ids." }, "ClaimRef": { "properties": { "claim_text": { "type": "string", "title": "Claim Text" }, "evidence": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Evidence" } }, "type": "object", "required": [ "claim_text" ], "title": "ClaimRef" }, "ClassificationApprove": { "properties": { "sensitivity": { "anyOf": [ { "type": "string", "enum": [ "public", "internal", "confidential", "restricted" ] }, { "type": "null" } ], "title": "Sensitivity" }, "reason": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Reason" } }, "additionalProperties": false, "type": "object", "title": "ClassificationApprove", "description": "Request body for POST /documents/{doc_id}/classification/approve (ENG-647).\n\nApproving with no ``sensitivity`` confirms the document's current effective\nlabel and clears the review flag (``pending_review``/``pending_unsearchable``\n\u2192 ``active``). Supplying ``sensitivity`` re-labels the document on approval,\nsubject to the same anti-escalation as the PATCH endpoint (a LOWER needs\n``org:manage``). ``reason`` is recorded on the classification audit event." }, "ClassificationPatch": { "properties": { "sensitivity": { "anyOf": [ { "type": "string", "enum": [ "public", "internal", "confidential", "restricted" ] }, { "type": "null" } ], "title": "Sensitivity" }, "visibility_mode": { "anyOf": [ { "type": "string", "enum": [ "org_wide", "audience" ] }, { "type": "null" } ], "title": "Visibility Mode" }, "audience_tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Audience Tags" }, "reason": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Reason" } }, "additionalProperties": false, "type": "object", "title": "ClassificationPatch", "description": "Request body for PATCH /documents/{doc_id}/classification.\n\nOptionally sets the document's effective ``sensitivity`` (a RAISE is sticky;\na LOWER is content-scoped and additionally requires ``org:manage`` \u2014\nanti-escalation is enforced in the service layer) and/or its audience scope\n(ENG-648): ``visibility_mode='audience'`` + ``audience_tags`` narrows the doc\nto those groups; ``visibility_mode='org_wide'`` re-opens it. At least one\nfield must be supplied. ``reason`` is recorded on the audit event(s)." }, "ClassificationResponse": { "properties": { "document_id": { "type": "string", "format": "uuid", "title": "Document Id" }, "sensitivity": { "type": "string", "title": "Sensitivity" }, "sensitivity_level": { "type": "integer", "title": "Sensitivity Level" }, "classification_source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Classification Source" }, "classification_status": { "type": "string", "title": "Classification Status" }, "classification_confidence": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Classification Confidence" }, "classified_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Classified At" }, "classified_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Classified By" }, "manual_override_floor": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Manual Override Floor" }, "manual_lower_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Manual Lower Hash" }, "visibility_mode": { "type": "string", "title": "Visibility Mode" }, "audience_tags": { "items": { "type": "string" }, "type": "array", "title": "Audience Tags" }, "detected_sensitivity": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Detected Sensitivity" } }, "type": "object", "required": [ "document_id", "sensitivity", "sensitivity_level", "classification_source", "classification_status", "classification_confidence", "classified_at", "classified_by", "manual_override_floor", "manual_lower_hash", "visibility_mode", "audience_tags" ], "title": "ClassificationResponse", "description": "Current classification of a document.\n\nBuilt explicitly (not ``from_attributes``) because ``document_id`` maps to\n``Document.id`` and ``detected_sensitivity`` comes from the active version." }, "ClusterDetailResponse": { "properties": { "cluster_id": { "type": "string", "format": "uuid", "title": "Cluster Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "label": { "type": "string", "title": "Label" }, "label_summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label Summary" }, "gap_type": { "type": "string", "title": "Gap Type" }, "product_area": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Product Area" }, "affected_feature": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Affected Feature" }, "status": { "type": "string", "title": "Status" }, "priority": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Priority" }, "owner_user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Owner User Id" }, "acknowledged_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Acknowledged At" }, "fixed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Fixed At" }, "reopened_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Reopened At" }, "archived_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Archived At" }, "merged_into_cluster_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Merged Into Cluster Id" }, "first_seen_at": { "type": "string", "format": "date-time", "title": "First Seen At" }, "last_seen_at": { "type": "string", "format": "date-time", "title": "Last Seen At" }, "member_count": { "type": "integer", "title": "Member Count" }, "impact_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Impact Score" }, "impact_score_breakdown": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Impact Score Breakdown" }, "representative_questions": { "items": { "type": "string" }, "type": "array", "title": "Representative Questions" }, "claims": { "items": { "$ref": "#/components/schemas/ClaimRef" }, "type": "array", "title": "Claims" }, "evidence_doc_ids": { "items": { "type": "string" }, "type": "array", "title": "Evidence Doc Ids" }, "timeseries": { "items": { "$ref": "#/components/schemas/ClusterTimeseriesPoint" }, "type": "array", "title": "Timeseries" } }, "type": "object", "required": [ "cluster_id", "organization_id", "label", "gap_type", "status", "first_seen_at", "last_seen_at", "member_count" ], "title": "ClusterDetailResponse" }, "ClusterListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ClusterListRow" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "items" ], "title": "ClusterListResponse" }, "ClusterListRow": { "properties": { "cluster_id": { "type": "string", "format": "uuid", "title": "Cluster Id" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "gap_type": { "type": "string", "title": "Gap Type" }, "product_area": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Product Area" }, "priority": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Priority" }, "status": { "type": "string", "title": "Status" }, "impact_score": { "type": "number", "title": "Impact Score" }, "member_count": { "type": "integer", "title": "Member Count" }, "affected_sessions": { "type": "integer", "title": "Affected Sessions" }, "escalation_count": { "type": "integer", "title": "Escalation Count" }, "unresolved_count": { "type": "integer", "title": "Unresolved Count" }, "gap_event_count": { "type": "integer", "title": "Gap Event Count" }, "owner_user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Owner User Id" }, "first_seen_at": { "type": "string", "format": "date-time", "title": "First Seen At" }, "last_seen_at": { "type": "string", "format": "date-time", "title": "Last Seen At" }, "fixed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Fixed At" }, "reopened_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Reopened At" } }, "type": "object", "required": [ "cluster_id", "gap_type", "status", "impact_score", "member_count", "affected_sessions", "escalation_count", "unresolved_count", "gap_event_count", "first_seen_at", "last_seen_at" ], "title": "ClusterListRow" }, "ClusterStub": { "properties": { "cluster_id": { "type": "string", "format": "uuid", "title": "Cluster Id" }, "label": { "type": "string", "title": "Label" }, "status": { "type": "string", "title": "Status" }, "priority": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Priority" } }, "type": "object", "required": [ "cluster_id", "label", "status" ], "title": "ClusterStub" }, "ClusterTimeseriesPoint": { "properties": { "day": { "type": "string", "format": "date", "title": "Day" }, "member_count": { "type": "integer", "title": "Member Count" }, "impact_score": { "type": "number", "title": "Impact Score" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "day", "member_count", "impact_score", "status" ], "title": "ClusterTimeseriesPoint" }, "CompilationStrategy": { "type": "string", "enum": [ "fast", "standard", "strong" ], "title": "CompilationStrategy" }, "ComplianceResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "allowed_countries": { "items": { "type": "string" }, "type": "array", "title": "Allowed Countries" }, "auto_send_email_enabled": { "type": "boolean", "title": "Auto Send Email Enabled" }, "auto_send_platform_templates": { "type": "boolean", "title": "Auto Send Platform Templates" }, "prior_session_max_count": { "type": "integer", "title": "Prior Session Max Count" }, "prior_session_window_days": { "type": "integer", "title": "Prior Session Window Days" }, "prior_session_cross_channel": { "type": "boolean", "title": "Prior Session Cross Channel" }, "closed_thread_notice_template": { "type": "string", "title": "Closed Thread Notice Template" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "allowed_countries", "auto_send_email_enabled", "auto_send_platform_templates", "prior_session_max_count", "prior_session_window_days", "prior_session_cross_channel", "closed_thread_notice_template", "created_at", "updated_at" ], "title": "ComplianceResponse" }, "ComplianceUpdate": { "properties": { "allowed_countries": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Allowed Countries" }, "auto_send_email_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Auto Send Email Enabled" }, "auto_send_platform_templates": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Auto Send Platform Templates" }, "prior_session_max_count": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Prior Session Max Count" }, "prior_session_window_days": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Prior Session Window Days" }, "prior_session_cross_channel": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Prior Session Cross Channel" }, "closed_thread_notice_template": { "anyOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "title": "Closed Thread Notice Template" } }, "type": "object", "title": "ComplianceUpdate" }, "ConfigFieldSchema": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" }, "module": { "type": "string", "title": "Module" }, "effect": { "type": "string", "title": "Effect" }, "example": { "type": "string", "title": "Example" }, "group": { "type": "string", "title": "Group" }, "order": { "type": "integer", "title": "Order" }, "advanced": { "type": "boolean", "title": "Advanced" }, "affects_admission": { "type": "boolean", "title": "Affects Admission" }, "env_seed_value": { "title": "Env Seed Value" }, "json_schema": { "additionalProperties": true, "type": "object", "title": "Json Schema" } }, "type": "object", "required": [ "name", "description", "module", "effect", "example", "group", "order", "advanced", "affects_admission", "env_seed_value", "json_schema" ], "title": "ConfigFieldSchema" }, "ConfirmQuarantineResponse": { "properties": { "document_id": { "type": "string", "format": "uuid", "title": "Document Id" }, "version_id": { "type": "string", "format": "uuid", "title": "Version Id" }, "review_status": { "type": "string", "title": "Review Status" } }, "type": "object", "required": [ "document_id", "version_id", "review_status" ], "title": "ConfirmQuarantineResponse" }, "ConnectMailboxRequest": { "properties": { "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "team_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Revision Id" }, "login_hint": { "anyOf": [ { "type": "string", "maxLength": 320 }, { "type": "null" } ], "title": "Login Hint" } }, "additionalProperties": false, "type": "object", "title": "ConnectMailboxRequest", "description": "Initiate a mailbox-connect flow.\n\n``agent_id`` / ``team_id`` are captured in the OAuth state so the\ncallback can bind the grant atomically. Both optional \u2014 callers can\nbind later via the binding endpoint \u2014 but at most one may be set on a\nsingle request (a mailbox binds to either a single agent or a team).\n\nRevision pins (``agent_revision_id`` / ``team_revision_id``) are OPTIONAL:\nomitting one pins the target's current active revision at bind (pin-at-bind),\na non-null value pins that exact revision. Each may only be set alongside\nits own agent/team id." }, "ConnectMailboxResponse": { "properties": { "authorize_url": { "type": "string", "title": "Authorize Url" }, "state": { "type": "string", "title": "State" } }, "additionalProperties": false, "type": "object", "required": [ "authorize_url", "state" ], "title": "ConnectMailboxResponse", "description": "Returns the URL the frontend should redirect / popup the user to." }, "ConnectionByIntegrationRow": { "properties": { "integration_key": { "type": "string", "title": "Integration Key" }, "events": { "type": "integer", "title": "Events" }, "successes": { "type": "integer", "title": "Successes" }, "failures": { "type": "integer", "title": "Failures" }, "success_rate_pct": { "type": "number", "title": "Success Rate Pct" }, "p95_latency_ms": { "type": "number", "title": "P95 Latency Ms" } }, "type": "object", "required": [ "integration_key", "events", "successes", "failures", "success_rate_pct", "p95_latency_ms" ], "title": "ConnectionByIntegrationRow" }, "ConnectionCreate": { "properties": { "integration_key": { "$ref": "#/components/schemas/IntegrationKey" }, "nickname": { "type": "string", "title": "Nickname" } }, "additionalProperties": false, "type": "object", "required": [ "integration_key", "nickname" ], "title": "ConnectionCreate" }, "ConnectionCreateResponse": { "properties": { "connection_id": { "type": "string", "format": "uuid", "title": "Connection Id" }, "session_token": { "type": "string", "title": "Session Token" }, "expires_at": { "type": "string", "format": "date-time", "title": "Expires At" }, "vendor": { "type": "string", "title": "Vendor" } }, "type": "object", "required": [ "connection_id", "session_token", "expires_at", "vendor" ], "title": "ConnectionCreateResponse", "description": "Returned by ``POST /v1/integrations/connections``.\n\nCarries everything the Connect-UI frontend needs to open the OAuth\npopup without a second round-trip: the row id (to poll), the vendor\nsession token, its expiry, and the vendor name so the frontend can\npick the right SDK (``@nangohq/frontend`` for ``\"nango\"``)." }, "ConnectionEventsTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "events": { "type": "integer", "title": "Events" }, "successes": { "type": "integer", "title": "Successes" }, "failures": { "type": "integer", "title": "Failures" } }, "type": "object", "required": [ "time_bucket", "events", "successes", "failures" ], "title": "ConnectionEventsTimeseriesRow" }, "ConnectionFailureBreakdownRow": { "properties": { "event_type": { "type": "string", "title": "Event Type" }, "error_category": { "type": "string", "title": "Error Category" }, "count": { "type": "integer", "title": "Count" }, "share_pct": { "type": "number", "title": "Share Pct" } }, "type": "object", "required": [ "event_type", "error_category", "count", "share_pct" ], "title": "ConnectionFailureBreakdownRow" }, "ConnectionPatchRequest": { "properties": { "nickname": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Nickname" }, "voice_account_cps": { "anyOf": [ { "type": "number", "maximum": 10000.0, "exclusiveMinimum": 0.0 }, { "type": "null" } ], "title": "Voice Account Cps" } }, "additionalProperties": false, "type": "object", "title": "ConnectionPatchRequest" }, "ConnectionResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "integration_key": { "$ref": "#/components/schemas/IntegrationKey" }, "nickname_slug": { "type": "string", "title": "Nickname Slug" }, "nickname": { "type": "string", "title": "Nickname" }, "vendor": { "type": "string", "title": "Vendor" }, "vendor_connection_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Vendor Connection Id" }, "status": { "type": "string", "title": "Status" }, "tools_status": { "type": "string", "title": "Tools Status" }, "tools_synced_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Tools Synced At" }, "status_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status Reason" }, "connected_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Connected At" }, "last_refreshed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Refreshed At" }, "last_used_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Used At" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "voice_account_cps": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Voice Account Cps" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "tools": { "items": { "$ref": "#/components/schemas/ConnectionToolResponse" }, "type": "array", "title": "Tools" } }, "type": "object", "required": [ "id", "organization_id", "integration_key", "nickname_slug", "nickname", "vendor", "vendor_connection_id", "status", "tools_status", "tools_synced_at", "status_reason", "connected_at", "last_refreshed_at", "last_used_at", "metadata", "created_at", "updated_at" ], "title": "ConnectionResponse" }, "ConnectionSuccessRateTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "events": { "type": "integer", "title": "Events" }, "successes": { "type": "integer", "title": "Successes" }, "success_rate_pct": { "type": "number", "title": "Success Rate Pct" } }, "type": "object", "required": [ "time_bucket", "events", "successes", "success_rate_pct" ], "title": "ConnectionSuccessRateTimeseriesRow" }, "ConnectionSummaryRow": { "properties": { "events": { "type": "integer", "title": "Events" }, "successes": { "type": "integer", "title": "Successes" }, "failures": { "type": "integer", "title": "Failures" }, "success_rate_pct": { "type": "number", "title": "Success Rate Pct" }, "avg_latency_ms": { "type": "number", "title": "Avg Latency Ms" }, "p95_latency_ms": { "type": "number", "title": "P95 Latency Ms" } }, "type": "object", "required": [ "events", "successes", "failures", "success_rate_pct", "avg_latency_ms", "p95_latency_ms" ], "title": "ConnectionSummaryRow" }, "ConnectionTestInvokeRequest": { "properties": { "slug": { "type": "string", "title": "Slug" }, "input": { "additionalProperties": true, "type": "object", "title": "Input" }, "response_field_map": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Response Field Map" } }, "additionalProperties": false, "type": "object", "required": [ "slug" ], "title": "ConnectionTestInvokeRequest", "description": "Body for the dashboard ``VENDOR_API`` test surface (Step 10).\n\nLets an operator fire a real ``invoke_tool_by_slug`` from the\nIntegrations page to confirm the backend action path end-to-end.\n``input`` matches the resolved tool's ``input_schema``." }, "ConnectionTestInvokeResponse": { "properties": { "result": { "additionalProperties": true, "type": "object", "title": "Result" }, "narrowed": { "anyOf": [ {}, { "type": "null" } ], "title": "Narrowed" } }, "type": "object", "required": [ "result" ], "title": "ConnectionTestInvokeResponse", "description": "Raw vendor result echoed back to the dashboard test surface.\n\n``narrowed`` previews the agent-facing result after applying the effective\nfield map (request override \u2192 saved field map); ``None`` when no field map\napplies (ENG-631)." }, "ConnectionTestLeaseResponse": { "properties": { "ok": { "type": "boolean", "title": "Ok" }, "team": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Team" }, "url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Url" }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Detail" } }, "type": "object", "required": [ "ok" ], "title": "ConnectionTestLeaseResponse", "description": "Result of a ``FEATHER_API`` test lease (Step 10).\n\nProves the leased provider token works by calling the provider's\nidentity endpoint (Slack ``auth.test``) \u2014 the token itself is never\nreturned to the client." }, "ConnectionTestMcpCallRequest": { "properties": { "slug": { "type": "string", "title": "Slug" }, "input": { "additionalProperties": true, "type": "object", "title": "Input" } }, "additionalProperties": false, "type": "object", "required": [ "slug" ], "title": "ConnectionTestMcpCallRequest", "description": "Body for the dashboard ``FEATHER_MCP_CLIENT`` test surface (Step 8).\n\nLets an operator fire a real ``custom_mcp`` MCP ``tools/call`` from the\nIntegrations page to confirm the customer-MCP invoke path end-to-end\n(decrypt creds \u2192 open MCP session \u2192 ``call_tool``). It's the only non-agent\nway to exercise ``FEATHER_MCP_CLIENT``. ``input`` matches the resolved\ntool's ``input_schema``." }, "ConnectionTestMcpCallResponse": { "properties": { "result": { "additionalProperties": true, "type": "object", "title": "Result" } }, "type": "object", "required": [ "result" ], "title": "ConnectionTestMcpCallResponse", "description": "Raw MCP ``tools/call`` result echoed back to the dashboard test surface." }, "ConnectionToolPatchRequest": { "properties": { "response_field_map": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Response Field Map" }, "is_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Enabled" }, "input_defaults": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/InputArgConfig" }, "type": "object" }, { "type": "null" } ], "title": "Input Defaults" } }, "additionalProperties": false, "type": "object", "title": "ConnectionToolPatchRequest", "description": "Author-editable fields on a single ``IntegrationConnectionTool``.\n\nThree mutable fields: ``response_field_map`` (the customer-owned field map\n``{\"field_mappings\": [...]}`` that narrows the agent-facing response and\ndrives the AOP compiler's ``kind=llm`` \u2192 ``kind=action`` promotion),\n``is_enabled`` (turn the individual tool on/off for the agent), and\n``input_defaults`` (operator input-arg config,\n``{field_name: {\"value\": ..., \"type\": \"default\"|\"pinned\"}}`` \u2014 ENG-590; a\n``default`` may be overwritten by the agent, a ``pinned`` value cannot).\n``input_defaults`` is validated at the service layer against the row's current\n``input_schema`` (it needs the row, which a Pydantic validator can't see), so a\nwrong-type value or unknown field is rejected there with a 422. The response\n*shape* (``response_schema``) is sync-owned and read-only over the API\n(ENG-631 D2), so it is deliberately NOT accepted here \u2014 ``extra=\"forbid\"``\nrejects it with a 422.\n\nPydantic's ``model_fields_set`` is used at the service layer to distinguish\n\"omit this field\" (no-op) from \"explicit ``None``\" (clear the field)." }, "ConnectionToolResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "connection_id": { "type": "string", "format": "uuid", "title": "Connection Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "integration_key": { "$ref": "#/components/schemas/IntegrationKey" }, "nickname_slug": { "type": "string", "title": "Nickname Slug" }, "tool_path": { "type": "string", "title": "Tool Path" }, "slug": { "type": "string", "title": "Slug" }, "display_name": { "type": "string", "title": "Display Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "input_schema": { "additionalProperties": true, "type": "object", "title": "Input Schema" }, "response_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Response Schema" }, "response_field_map": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Response Field Map" }, "input_defaults": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/InputArgConfig" }, "type": "object" }, { "type": "null" } ], "title": "Input Defaults" }, "is_enabled": { "type": "boolean", "title": "Is Enabled" }, "last_seen_at": { "type": "string", "format": "date-time", "title": "Last Seen At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "stale_field_paths": { "items": { "type": "string" }, "type": "array", "title": "Stale Field Paths", "description": "Saved field-map paths no longer present in the shape (ENG-631 D4).", "readOnly": true }, "default_count": { "type": "integer", "title": "Default Count", "description": "How many input fields carry an operator *default* (ENG-590 / PRD 7.7).", "readOnly": true }, "pinned_count": { "type": "integer", "title": "Pinned Count", "description": "How many input fields are operator-*pinned* (ENG-590).", "readOnly": true }, "stale_input_fields": { "items": { "type": "string" }, "type": "array", "title": "Stale Input Fields", "description": "Configured input fields removed/renamed/retyped by a re-sync (PRD 7.6).", "readOnly": true }, "merged_input_preview": { "additionalProperties": true, "type": "object", "title": "Merged Input Preview", "description": "``input_schema`` with each operator value injected (PRD 7.8).", "readOnly": true } }, "type": "object", "required": [ "id", "connection_id", "organization_id", "integration_key", "nickname_slug", "tool_path", "slug", "display_name", "description", "input_schema", "is_enabled", "last_seen_at", "created_at", "updated_at", "stale_field_paths", "default_count", "pinned_count", "stale_input_fields", "merged_input_preview" ], "title": "ConnectionToolResponse" }, "ConnectionToolsBulkToggleRequest": { "properties": { "is_enabled": { "type": "boolean", "title": "Is Enabled" } }, "additionalProperties": false, "type": "object", "required": [ "is_enabled" ], "title": "ConnectionToolsBulkToggleRequest", "description": "Body for the per-connection \"enable all / disable all\" switch.\n\nApplies a single ``is_enabled`` value to **every** tool on the connection.\nUnlike :class:`ConnectionToolPatchRequest` the field is required \u2014 there is\nnothing to no-op on a bulk flip." }, "ConnectorFreshnessRow": { "properties": { "knowledge_base_source_id": { "type": "string", "title": "Knowledge Base Source Id" }, "knowledge_base_id": { "type": "string", "title": "Knowledge Base Id" }, "provider": { "type": "string", "title": "Provider" }, "last_status": { "type": "string", "title": "Last Status" }, "last_event_type": { "type": "string", "title": "Last Event Type" }, "last_sync_started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Sync Started At" }, "last_sync_completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Sync Completed At" }, "last_duration_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Last Duration Ms" }, "last_items_processed": { "type": "integer", "title": "Last Items Processed" }, "last_items_succeeded": { "type": "integer", "title": "Last Items Succeeded" }, "last_items_failed": { "type": "integer", "title": "Last Items Failed" }, "last_items_unchanged": { "type": "integer", "title": "Last Items Unchanged" }, "last_error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Error Message" }, "last_event_at": { "type": "string", "format": "date-time", "title": "Last Event At" }, "time_since_last_event_seconds": { "type": "integer", "title": "Time Since Last Event Seconds" } }, "type": "object", "required": [ "knowledge_base_source_id", "knowledge_base_id", "provider", "last_status", "last_event_type", "last_items_processed", "last_items_succeeded", "last_items_failed", "last_items_unchanged", "last_event_at", "time_since_last_event_seconds" ], "title": "ConnectorFreshnessRow" }, "ConsultTurnOut": { "properties": { "seq": { "type": "integer", "title": "Seq" }, "role": { "type": "string", "title": "Role" }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "seq", "role", "content", "created_at" ], "title": "ConsultTurnOut", "description": "One scrubbed turn of the agent\u2194supervisor warm-transfer consult." }, "ContactResponse": { "properties": { "uid": { "type": "string", "title": "Uid" }, "channel": { "type": "string", "title": "Channel" }, "type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Type" }, "raw_value": { "type": "string", "title": "Raw Value" }, "normalized_value": { "type": "string", "title": "Normalized Value" }, "verification_method": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Verification Method" } }, "type": "object", "required": [ "uid", "channel", "raw_value", "normalized_value" ], "title": "ContactResponse" }, "ContextSchemaVariable": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "title": "Type" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "enum_values": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Enum Values" } }, "type": "object", "required": [ "name", "type" ], "title": "ContextSchemaVariable" }, "ContextVarChange": { "properties": { "name": { "type": "string", "title": "Name" }, "changes": { "items": { "$ref": "#/components/schemas/FieldChange" }, "type": "array", "title": "Changes" } }, "type": "object", "required": [ "name" ], "title": "ContextVarChange", "description": "Field-level changes within a matched (same name) context variable pair." }, "ContextVarCollectionDiff": { "properties": { "added": { "items": { "$ref": "#/components/schemas/ProjectedContextVar" }, "type": "array", "title": "Added" }, "removed": { "items": { "$ref": "#/components/schemas/ProjectedContextVar" }, "type": "array", "title": "Removed" }, "changed": { "items": { "$ref": "#/components/schemas/ContextVarChange" }, "type": "array", "title": "Changed" } }, "type": "object", "title": "ContextVarCollectionDiff", "description": "Diff over the context_variables collection." }, "ContextVarSpec": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "enum": [ "string", "int", "float", "bool", "enum" ], "title": "Type" }, "source": { "type": "string", "enum": [ "system", "derived" ], "title": "Source", "default": "derived" }, "enum_values": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Enum Values" }, "reask_cap": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Reask Cap" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": [ "name", "type" ], "title": "ContextVarSpec", "description": "Typed definition for a context variable in the compiled graph.\n\n``source`` defaults to ``derived`` so ad-hoc fixtures don't need to spell\nout the common case; required-ness is per-node (``AgentNode.required_writes``),\nnot per-variable.\n\n``name`` must satisfy the expression-grammar identifier rule (``[A-Za-z_]\\w*``)\nso that gate/template references can never miss a declared var. Read-time loading\n(``list_active_revision_context_variables``) skips+logs any legacy row that\nviolates this, so old data degrades safely without blocking startup." }, "ContinueAfterFlowResolved": { "properties": { "effective": { "type": "boolean", "title": "Effective" }, "source": { "type": "string", "title": "Source" }, "assistant_value": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Assistant Value" }, "org_value": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Org Value" } }, "type": "object", "required": [ "effective", "source" ], "title": "ContinueAfterFlowResolved", "description": "The resolved ``continue_after_flow`` config with provenance (D2/\u00a73.1).\n\n``effective`` is the resolved bool the runtime uses. ``source`` names which\ntier supplied it (``\"agent\"``, ``\"org\"``, or ``\"default\"``). ``assistant_value``\nand ``org_value`` expose the raw per-tier settings (``None`` = inherit)." }, "ConversationChannel": { "type": "string", "enum": [ "chat", "sms", "voice", "email" ], "title": "ConversationChannel", "description": "The medium the user experiences \u2014 the ``Conversation.channel`` axis (ADR-002)." }, "ConversationCreate": { "properties": { "end_user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "End User Id" }, "org_external_end_user_id": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Org External End User Id" }, "assistant_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assistant Id" }, "assistant_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assistant Revision Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "team_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Revision Id" }, "session_type": { "type": "string", "enum": [ "live", "test", "simulation" ], "title": "Session Type", "default": "live" }, "external_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Id" }, "subject": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Subject" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "tool_input_overrides": { "anyOf": [ { "additionalProperties": { "additionalProperties": { "$ref": "#/components/schemas/InputArgConfig" }, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Tool Input Overrides" }, "context_variables": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Context Variables" }, "test_features": { "anyOf": [ { "$ref": "#/components/schemas/TestSessionFeatureInput" }, { "type": "null" } ] } }, "type": "object", "title": "ConversationCreate", "description": "Get-or-create a v2 conversation (Phase F2) \u2014 CHAT ONLY (D4/ADR-007).\n\nThe generic create route creates ``chat`` conversations only: sms / voice /\nemail creation stays adapter-owned (``/v1/sms/send``, voice dispatch, the\nemail pipeline). ``channel`` is therefore not a request field (forced\nserver-side), and ``origin`` / ``channel_subtype`` are gone \u2014 both are\nserver-assigned (ADR-005 / ADR-004).\n\nBind to exactly one of a single Assistant (``assistant_id``) or a Team\n(``team_id`` + ``team_revision_id``) \u2014 the ``single_xor_team`` CHECK on\n``conversations``. ``assistant_revision_id`` is optional; when omitted it\nis resolved from the agent's active revision and pinned at bind time." }, "ConversationExportFile": { "properties": { "name": { "type": "string", "title": "Name" }, "sha256_plaintext": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sha256 Plaintext" }, "download_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Download Token" } }, "type": "object", "required": [ "name" ], "title": "ConversationExportFile", "description": "Per-file status; ``download_token`` is present only when downloadable." }, "ConversationExportJobResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "status": { "type": "string", "title": "Status" }, "export_format": { "type": "string", "title": "Export Format" }, "window_start": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Window Start" }, "window_end": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Window End" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "finalized_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Finalized At" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "total_rows": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Total Rows" }, "error_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Code" }, "filters": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Filters" }, "files": { "items": { "$ref": "#/components/schemas/ConversationExportFile" }, "type": "array", "title": "Files", "default": [] } }, "type": "object", "required": [ "id", "status", "export_format", "created_at" ], "title": "ConversationExportJobResponse", "description": "Status view of an export job (with per-file download tokens when ready)." }, "ConversationExportRequest": { "properties": { "export_format": { "type": "string", "enum": [ "csv", "ndjson" ], "title": "Export Format", "default": "csv" }, "start": { "type": "string", "format": "date-time", "title": "Start" }, "end": { "type": "string", "format": "date-time", "title": "End" }, "channel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" }, "end_user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "End User Id" }, "assigned_agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assigned Agent Id" }, "priority": { "anyOf": [ { "type": "string", "enum": [ "low", "normal", "high", "urgent" ] }, { "type": "null" } ], "title": "Priority" }, "eval_filter": { "anyOf": [ { "type": "string", "enum": [ "has_evals", "no_evals", "all_passed", "any_failed" ] }, { "type": "null" } ], "title": "Eval Filter" }, "q": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Q" }, "from_number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "From Number" }, "to_number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "To Number" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email" }, "id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Id" }, "external_session_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Session Id" } }, "type": "object", "required": [ "start", "end" ], "title": "ConversationExportRequest", "description": "POST body for an async encrypted conversation/session export.\n\nEvery optional field below is a narrowing filter with the SAME meaning and\nthe SAME implementation as the matching ``GET /v1/conversations`` query\nparam \u2014 both go through ``src/conversation/session_filters.py``, so an\nexport cannot select a different set of sessions than the list the operator\nwas looking at. The export is channel-agnostic by default; ``channel`` just\nnarrows it. ``[start, end)`` is always required and is not a \"filter\" in\nthis sense \u2014 it bounds the job's size." }, "ConversationMessagesPoll": { "properties": { "session_status": { "type": "string", "title": "Session Status" }, "messages": { "items": { "$ref": "#/components/schemas/src__conversation__schemas__TurnResponse" }, "type": "array", "title": "Messages" }, "next_seq": { "type": "integer", "title": "Next Seq" } }, "type": "object", "required": [ "session_status", "messages", "next_seq" ], "title": "ConversationMessagesPoll", "description": "The poll primitive's response (HITL-04 \u00a76.6).\n\nBacks ``GET /conversations/{id}/messages?since_seq=N`` \u2014 one round-trip\nthat returns the conversation's current ``session_status`` *and* every\nmessage with ``seq > since_seq`` (the new tail). The caller advances its\nwatermark to ``next_seq`` and re-polls. The SAME primitive serves both\napproval-resume polling (``awaiting_approval`` \u2192 ``active``) and handoff\noperator-relay polling (``waiting_for_human`` \u2192 ``closed``).\n\n``next_seq`` is the high-water mark to pass back as ``since_seq`` on the\nnext poll: the max ``seq`` of the returned ``messages``, or the request's\nown ``since_seq`` when the tail is empty (so an idle poll doesn't rewind\nthe watermark). The caller watermarks on this exactly as it would on\n:attr:`TurnResponse.message_seqs` after a synchronous turn." }, "ConversationResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "end_user_id": { "type": "string", "format": "uuid", "title": "End User Id" }, "channel": { "type": "string", "title": "Channel" }, "surface": { "type": "string", "title": "Surface" }, "status": { "type": "string", "title": "Status" }, "session_type": { "type": "string", "title": "Session Type" }, "assistant_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assistant Id" }, "assistant_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assistant Revision Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "team_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Revision Id" }, "external_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Id" }, "subject": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Subject" }, "tool_input_overrides": { "anyOf": [ { "additionalProperties": { "additionalProperties": { "$ref": "#/components/schemas/InputArgConfig" }, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Tool Input Overrides" }, "test_features": { "anyOf": [ { "$ref": "#/components/schemas/TestSessionFeatures" }, { "type": "null" } ] }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "end_user_id", "channel", "surface", "status", "session_type", "created_at", "updated_at" ], "title": "ConversationResponse" }, "ConversationSummary": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "channel": { "type": "string", "title": "Channel" }, "session_type": { "type": "string", "title": "Session Type" }, "status": { "type": "string", "title": "Status" }, "assistant_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assistant Id" }, "assistant_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assistant Revision Id" }, "subject": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Subject" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "last_activity_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Activity At" } }, "type": "object", "required": [ "id", "channel", "session_type", "status", "assistant_id", "assistant_revision_id", "subject", "created_at", "last_activity_at" ], "title": "ConversationSummary", "description": "Projection of the parent ``Conversation`` for the eval-run detail view." }, "CostByAgentRow": { "properties": { "agent_id": { "type": "string", "title": "Agent Id" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "input_cost_usd": { "type": "number", "title": "Input Cost Usd" }, "output_cost_usd": { "type": "number", "title": "Output Cost Usd" }, "cache_cost_usd": { "type": "number", "title": "Cache Cost Usd" }, "invocations": { "type": "integer", "title": "Invocations" }, "successful": { "type": "integer", "title": "Successful" }, "failed": { "type": "integer", "title": "Failed" }, "success_rate": { "type": "number", "title": "Success Rate" }, "avg_latency_ms": { "type": "number", "title": "Avg Latency Ms" } }, "type": "object", "required": [ "agent_id", "total_cost_usd", "input_cost_usd", "output_cost_usd", "cache_cost_usd", "invocations", "successful", "failed", "success_rate", "avg_latency_ms" ], "title": "CostByAgentRow" }, "CostByModelRow": { "properties": { "served_model": { "type": "string", "title": "Served Model" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "input_cost_usd": { "type": "number", "title": "Input Cost Usd" }, "output_cost_usd": { "type": "number", "title": "Output Cost Usd" }, "cache_cost_usd": { "type": "number", "title": "Cache Cost Usd" }, "invocations": { "type": "integer", "title": "Invocations" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "avg_ms": { "type": "number", "title": "Avg Ms" } }, "type": "object", "required": [ "served_model", "total_cost_usd", "input_cost_usd", "output_cost_usd", "cache_cost_usd", "invocations", "p95_ms", "avg_ms" ], "title": "CostByModelRow" }, "CostByOperationRow": { "properties": { "operation": { "type": "string", "title": "Operation" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "input_cost_usd": { "type": "number", "title": "Input Cost Usd" }, "output_cost_usd": { "type": "number", "title": "Output Cost Usd" }, "cache_cost_usd": { "type": "number", "title": "Cache Cost Usd" }, "invocations": { "type": "integer", "title": "Invocations" }, "success_rate": { "type": "number", "title": "Success Rate" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "avg_ms": { "type": "number", "title": "Avg Ms" } }, "type": "object", "required": [ "operation", "total_cost_usd", "input_cost_usd", "output_cost_usd", "cache_cost_usd", "invocations", "success_rate", "p95_ms", "avg_ms" ], "title": "CostByOperationRow" }, "CostByOrgDailyRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "input_cost_usd": { "type": "number", "title": "Input Cost Usd" }, "output_cost_usd": { "type": "number", "title": "Output Cost Usd" }, "cache_cost_usd": { "type": "number", "title": "Cache Cost Usd" }, "invocations": { "type": "integer", "title": "Invocations" } }, "type": "object", "required": [ "time_bucket", "total_cost_usd", "input_cost_usd", "output_cost_usd", "cache_cost_usd", "invocations" ], "title": "CostByOrgDailyRow" }, "CostByProviderRow": { "properties": { "provider": { "type": "string", "title": "Provider" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "input_cost_usd": { "type": "number", "title": "Input Cost Usd" }, "output_cost_usd": { "type": "number", "title": "Output Cost Usd" }, "cache_cost_usd": { "type": "number", "title": "Cache Cost Usd" }, "total_tokens": { "type": "integer", "title": "Total Tokens" }, "invocations": { "type": "integer", "title": "Invocations" }, "success_rate": { "type": "number", "title": "Success Rate" }, "error_rate": { "type": "number", "title": "Error Rate" }, "p95_ms": { "type": "number", "title": "P95 Ms" } }, "type": "object", "required": [ "provider", "total_cost_usd", "input_cost_usd", "output_cost_usd", "cache_cost_usd", "total_tokens", "invocations", "success_rate", "error_rate", "p95_ms" ], "title": "CostByProviderRow" }, "CostByRouterConfigRow": { "properties": { "router_config_id": { "type": "string", "title": "Router Config Id" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "input_cost_usd": { "type": "number", "title": "Input Cost Usd" }, "output_cost_usd": { "type": "number", "title": "Output Cost Usd" }, "cache_cost_usd": { "type": "number", "title": "Cache Cost Usd" }, "invocations": { "type": "integer", "title": "Invocations" }, "successful": { "type": "integer", "title": "Successful" }, "failed": { "type": "integer", "title": "Failed" }, "success_rate": { "type": "number", "title": "Success Rate" }, "avg_latency_ms": { "type": "number", "title": "Avg Latency Ms" } }, "type": "object", "required": [ "router_config_id", "total_cost_usd", "input_cost_usd", "output_cost_usd", "cache_cost_usd", "invocations", "successful", "failed", "success_rate", "avg_latency_ms" ], "title": "CostByRouterConfigRow" }, "CostBySessionRow": { "properties": { "session_id": { "type": "string", "title": "Session Id" }, "agent_id": { "type": "string", "title": "Agent Id" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "input_cost_usd": { "type": "number", "title": "Input Cost Usd" }, "output_cost_usd": { "type": "number", "title": "Output Cost Usd" }, "cache_cost_usd": { "type": "number", "title": "Cache Cost Usd" }, "total_tokens": { "type": "integer", "title": "Total Tokens" }, "invocations": { "type": "integer", "title": "Invocations" }, "success_rate": { "type": "number", "title": "Success Rate" }, "first_seen": { "type": "string", "format": "date-time", "title": "First Seen" }, "last_seen": { "type": "string", "format": "date-time", "title": "Last Seen" } }, "type": "object", "required": [ "session_id", "agent_id", "total_cost_usd", "input_cost_usd", "output_cost_usd", "cache_cost_usd", "total_tokens", "invocations", "success_rate", "first_seen", "last_seen" ], "title": "CostBySessionRow" }, "CostPerSuccessfulResponseRow": { "properties": { "served_model": { "type": "string", "title": "Served Model" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "successful": { "type": "integer", "title": "Successful" }, "cost_per_successful_usd": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Cost Per Successful Usd" } }, "type": "object", "required": [ "served_model", "total_cost_usd", "successful" ], "title": "CostPerSuccessfulResponseRow" }, "CostTrendRow": { "properties": { "current_cost_usd": { "type": "number", "title": "Current Cost Usd" }, "previous_cost_usd": { "type": "number", "title": "Previous Cost Usd" }, "delta_usd": { "type": "number", "title": "Delta Usd" }, "pct_change": { "type": "number", "title": "Pct Change" }, "current_invocations": { "type": "integer", "title": "Current Invocations" }, "previous_invocations": { "type": "integer", "title": "Previous Invocations" } }, "type": "object", "required": [ "current_cost_usd", "previous_cost_usd", "delta_usd", "pct_change", "current_invocations", "previous_invocations" ], "title": "CostTrendRow" }, "CreateDraftRequest": { "properties": { "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "account_id": { "type": "string", "format": "uuid", "title": "Account Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "mode": { "$ref": "#/components/schemas/DraftMode" }, "in_reply_to_turn_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "In Reply To Turn Id" }, "subject": { "type": "string", "maxLength": 998, "minLength": 1, "title": "Subject" }, "body_html": { "type": "string", "minLength": 1, "title": "Body Html" }, "body_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Body Text" }, "to": { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array", "minItems": 1, "title": "To" }, "cc": { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array", "title": "Cc" }, "bcc": { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array", "title": "Bcc" }, "reply_to": { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array", "title": "Reply To" } }, "additionalProperties": false, "type": "object", "required": [ "session_id", "account_id", "mode", "subject", "body_html", "to" ], "title": "CreateDraftRequest", "description": "Create a new email draft.\n\n``mode`` must currently be ``human_only`` \u2014 ``copilot`` is reserved on\nthe data layer but the authoring path is out of scope for v1." }, "CreatePlaygroundSessionRequest": { "properties": { "catalog_slug": { "anyOf": [ { "type": "string", "maxLength": 128, "minLength": 1 }, { "type": "null" } ], "title": "Catalog Slug" }, "revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Revision Id" } }, "type": "object", "title": "CreatePlaygroundSessionRequest", "description": "Open a session against a catalog workflow (``catalog_slug``) or a DB revision\n(``revision_id``). Exactly one source must be supplied." }, "CreateRevisionRequest": { "properties": { "based_on_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Based On Revision Id" }, "name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "additionalProperties": false, "type": "object", "title": "CreateRevisionRequest", "description": "Request body for POST /assistants/{id}/revisions \u2014 create a new revision." }, "CreateRootRequest": { "properties": { "provider_item_id": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Provider Item Id" }, "url": { "anyOf": [ { "type": "string", "maxLength": 2048, "minLength": 1 }, { "type": "null" } ], "title": "Url" }, "s3_path": { "anyOf": [ { "type": "string", "maxLength": 1024, "minLength": 1 }, { "type": "null" } ], "title": "S3 Path" }, "resource_key": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Resource Key" }, "shortcut_target_resource_key": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Shortcut Target Resource Key" } }, "type": "object", "title": "CreateRootRequest" }, "CreateSessionRequest": { "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" } }, "type": "object", "title": "CreateSessionRequest" }, "CreateSourceRequest": { "properties": { "provider": { "type": "string", "title": "Provider", "default": "notion" }, "integration_connection_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Integration Connection Id" }, "config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Config" }, "credentials": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Credentials" } }, "type": "object", "title": "CreateSourceRequest" }, "CurrentOrgVoiceEntitlementResponse": { "properties": { "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "max_active_calls": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Active Calls" }, "inbound_reserved_calls": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Inbound Reserved Calls" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "organization_id", "updated_at" ], "title": "CurrentOrgVoiceEntitlementResponse" }, "CurrentOrgVoiceEntitlementUpdate": { "properties": { "inbound_reserved_calls": { "anyOf": [ { "type": "integer", "maximum": 10000.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Inbound Reserved Calls" } }, "additionalProperties": false, "type": "object", "title": "CurrentOrgVoiceEntitlementUpdate", "description": "Customer-facing org settings body.\n\nOrg admins can manage only the reserve-for-inbound headroom. The active-call\ncap (max_active_calls) is Feather-staff-managed via the admin endpoint." }, "CurrentTimeConfigResponse": { "properties": { "enabled": { "type": "boolean", "title": "Enabled" }, "timezone": { "type": "string", "title": "Timezone" }, "enabled_source": { "type": "string", "enum": [ "revision", "organization", "default" ], "title": "Enabled Source" }, "timezone_source": { "type": "string", "enum": [ "revision", "organization", "default" ], "title": "Timezone Source" }, "organization": { "$ref": "#/components/schemas/CurrentTimeSettings" }, "revision": { "anyOf": [ { "$ref": "#/components/schemas/CurrentTimeSettings" }, { "type": "null" } ] } }, "type": "object", "required": [ "enabled", "timezone", "enabled_source", "timezone_source" ], "title": "CurrentTimeConfigResponse", "description": "Effective clock settings, per-field provenance, and raw tier overrides." }, "CurrentTimeSettings": { "properties": { "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" }, "timezone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Timezone" } }, "additionalProperties": false, "type": "object", "title": "CurrentTimeSettings", "description": "One tier's optional current-time overrides.\n\n``None`` means inherit for that field. An empty object therefore clears the tier and inherits\nboth values. The API stores only non-null fields." }, "CurrentTimeSettingsUpdate": { "properties": { "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" }, "timezone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Timezone" } }, "additionalProperties": false, "type": "object", "title": "CurrentTimeSettingsUpdate", "description": "Full replacement for one current-time configuration tier.\n\nOmitted/null fields inherit. Sending ``{}`` therefore clears both overrides at this tier." }, "CursorPage_ApprovalRequestSummary_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ApprovalRequestSummary" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[ApprovalRequestSummary]" }, "CursorPage_ConversationExportJobResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ConversationExportJobResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[ConversationExportJobResponse]" }, "CursorPage_DocumentLogGroup_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/DocumentLogGroup" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[DocumentLogGroup]" }, "CursorPage_DocumentResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/DocumentResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[DocumentResponse]" }, "CursorPage_EndUserResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/EndUserResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[EndUserResponse]" }, "CursorPage_EvalRunResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/EvalRunResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[EvalRunResponse]" }, "CursorPage_EvaluatorBindingResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/EvaluatorBindingResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[EvaluatorBindingResponse]" }, "CursorPage_EvaluatorResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/EvaluatorResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[EvaluatorResponse]" }, "CursorPage_ExportJobResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ExportJobResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[ExportJobResponse]" }, "CursorPage_FailedTransferRead_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/FailedTransferRead" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[FailedTransferRead]" }, "CursorPage_FallbackEventResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/FallbackEventResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[FallbackEventResponse]" }, "CursorPage_GovernanceEventResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/GovernanceEventResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[GovernanceEventResponse]" }, "CursorPage_IngestionJobDocumentResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/IngestionJobDocumentResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[IngestionJobDocumentResponse]" }, "CursorPage_IngestionJobSummaryResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/IngestionJobSummaryResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[IngestionJobSummaryResponse]" }, "CursorPage_KBEvalCaseResultResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/KBEvalCaseResultResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[KBEvalCaseResultResponse]" }, "CursorPage_KBEvalRunResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/KBEvalRunResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[KBEvalRunResponse]" }, "CursorPage_KBEvalSuiteResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/KBEvalSuiteResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[KBEvalSuiteResponse]" }, "CursorPage_KnowledgeBaseResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/KnowledgeBaseResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[KnowledgeBaseResponse]" }, "CursorPage_LibraryPersonaResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/LibraryPersonaResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[LibraryPersonaResponse]" }, "CursorPage_MessageResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/src__ask_feather__schemas__MessageResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[MessageResponse]" }, "CursorPage_MockRequestLogCompact_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/MockRequestLogCompact" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[MockRequestLogCompact]" }, "CursorPage_MockResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/MockResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[MockResponse]" }, "CursorPage_OrgMemberResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/OrgMemberResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[OrgMemberResponse]" }, "CursorPage_PIIScrubLogResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PIIScrubLogResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[PIIScrubLogResponse]" }, "CursorPage_PendingClassificationItem_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PendingClassificationItem" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[PendingClassificationItem]" }, "CursorPage_PersonaResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PersonaResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[PersonaResponse]" }, "CursorPage_PolicyEvaluationResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PolicyEvaluationResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[PolicyEvaluationResponse]" }, "CursorPage_PolicyListResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PolicyListResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[PolicyListResponse]" }, "CursorPage_PolicyRevisionResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PolicyRevisionResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[PolicyRevisionResponse]" }, "CursorPage_QueuedCall_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/QueuedCall" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[QueuedCall]" }, "CursorPage_RetrievalAuditLogSummary_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/RetrievalAuditLogSummary" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[RetrievalAuditLogSummary]" }, "CursorPage_RootResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/RootResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[RootResponse]" }, "CursorPage_RouterConfigResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/RouterConfigResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[RouterConfigResponse]" }, "CursorPage_ScenarioResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ScenarioResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[ScenarioResponse]" }, "CursorPage_SimulationRunResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/SimulationRunResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[SimulationRunResponse]" }, "CursorPage_SimulationSuiteResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/SimulationSuiteResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[SimulationSuiteResponse]" }, "CursorPage_SimulationSuiteRunResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/SimulationSuiteRunResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[SimulationSuiteRunResponse]" }, "CursorPage_SimulationSuiteRunSummaryResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/SimulationSuiteRunSummaryResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[SimulationSuiteRunSummaryResponse]" }, "CursorPage_SmsOutboundOperationSummary_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/SmsOutboundOperationSummary" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[SmsOutboundOperationSummary]" }, "CursorPage_SourceResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/SourceResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[SourceResponse]" }, "CursorPage_TeamListResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/TeamListResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[TeamListResponse]" }, "CursorPage_TeamRevisionResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/TeamRevisionResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[TeamRevisionResponse]" }, "CursorPage_ToolResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ToolResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[ToolResponse]" }, "CursorPage_ToolRevisionResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ToolRevisionResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[ToolRevisionResponse]" }, "CursorPage_WorkflowListResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/src__workflow__api__schemas__WorkflowListResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[WorkflowListResponse]" }, "CursorPage_WorkflowRevisionResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/WorkflowRevisionResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[WorkflowRevisionResponse]" }, "CustomAllowPattern": { "properties": { "name": { "type": "string", "maxLength": 64, "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$", "title": "Name" }, "regex": { "type": "string", "maxLength": 1024, "minLength": 1, "title": "Regex" }, "description": { "anyOf": [ { "type": "string", "maxLength": 256 }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": [ "name", "regex" ], "title": "CustomAllowPattern", "description": "Regex pattern that suppresses PII detections (false-positive filter)." }, "CustomDenyPattern": { "properties": { "name": { "type": "string", "maxLength": 64, "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$", "title": "Name" }, "regex": { "type": "string", "maxLength": 1024, "minLength": 1, "title": "Regex" }, "replacement_label": { "type": "string", "maxLength": 64, "minLength": 1, "pattern": "^[A-Z][A-Z0-9_]*$", "title": "Replacement Label" }, "description": { "anyOf": [ { "type": "string", "maxLength": 256 }, { "type": "null" } ], "title": "Description" }, "score": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Score", "description": "Presidio confidence reported for matches of this pattern. Must be >= the org's score_threshold, otherwise Presidio silently drops every match and the pattern appears broken.", "default": 0.85 } }, "type": "object", "required": [ "name", "regex", "replacement_label" ], "title": "CustomDenyPattern", "description": "Regex pattern that should be treated as PII and redacted." }, "CustomMcpConnectResponse": { "properties": { "connection_id": { "type": "string", "format": "uuid", "title": "Connection Id" }, "status": { "type": "string", "title": "Status" }, "vendor": { "type": "string", "title": "Vendor" }, "authorize_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorize Url" }, "state": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "State" } }, "type": "object", "required": [ "connection_id", "status", "vendor" ], "title": "CustomMcpConnectResponse", "description": "Returned by ``POST /v1/integrations/connections/custom-mcp``.\n\n``authorize_url`` + ``state`` are populated only for the ``oauth`` path so\nthe frontend can redirect the user to the provider; the static paths return\n``status=\"active\"`` with both ``None``." }, "CustomMcpConnectionCreate": { "properties": { "nickname": { "type": "string", "title": "Nickname" }, "server_url": { "type": "string", "title": "Server Url" }, "transport": { "type": "string", "title": "Transport", "default": "sse" }, "auth_type": { "type": "string", "title": "Auth Type", "default": "none" }, "token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Token" }, "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key" }, "api_key_header": { "type": "string", "title": "Api Key Header", "default": "X-API-Key" }, "headers": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Headers" }, "oauth_authorize_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oauth Authorize Url" }, "oauth_token_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oauth Token Url" }, "oauth_client_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oauth Client Id" }, "oauth_client_secret": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oauth Client Secret" }, "oauth_scopes": { "items": { "type": "string" }, "type": "array", "title": "Oauth Scopes" } }, "additionalProperties": false, "type": "object", "required": [ "nickname", "server_url" ], "title": "CustomMcpConnectionCreate", "description": "Body for ``POST /v1/integrations/connections/custom-mcp``.\n\nOne shape for all four auth types. ``none``/``bearer``/``api_key`` are the\nstatic-credential paths (Step 6 \u2014 the row is born ``active``); ``oauth`` is\nthe authorization-code path (Step 7 \u2014 the row starts ``pending_oauth`` and\nthe response carries ``authorize_url`` + ``state``). The OAuth endpoint URLs\nare optional because :func:`discover_mcp_oauth` fills them in when the server\nadvertises RFC 9728 metadata; customer-supplied values override discovery." }, "CustomMcpDiscoverRequest": { "properties": { "server_url": { "type": "string", "title": "Server Url" }, "transport": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Transport" } }, "additionalProperties": false, "type": "object", "required": [ "server_url" ], "title": "CustomMcpDiscoverRequest", "description": "Body for ``POST /v1/integrations/connections/custom-mcp/discover``.\n\nA read-only pre-check (no DB row) so the connect UI can detect whether a\nserver supports OAuth Dynamic Client Registration before asking for a\nclient_id. ``transport`` is accepted for symmetry with the connect body but\nis advisory \u2014 discovery probes well-known HTTP endpoints transport-agnostically." }, "CustomMcpDiscoverResponse": { "properties": { "supports_dcr": { "type": "boolean", "title": "Supports Dcr" }, "authorize_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authorize Url" }, "token_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Token Url" }, "scopes": { "items": { "type": "string" }, "type": "array", "title": "Scopes" } }, "type": "object", "required": [ "supports_dcr" ], "title": "CustomMcpDiscoverResponse", "description": "Returned by ``POST /v1/integrations/connections/custom-mcp/discover``.\n\n``supports_dcr`` is the signal the UI needs: ``True`` \u21d2 hide the manual\nclient_id fields (the server advertises an RFC 7591 registration endpoint);\n``False`` \u21d2 no discoverable metadata, so the user must supply a client_id." }, "DashboardHealthMatrixRow": { "properties": { "tool_id": { "type": "string", "title": "Tool Id" }, "tool_name": { "type": "string", "title": "Tool Name" }, "tool_type": { "type": "string", "title": "Tool Type" }, "invocation_count": { "type": "integer", "title": "Invocation Count" }, "success_rate": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Success Rate" }, "p95_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "P95 Latency Ms" }, "current_error_rate": { "type": "number", "title": "Current Error Rate" }, "previous_error_rate": { "type": "number", "title": "Previous Error Rate" }, "error_trend_delta": { "type": "number", "title": "Error Trend Delta" }, "success_rate_score": { "type": "number", "title": "Success Rate Score" }, "latency_score": { "type": "number", "title": "Latency Score" }, "error_trend_score": { "type": "number", "title": "Error Trend Score" }, "health_score": { "type": "number", "title": "Health Score" } }, "type": "object", "required": [ "tool_id", "tool_name", "tool_type", "invocation_count", "current_error_rate", "previous_error_rate", "error_trend_delta", "success_rate_score", "latency_score", "error_trend_score", "health_score" ], "title": "DashboardHealthMatrixRow" }, "DashboardRecentErrorRow": { "properties": { "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp" }, "tool_id": { "type": "string", "title": "Tool Id" }, "tool_name": { "type": "string", "title": "Tool Name" }, "tool_type": { "type": "string", "title": "Tool Type" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" }, "agent_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Id" }, "session_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Session Id" }, "error_category": { "type": "string", "title": "Error Category" }, "status_code": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Status Code" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "latency_ms": { "type": "number", "title": "Latency Ms" } }, "type": "object", "required": [ "timestamp", "tool_id", "tool_name", "tool_type", "error_category", "latency_ms" ], "title": "DashboardRecentErrorRow" }, "DashboardTopToolsRow": { "properties": { "tool_id": { "type": "string", "title": "Tool Id" }, "tool_name": { "type": "string", "title": "Tool Name" }, "tool_type": { "type": "string", "title": "Tool Type" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" }, "invocations": { "type": "integer", "title": "Invocations" }, "error_count": { "type": "integer", "title": "Error Count" }, "success_rate_pct": { "type": "number", "title": "Success Rate Pct" }, "avg_latency_ms": { "type": "number", "title": "Avg Latency Ms" } }, "type": "object", "required": [ "tool_id", "tool_name", "tool_type", "invocations", "error_count", "success_rate_pct", "avg_latency_ms" ], "title": "DashboardTopToolsRow" }, "DecideApprovalRequest": { "properties": { "decision": { "type": "string", "enum": [ "approve", "deny" ], "title": "Decision" }, "note": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Note" } }, "type": "object", "required": [ "decision" ], "title": "DecideApprovalRequest", "description": "Body for the approve/deny mutation. The deciding actor comes from auth, not the body." }, "DeliveryLogItem": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "event_type": { "type": "string", "title": "Event Type" }, "outcome": { "type": "string", "title": "Outcome" }, "severity": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Severity" }, "dedupe_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Dedupe Key" }, "digest_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Digest Key" }, "detail": { "additionalProperties": true, "type": "object", "title": "Detail" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "event_type", "outcome", "severity", "dedupe_key", "digest_key", "detail", "created_at" ], "title": "DeliveryLogItem", "description": "One row of the delivery-decision audit log." }, "DeliveryLogResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/DeliveryLogItem" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "items" ], "title": "DeliveryLogResponse", "description": "A keyset-paginated page of delivery-decision rows. ``next_cursor`` is the\nopaque cursor to pass as ``before`` for the next page (``None`` on the last page)." }, "DependentResponse": { "properties": { "parent_workflow_id": { "type": "string", "format": "uuid", "title": "Parent Workflow Id" }, "parent_workflow_name": { "type": "string", "title": "Parent Workflow Name" }, "parent_revision_id": { "type": "string", "format": "uuid", "title": "Parent Revision Id" }, "parent_revision_name": { "type": "string", "title": "Parent Revision Name" }, "is_active_revision": { "type": "boolean", "title": "Is Active Revision" }, "instance_id": { "type": "string", "title": "Instance Id" }, "pinned_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Pinned Revision Id" }, "resolved_revision_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resolved Revision Id" }, "update_available": { "type": "boolean", "title": "Update Available" } }, "type": "object", "required": [ "parent_workflow_id", "parent_workflow_name", "parent_revision_id", "parent_revision_name", "is_active_revision", "instance_id", "update_available" ], "title": "DependentResponse", "description": "One parent workflow that embeds this component (\u00a710.6)." }, "DeploymentBinding": { "properties": { "resource_type": { "type": "string", "title": "Resource Type" }, "resource_id": { "type": "string", "format": "uuid", "title": "Resource Id" }, "display_name": { "type": "string", "title": "Display Name" } }, "type": "object", "required": [ "resource_type", "resource_id", "display_name" ], "title": "DeploymentBinding", "description": "One deployment binding that blocks archival (\u00a78)." }, "DeploymentsResponse": { "properties": { "bindings": { "items": { "$ref": "#/components/schemas/DeploymentBinding" }, "type": "array", "title": "Bindings" } }, "type": "object", "title": "DeploymentsResponse", "description": "GET /assistants/{id}/deployments (\u00a78)." }, "DestinationCreate": { "properties": { "channel_kind": { "$ref": "#/components/schemas/ChannelKind", "default": "slack" }, "target_id": { "type": "string", "minLength": 1, "title": "Target Id" }, "target_label": { "type": "string", "minLength": 1, "title": "Target Label" }, "connection_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Connection Id" } }, "additionalProperties": false, "type": "object", "required": [ "target_id", "target_label" ], "title": "DestinationCreate", "description": "Create (or re-verify) a destination. Verified on save via a test post." }, "DestinationResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "channel_kind": { "type": "string", "title": "Channel Kind" }, "connection_id": { "type": "string", "format": "uuid", "title": "Connection Id" }, "target_id": { "type": "string", "title": "Target Id" }, "target_label": { "type": "string", "title": "Target Label" }, "verified_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Verified At" }, "enabled": { "type": "boolean", "title": "Enabled" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "channel_kind", "connection_id", "target_id", "target_label", "verified_at", "enabled", "created_at", "updated_at" ], "title": "DestinationResponse" }, "DestinationSourceConfig": { "properties": { "type": { "type": "string", "const": "api_tool", "title": "Type", "default": "api_tool" }, "tool_id": { "type": "string", "title": "Tool Id" }, "input_mapping": { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" } ] }, "type": "object", "title": "Input Mapping" }, "response_path": { "type": "string", "title": "Response Path" } }, "additionalProperties": false, "type": "object", "required": [ "tool_id", "response_path" ], "title": "DestinationSourceConfig", "description": "How a transfer target's destination is resolved dynamically at transfer time.\n\nThe platform invokes the referenced ``api_call`` GET tool with\n``input_mapping`` (values may carry ``{{context_variable}}`` placeholders),\nextracts ``response_path`` from the tool's response, and validates the result\nas an E.164 / ``sip:`` destination. The lookup is never exposed to the LLM \u2014 it\nis a deterministic platform lookup executed through the shared\n``execute_api_call`` stack (SSRF-pinned client, KMS secret decrypt,\nresponse-field narrowing, retry). Secrets live on the referenced tool (not\nembedded in the transfer target)." }, "DisclaimerStatus": { "properties": { "revision_id": { "type": "string", "title": "Revision Id" }, "channel": { "type": "string", "title": "Channel" }, "blocking_response_policy": { "type": "boolean", "title": "Blocking Response Policy" }, "disclaimer": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Disclaimer" } }, "type": "object", "required": [ "revision_id", "channel", "blocking_response_policy" ], "title": "DisclaimerStatus", "description": "Whether an ENFORCING agent_response policy is in effect for an assistant + channel.\n\nDrives the dashboard's TTFT-disclaimer surfacing: when ``blocking_response_policy`` is\ntrue, an attached ``mode=enforce`` ``agent_response`` policy gates the reply against a\nverdict before the user sees it (a visible first-token delay on the always-gate path),\nso the author should see the disclaimer copy. v3 is transport-independent \u2014 the signal is\nenforce vs monitor, not a channel-resolved mode; ``channel`` is echoed for the caller only." }, "DiscoveredChannelResponse": { "properties": { "target_id": { "type": "string", "title": "Target Id" }, "target_label": { "type": "string", "title": "Target Label" }, "is_private": { "type": "boolean", "title": "Is Private", "default": false } }, "additionalProperties": false, "type": "object", "required": [ "target_id", "target_label" ], "title": "DiscoveredChannelResponse", "description": "A channel the bot can post to (provider-agnostic shape)." }, "DocumentCleanupSummaryRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "failed": { "type": "integer", "title": "Failed" }, "archived": { "type": "integer", "title": "Archived" }, "cleaned_up": { "type": "integer", "title": "Cleaned Up" }, "recovered": { "type": "integer", "title": "Recovered" }, "net_unrecovered_failures": { "type": "integer", "title": "Net Unrecovered Failures" }, "cleanup_rate_pct": { "type": "number", "title": "Cleanup Rate Pct" } }, "type": "object", "required": [ "time_bucket", "failed", "archived", "cleaned_up", "recovered", "net_unrecovered_failures", "cleanup_rate_pct" ], "title": "DocumentCleanupSummaryRow" }, "DocumentHealthResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/DocumentHealthRow" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "DocumentHealthResponse" }, "DocumentHealthRow": { "properties": { "doc_id": { "type": "string", "title": "Doc Id" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Url" }, "retrieved_count": { "type": "integer", "title": "Retrieved Count" }, "retrieved_session_count": { "type": "integer", "title": "Retrieved Session Count" }, "failed_session_count": { "type": "integer", "title": "Failed Session Count" }, "failure_rate": { "type": "number", "title": "Failure Rate" }, "cited_count": { "type": "integer", "title": "Cited Count" }, "implicated_count": { "type": "integer", "title": "Implicated Count" }, "retrieval_gap_count": { "type": "integer", "title": "Retrieval Gap Count" }, "incomplete_knowledge_count": { "type": "integer", "title": "Incomplete Knowledge Count" }, "outdated_knowledge_count": { "type": "integer", "title": "Outdated Knowledge Count" } }, "type": "object", "required": [ "doc_id", "retrieved_count", "retrieved_session_count", "failed_session_count", "failure_rate", "cited_count", "implicated_count", "retrieval_gap_count", "incomplete_knowledge_count", "outdated_knowledge_count" ], "title": "DocumentHealthRow" }, "DocumentIngestionTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "created": { "type": "integer", "title": "Created" }, "completed": { "type": "integer", "title": "Completed" }, "failed": { "type": "integer", "title": "Failed" }, "success_rate_pct": { "type": "number", "title": "Success Rate Pct" } }, "type": "object", "required": [ "time_bucket", "created", "completed", "failed", "success_rate_pct" ], "title": "DocumentIngestionTimeseriesRow" }, "DocumentLogGroup": { "properties": { "document_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Document Id" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "status": { "type": "string", "title": "Status" }, "logs": { "items": { "$ref": "#/components/schemas/IngestionTaskLogResponse" }, "type": "array", "title": "Logs" } }, "type": "object", "required": [ "document_id", "status", "logs" ], "title": "DocumentLogGroup", "description": "Task logs grouped for a single document within a bulk job." }, "DocumentPatch": { "properties": { "title": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Title" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "additionalProperties": false, "type": "object", "title": "DocumentPatch", "description": "Request body for PATCH /documents/{doc_id}.\n\nAt least one of title / metadata must be provided. metadata is a FULL\nreplacement (matches the PUT /knowledge-bases/{id} convention)." }, "DocumentProcessingLatencyRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "terminal_events": { "type": "integer", "title": "Terminal Events" }, "p50_ms": { "type": "number", "title": "P50 Ms" }, "p90_ms": { "type": "number", "title": "P90 Ms" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "p99_ms": { "type": "number", "title": "P99 Ms" }, "avg_ms": { "type": "number", "title": "Avg Ms" }, "max_ms": { "type": "number", "title": "Max Ms" } }, "type": "object", "required": [ "time_bucket", "terminal_events", "p50_ms", "p90_ms", "p95_ms", "p99_ms", "avg_ms", "max_ms" ], "title": "DocumentProcessingLatencyRow" }, "DocumentResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "knowledge_base_id": { "type": "string", "format": "uuid", "title": "Knowledge Base Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "title": { "type": "string", "title": "Title" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "active_version_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Active Version Id" }, "version_number": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Version Number" }, "state": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "State" }, "scan_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scan Status" }, "source_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Type" }, "chunk_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Chunk Count" }, "token_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Token Count" }, "segment_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Segment Count" }, "version_count": { "type": "integer", "title": "Version Count", "default": 0 }, "download_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Download Url" }, "normalized_download_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Normalized Download Url" }, "sensitivity": { "type": "string", "title": "Sensitivity", "default": "internal" }, "sensitivity_level": { "type": "integer", "title": "Sensitivity Level", "default": 10 }, "pii_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pii Status" }, "safe_title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Safe Title" }, "pii_sensitivity": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pii Sensitivity" }, "pii_coverage_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pii Coverage Status" } }, "type": "object", "required": [ "id", "knowledge_base_id", "organization_id", "title", "created_at", "updated_at" ], "title": "DocumentResponse" }, "DocumentRetrievalByAgentRow": { "properties": { "agent_id": { "type": "string", "title": "Agent Id" }, "total": { "type": "integer", "title": "Total" }, "hits": { "type": "integer", "title": "Hits" }, "misses": { "type": "integer", "title": "Misses" }, "hit_rate_pct": { "type": "number", "title": "Hit Rate Pct" }, "avg_duration_ms": { "type": "number", "title": "Avg Duration Ms" } }, "type": "object", "required": [ "agent_id", "total", "hits", "misses", "hit_rate_pct", "avg_duration_ms" ], "title": "DocumentRetrievalByAgentRow" }, "DocumentRetrievalTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "total": { "type": "integer", "title": "Total" }, "hits": { "type": "integer", "title": "Hits" }, "misses": { "type": "integer", "title": "Misses" }, "reranked": { "type": "integer", "title": "Reranked" }, "errors": { "type": "integer", "title": "Errors" }, "hit_rate_pct": { "type": "number", "title": "Hit Rate Pct" }, "avg_results": { "type": "number", "title": "Avg Results" }, "avg_duration_ms": { "type": "number", "title": "Avg Duration Ms" }, "p50_ms": { "type": "number", "title": "P50 Ms" }, "p90_ms": { "type": "number", "title": "P90 Ms" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "p99_ms": { "type": "number", "title": "P99 Ms" } }, "type": "object", "required": [ "time_bucket", "total", "hits", "misses", "reranked", "errors", "hit_rate_pct", "avg_results", "avg_duration_ms", "p50_ms", "p90_ms", "p95_ms", "p99_ms" ], "title": "DocumentRetrievalTimeseriesRow" }, "DocumentVersionResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "document_id": { "type": "string", "format": "uuid", "title": "Document Id" }, "version_number": { "type": "integer", "title": "Version Number" }, "state": { "type": "string", "title": "State" }, "scan_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scan Status" }, "source_type": { "type": "string", "title": "Source Type" }, "source_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Url" }, "filename": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Filename" }, "chunk_count": { "type": "integer", "title": "Chunk Count" }, "token_count": { "type": "integer", "title": "Token Count" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "processed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Processed At" }, "download_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Download Url" }, "governance_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Governance Status" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "pii_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pii Status" }, "sensitivity": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sensitivity" }, "pii_detection_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Pii Detection Count" }, "pii_entity_types": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Pii Entity Types" }, "pii_coverage_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pii Coverage Status" }, "pii_scrubbed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Pii Scrubbed At" }, "safe_title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Safe Title" } }, "type": "object", "required": [ "id", "document_id", "version_number", "state", "source_type", "source_url", "chunk_count", "token_count", "error_message", "created_at", "processed_at" ], "title": "DocumentVersionResponse" }, "DomainCreate": { "properties": { "hostname": { "type": "string", "maxLength": 253, "minLength": 1, "title": "Hostname" }, "include_subdomains": { "type": "boolean", "title": "Include Subdomains", "default": false } }, "type": "object", "required": [ "hostname" ], "title": "DomainCreate" }, "DomainResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "hostname": { "type": "string", "title": "Hostname" }, "include_subdomains": { "type": "boolean", "title": "Include Subdomains" }, "verification_state": { "type": "string", "title": "Verification State" }, "verification_token": { "type": "string", "title": "Verification Token" }, "verified_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Verified At" }, "last_checked_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Checked At" }, "failure_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Failure Reason" } }, "type": "object", "required": [ "id", "hostname", "include_subdomains", "verification_state", "verification_token", "verified_at", "last_checked_at", "failure_reason" ], "title": "DomainResponse" }, "DraftApprovalState": { "type": "string", "enum": [ "unsubmitted", "pending", "approved", "rejected", "auto_approved" ], "title": "DraftApprovalState" }, "DraftMode": { "type": "string", "enum": [ "human_only", "copilot" ], "title": "DraftMode" }, "DraftResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "account_id": { "type": "string", "format": "uuid", "title": "Account Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "in_reply_to_turn_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "In Reply To Turn Id" }, "mode": { "$ref": "#/components/schemas/DraftMode" }, "status": { "$ref": "#/components/schemas/DraftStatus" }, "approval_state": { "$ref": "#/components/schemas/DraftApprovalState" }, "subject": { "type": "string", "title": "Subject" }, "body_html": { "type": "string", "title": "Body Html" }, "body_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Body Text" }, "to": { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array", "title": "To" }, "cc": { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array", "title": "Cc" }, "bcc": { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array", "title": "Bcc" }, "reply_to": { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array", "title": "Reply To" }, "approved_by_member_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Approved By Member Id" }, "approved_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Approved At" }, "sent_turn_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Sent Turn Id" }, "evidence_snapshot": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Evidence Snapshot" }, "auto_send_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Auto Send Reason" }, "discarded_by_member_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Discarded By Member Id" }, "discarded_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Discarded At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "additionalProperties": false, "type": "object", "required": [ "id", "organization_id", "session_id", "account_id", "agent_id", "in_reply_to_turn_id", "mode", "status", "approval_state", "subject", "body_html", "body_text", "to", "cc", "bcc", "reply_to", "approved_by_member_id", "approved_at", "sent_turn_id", "evidence_snapshot", "auto_send_reason", "discarded_by_member_id", "discarded_at", "created_at", "updated_at" ], "title": "DraftResponse", "description": "One draft row, including the v1 audit snapshot when present.\n\n``evidence_snapshot`` is exposed as the raw dict from\n``metadata_[\"evidence_snapshot\"]`` \u2014 the shape is captured by\n``EVIDENCE_SCHEMA_VERSION`` so consumers can branch on it." }, "DraftStatus": { "type": "string", "enum": [ "draft", "submitted", "approved", "sending", "sent", "failed", "discarded" ], "title": "DraftStatus" }, "DrivePickerConfigResponse": { "properties": { "access_token": { "type": "string", "title": "Access Token" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "app_id": { "type": "string", "title": "App Id" }, "api_key": { "type": "string", "title": "Api Key" } }, "type": "object", "required": [ "access_token", "app_id", "api_key" ], "title": "DrivePickerConfigResponse", "description": "Short-lived config the SPA needs to open the Google Picker.\n\nThe ``access_token`` is a freshly-leased OAuth token (never persisted, never\nlogged); ``app_id`` (GCP project number) and ``api_key`` (browser key) come\nfrom server config so they stay out of the SPA bundle. Served with\n``Cache-Control: no-store``." }, "DtmfInputSpec": { "properties": { "expects_input": { "type": "boolean", "title": "Expects Input", "default": true }, "max_digits": { "anyOf": [ { "type": "integer", "maximum": 64.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Max Digits" }, "termination_digit": { "anyOf": [ { "type": "string", "maxLength": 1 }, { "type": "null" } ], "title": "Termination Digit" }, "inter_digit_timeout_ms": { "anyOf": [ { "type": "integer", "maximum": 60000.0, "minimum": 250.0 }, { "type": "null" } ], "title": "Inter Digit Timeout Ms" }, "prefix": { "anyOf": [ { "type": "string", "maxLength": 32 }, { "type": "null" } ], "title": "Prefix" } }, "additionalProperties": false, "type": "object", "title": "DtmfInputSpec", "description": "Per-node keypad-collection tuning (authoring config + runtime directive).\n\nAll fields optional: an unset field means \"leave the assistant-level default\nin place\" (the voice config's ``dtmf_*`` values). ``expects_input`` is the\nintent flag \u2014 a node that explicitly expects keypad entry \u2014 used so the host\ncan apply the retune even when no numeric override differs from the default.\n``prefix`` overrides the turn-text label (collection mechanics + framing)." }, "EdgeChange": { "properties": { "from_node": { "type": "string", "title": "From Node" }, "to_node": { "type": "string", "title": "To Node" }, "changes": { "items": { "$ref": "#/components/schemas/FieldChange" }, "type": "array", "title": "Changes" } }, "type": "object", "required": [ "from_node", "to_node" ], "title": "EdgeChange", "description": "Field-level changes within a matched (same from_node, to_node) edge pair." }, "EdgeCollectionDiff": { "properties": { "added": { "items": { "$ref": "#/components/schemas/ProjectedEdge" }, "type": "array", "title": "Added" }, "removed": { "items": { "$ref": "#/components/schemas/ProjectedEdge" }, "type": "array", "title": "Removed" }, "changed": { "items": { "$ref": "#/components/schemas/EdgeChange" }, "type": "array", "title": "Changed" } }, "type": "object", "title": "EdgeCollectionDiff", "description": "Diff over the edge collection." }, "EffectiveAnalyzerConfig": { "properties": { "active": { "type": "boolean", "title": "Active" }, "override": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "effective_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Effective Model" }, "effective_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Effective Config" }, "source": { "anyOf": [ { "type": "string", "enum": [ "assistant_revision", "workflow_revision", "workflow_router", "organization", "default" ] }, { "type": "null" } ], "title": "Source" }, "inactive_reason": { "anyOf": [ { "type": "string", "enum": [ "workflow_disabled", "no_effective_workflow" ] }, { "type": "null" } ], "title": "Inactive Reason" } }, "type": "object", "required": [ "active" ], "title": "EffectiveAnalyzerConfig" }, "EffectiveNodeToolSurface": { "properties": { "node_id": { "type": "string", "title": "Node Id" }, "tools": { "items": { "$ref": "#/components/schemas/EffectiveToolSurfaceEntry" }, "type": "array", "title": "Tools" } }, "type": "object", "required": [ "node_id" ], "title": "EffectiveNodeToolSurface" }, "EffectiveRuntimeConfigResponse": { "properties": { "workflow_enabled": { "type": "boolean", "title": "Workflow Enabled" }, "runtime_mode": { "type": "string", "enum": [ "bare", "workflow" ], "title": "Runtime Mode" }, "workflow_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Workflow Revision Id" }, "analyzer": { "$ref": "#/components/schemas/EffectiveAnalyzerConfig" }, "current_time": { "$ref": "#/components/schemas/CurrentTimeConfigResponse" } }, "type": "object", "required": [ "workflow_enabled", "runtime_mode", "analyzer", "current_time" ], "title": "EffectiveRuntimeConfigResponse", "description": "Resolved runtime mode and provenance-bearing behavioral settings." }, "EffectiveTemplateResponse": { "properties": { "event_type": { "type": "string", "title": "Event Type" }, "channel_kind": { "type": "string", "title": "Channel Kind" }, "source": { "type": "string", "title": "Source" }, "slots": { "$ref": "#/components/schemas/TemplateSlots" }, "version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Version" }, "default_slots": { "$ref": "#/components/schemas/TemplateSlots" }, "variables": { "additionalProperties": true, "type": "object", "title": "Variables" } }, "type": "object", "required": [ "event_type", "channel_kind", "source", "slots", "version", "default_slots", "variables" ], "title": "EffectiveTemplateResponse", "description": "The effective template for an (org, type, channel): the slots that render,\nwhere they came from, the platform default, and the variables manifest." }, "EffectiveToolSurfaceEntry": { "properties": { "name": { "type": "string", "title": "Name" }, "canonical_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Canonical Key" }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "mentionable": { "type": "boolean", "title": "Mentionable", "default": false }, "description": { "type": "string", "title": "Description", "default": "" }, "parameters": { "additionalProperties": true, "type": "object", "title": "Parameters" }, "provenance": { "type": "string", "enum": [ "util", "platform", "ambient", "node", "runtime" ], "title": "Provenance" }, "locked": { "type": "boolean", "title": "Locked" }, "dynamic": { "type": "boolean", "title": "Dynamic", "default": false }, "selection_sources": { "items": { "type": "string", "enum": [ "assistant_mention", "node_mention", "node_attachment" ] }, "type": "array", "title": "Selection Sources" } }, "type": "object", "required": [ "name", "provenance", "locked" ], "title": "EffectiveToolSurfaceEntry", "description": "One model-callable capability after all inheritance/dedup rules are applied." }, "EffectiveToolSurfaceResponse": { "properties": { "revision_id": { "type": "string", "format": "uuid", "title": "Revision Id" }, "workflow_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Workflow Revision Id" }, "graph_version": { "type": "integer", "title": "Graph Version", "default": 0 }, "utility_catalog": { "items": { "$ref": "#/components/schemas/UtilityCatalogEntry" }, "type": "array", "title": "Utility Catalog" }, "assistant_tools": { "items": { "$ref": "#/components/schemas/EffectiveToolSurfaceEntry" }, "type": "array", "title": "Assistant Tools" }, "nodes": { "items": { "$ref": "#/components/schemas/EffectiveNodeToolSurface" }, "type": "array", "title": "Nodes" } }, "type": "object", "required": [ "revision_id" ], "title": "EffectiveToolSurfaceResponse", "description": "Backend-resolved per-AgentNode authoring surface for one assistant revision." }, "EmailAddress": { "properties": { "address": { "type": "string", "maxLength": 320, "pattern": "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$", "title": "Address" }, "name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Name" } }, "additionalProperties": false, "type": "object", "required": [ "address" ], "title": "EmailAddress", "description": "A single RFC 5321 mailbox + optional display name." }, "EmailInboundEvent": { "properties": { "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "account_id": { "type": "string", "format": "uuid", "title": "Account Id" }, "provider": { "$ref": "#/components/schemas/MailboxProvider" }, "provider_thread_id": { "type": "string", "maxLength": 255, "title": "Provider Thread Id" }, "provider_message_id": { "type": "string", "maxLength": 998, "title": "Provider Message Id" }, "rfc822_message_id": { "type": "string", "maxLength": 998, "title": "Rfc822 Message Id" }, "in_reply_to": { "anyOf": [ { "type": "string", "maxLength": 998 }, { "type": "null" } ], "title": "In Reply To" }, "references": { "items": { "type": "string" }, "type": "array", "title": "References" }, "from": { "$ref": "#/components/schemas/EmailAddress" }, "to": { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array", "title": "To" }, "cc": { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array", "title": "Cc" }, "reply_to": { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array", "title": "Reply To" }, "subject": { "type": "string", "maxLength": 998, "title": "Subject" }, "body_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Body Text" }, "body_html": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Body Html" }, "headers": { "items": { "prefixItems": [ { "type": "string" }, { "type": "string" } ], "type": "array", "maxItems": 2, "minItems": 2 }, "type": "array", "title": "Headers" }, "attachments": { "items": { "$ref": "#/components/schemas/WireAttachment" }, "type": "array", "title": "Attachments" }, "mime_size_bytes": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Mime Size Bytes" }, "raw_storage_object_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Raw Storage Object Id" }, "received_at": { "type": "string", "format": "date-time", "title": "Received At" }, "received_idempotency_key": { "type": "string", "maxLength": 255, "title": "Received Idempotency Key" } }, "additionalProperties": false, "type": "object", "required": [ "organization_id", "account_id", "provider", "provider_thread_id", "provider_message_id", "rfc822_message_id", "from", "subject", "received_at", "received_idempotency_key" ], "title": "EmailInboundEvent", "description": "Canonical inbound email envelope.\n\nProduced by the canonicalizer (ENG-416) from a Nylas inbound payload\n(Gmail or Microsoft 365). Provider-agnostic: every provider collapses to\nthis shape above the connector boundary.\n\n``received_idempotency_key`` is a deterministic SHA-256 of\n``(account_id, provider_message_id)`` so webhook redelivery is idempotent\nat the persistence layer." }, "EmbeddingCostByKbRow": { "properties": { "kb_id": { "type": "string", "title": "Kb Id" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "input_tokens": { "type": "integer", "title": "Input Tokens" }, "invocations": { "type": "integer", "title": "Invocations" }, "failed": { "type": "integer", "title": "Failed" } }, "type": "object", "required": [ "kb_id", "total_cost_usd", "input_tokens", "invocations", "failed" ], "title": "EmbeddingCostByKbRow" }, "EmbeddingCostByModelRow": { "properties": { "model": { "type": "string", "title": "Model" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" }, "embedding_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Type" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "input_tokens": { "type": "integer", "title": "Input Tokens" }, "invocations": { "type": "integer", "title": "Invocations" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "avg_ms": { "type": "number", "title": "Avg Ms" } }, "type": "object", "required": [ "model", "total_cost_usd", "input_tokens", "invocations", "p95_ms", "avg_ms" ], "title": "EmbeddingCostByModelRow" }, "EmbeddingCostByOrgDailyRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "input_tokens": { "type": "integer", "title": "Input Tokens" }, "invocations": { "type": "integer", "title": "Invocations" } }, "type": "object", "required": [ "time_bucket", "total_cost_usd", "input_tokens", "invocations" ], "title": "EmbeddingCostByOrgDailyRow" }, "EmbeddingCostByProviderRow": { "properties": { "provider": { "type": "string", "title": "Provider" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "input_tokens": { "type": "integer", "title": "Input Tokens" }, "texts_count": { "type": "integer", "title": "Texts Count" }, "calls": { "type": "integer", "title": "Calls" }, "error_rate": { "type": "number", "title": "Error Rate" } }, "type": "object", "required": [ "provider", "total_cost_usd", "input_tokens", "texts_count", "calls", "error_rate" ], "title": "EmbeddingCostByProviderRow" }, "EmbeddingCostBySourceRow": { "properties": { "source": { "type": "string", "title": "Source" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "input_tokens": { "type": "integer", "title": "Input Tokens" }, "invocations": { "type": "integer", "title": "Invocations" }, "failed": { "type": "integer", "title": "Failed" } }, "type": "object", "required": [ "source", "total_cost_usd", "input_tokens", "invocations", "failed" ], "title": "EmbeddingCostBySourceRow" }, "EmbeddingDashboardEnvelope": { "properties": { "cost_timeseries": { "items": { "$ref": "#/components/schemas/EmbeddingCostByOrgDailyRow" }, "type": "array", "title": "Cost Timeseries" }, "cost_by_model": { "items": { "$ref": "#/components/schemas/EmbeddingCostByModelRow" }, "type": "array", "title": "Cost By Model" }, "cost_by_source": { "items": { "$ref": "#/components/schemas/EmbeddingCostBySourceRow" }, "type": "array", "title": "Cost By Source" }, "reliability": { "items": { "$ref": "#/components/schemas/EmbeddingReliabilityRow" }, "type": "array", "title": "Reliability" } }, "type": "object", "required": [ "cost_timeseries", "cost_by_model", "cost_by_source", "reliability" ], "title": "EmbeddingDashboardEnvelope", "description": "One-shot embedding dashboard \u2014 fans out four existing embedding pipes." }, "EmbeddingDenseVsSparseRow": { "properties": { "embedding_type": { "type": "string", "title": "Embedding Type" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "input_tokens": { "type": "integer", "title": "Input Tokens" }, "texts_count": { "type": "integer", "title": "Texts Count" }, "calls": { "type": "integer", "title": "Calls" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "error_rate": { "type": "number", "title": "Error Rate" } }, "type": "object", "required": [ "embedding_type", "total_cost_usd", "input_tokens", "texts_count", "calls", "p95_ms", "error_rate" ], "title": "EmbeddingDenseVsSparseRow" }, "EmbeddingErrorBreakdownRow": { "properties": { "error_category": { "type": "string", "title": "Error Category" }, "occurrences": { "type": "integer", "title": "Occurrences" } }, "type": "object", "required": [ "error_category", "occurrences" ], "title": "EmbeddingErrorBreakdownRow" }, "EmbeddingLatencyTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "p50_ms": { "type": "number", "title": "P50 Ms" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "p99_ms": { "type": "number", "title": "P99 Ms" }, "avg_ms": { "type": "number", "title": "Avg Ms" }, "calls": { "type": "integer", "title": "Calls" } }, "type": "object", "required": [ "time_bucket", "p50_ms", "p95_ms", "p99_ms", "avg_ms", "calls" ], "title": "EmbeddingLatencyTimeseriesRow" }, "EmbeddingModelOption": { "properties": { "name": { "type": "string", "title": "Name" }, "provider": { "type": "string", "title": "Provider" }, "dimensions": { "items": { "type": "integer" }, "type": "array", "title": "Dimensions" }, "default_dimensions": { "type": "integer", "title": "Default Dimensions" } }, "type": "object", "required": [ "name", "provider", "dimensions", "default_dimensions" ], "title": "EmbeddingModelOption" }, "EmbeddingReliabilityRow": { "properties": { "model": { "type": "string", "title": "Model" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" }, "embedding_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Type" }, "invocations": { "type": "integer", "title": "Invocations" }, "failed": { "type": "integer", "title": "Failed" }, "error_rate": { "type": "number", "title": "Error Rate" }, "missing_usage_calls": { "type": "integer", "title": "Missing Usage Calls" }, "usage_missing_rate": { "type": "number", "title": "Usage Missing Rate" }, "texts": { "type": "integer", "title": "Texts" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "avg_ms": { "type": "number", "title": "Avg Ms" } }, "type": "object", "required": [ "model", "invocations", "failed", "error_rate", "missing_usage_calls", "usage_missing_rate", "texts", "p95_ms", "avg_ms" ], "title": "EmbeddingReliabilityRow" }, "EmbeddingRetryImpactRow": { "properties": { "first_try_cost_usd": { "type": "number", "title": "First Try Cost Usd" }, "retry_cost_usd": { "type": "number", "title": "Retry Cost Usd" }, "first_try_calls": { "type": "integer", "title": "First Try Calls" }, "retry_calls": { "type": "integer", "title": "Retry Calls" }, "retry_cost_share": { "type": "number", "title": "Retry Cost Share" } }, "type": "object", "required": [ "first_try_cost_usd", "retry_cost_usd", "first_try_calls", "retry_calls", "retry_cost_share" ], "title": "EmbeddingRetryImpactRow" }, "EnableRecommendedResponse": { "properties": { "enabled_event_types": { "items": { "type": "string" }, "type": "array", "title": "Enabled Event Types" } }, "additionalProperties": false, "type": "object", "required": [ "enabled_event_types" ], "title": "EnableRecommendedResponse" }, "EndSessionRequest": { "properties": { "end_user_id": { "type": "string", "format": "uuid", "title": "End User Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" } }, "type": "object", "required": [ "end_user_id", "session_id" ], "title": "EndSessionRequest", "description": "Admin-triggered runtime end-session.\n\nDistinct from ``POST /v1/sessions/{id}/close`` which only flips the DB\nstatus. This drives the full ``Runtime.end_session`` pipeline (AOP\ncleanup, memory flush, OTel ``session.end`` span, ``triggered_by=admin``).\n\n``session_id`` is required: ``Runtime.from_authenticated`` falls through\nto ``get_or_create_active_session`` when it's missing, which would mint\na fresh ACTIVE session purely to end it on the same request. Requiring\nthe caller to name the target session prevents that ghost-session path\nand forces a clear 422 instead of a misleading 200.\n\n``farewell_text`` is intentionally omitted: the runtime ignores it\nunder ``PersistStrategy.PER_TURN`` (used by every HTTP channel today),\nso accepting it would silently drop the value. Callers that want a\nuser-visible farewell should send a final ``POST /v1/runtime/turn``\nwith the goodbye message before calling this endpoint." }, "EndUserProfileResponse": { "properties": { "uid": { "type": "string", "title": "Uid" }, "org_id": { "type": "string", "title": "Org Id" }, "status": { "type": "string", "title": "Status" }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "primary_email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Primary Email" }, "primary_phone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Primary Phone" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata", "default": {} }, "org_external_end_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org External End User Id" }, "contacts": { "items": { "$ref": "#/components/schemas/ContactResponse" }, "type": "array", "title": "Contacts", "default": [] } }, "type": "object", "required": [ "uid", "org_id", "status" ], "title": "EndUserProfileResponse" }, "EndUserResponse": { "properties": { "uid": { "type": "string", "title": "Uid" }, "org_id": { "type": "string", "title": "Org Id" }, "status": { "type": "string", "title": "Status" }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "primary_email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Primary Email" }, "primary_phone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Primary Phone" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata", "default": {} }, "org_external_end_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org External End User Id" }, "merged_into": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Merged Into" }, "dropped_external_ids": { "items": { "type": "string" }, "type": "array", "title": "Dropped External Ids", "default": [] } }, "type": "object", "required": [ "uid", "org_id", "status" ], "title": "EndUserResponse" }, "EndUserUpdate": { "properties": { "display_name": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Display Name" }, "primary_email": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Primary Email" }, "primary_phone": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Primary Phone" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "org_external_end_user_id": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Org External End User Id" } }, "type": "object", "title": "EndUserUpdate" }, "EnforcementPlanPoint": { "properties": { "enforcement_point": { "type": "string", "title": "Enforcement Point" }, "policies": { "items": { "$ref": "#/components/schemas/EnforcementPlanPolicy" }, "type": "array", "title": "Policies" }, "dominance_by_transport": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Dominance By Transport" }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings" } }, "type": "object", "required": [ "enforcement_point", "policies", "dominance_by_transport" ], "title": "EnforcementPlanPoint", "description": "One enforcement point in the plan: its policies + the per-transport dominance outcome.\n\n``dominance_by_transport`` is keyed by transport class value; each entry is the\nplain-language \u00a76 composition outcome at ``agent_response`` (e.g. a strict expression\nforcing whole-reply buffering upgrades the response-judge from best-effort to a true\nblock). At the other points there is no streaming-vs-buffer dominance, so the note states\nthe point always pre-gates. ``warnings`` carries block-wins / terminal-first composition\nflags surfaced first-party." }, "EnforcementPlanPolicy": { "properties": { "policy_id": { "type": "string", "format": "uuid", "title": "Policy Id" }, "policy_name": { "type": "string", "title": "Policy Name" }, "check_type": { "type": "string", "title": "Check Type" }, "action": { "type": "string", "title": "Action" }, "mode": { "type": "string", "title": "Mode" }, "strictness": { "type": "string", "title": "Strictness" }, "tool_target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Target" }, "priority": { "type": "integer", "title": "Priority" }, "strategies": { "items": { "$ref": "#/components/schemas/EnforcementPlanStrategy" }, "type": "array", "title": "Strategies" } }, "type": "object", "required": [ "policy_id", "policy_name", "check_type", "action", "mode", "strictness", "priority", "strategies" ], "title": "EnforcementPlanPolicy", "description": "One attached policy at an enforcement point, in resolved execution order.\n\n``strategies`` is the per-transport-class resolution (blocking + streaming) \u2014 the\nphysically-correct mechanism is transport-derived, never authored. The authored dials\n(``mode``/``strictness``) and the check/action are surfaced verbatim so the plan reads\nas \"what you wrote \u2192 what actually happens per channel\"." }, "EnforcementPlanResponse": { "properties": { "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "policies_enabled": { "type": "boolean", "title": "Policies Enabled" }, "points": { "items": { "$ref": "#/components/schemas/EnforcementPlanPoint" }, "type": "array", "title": "Points" } }, "type": "object", "required": [ "agent_id", "policies_enabled", "points" ], "title": "EnforcementPlanResponse", "description": "The full no-turn enforcement plan for one assistant (read-only describe surface)." }, "EnforcementPlanStrategy": { "properties": { "transport_class": { "type": "string", "title": "Transport Class" }, "strategy": { "type": "string", "title": "Strategy" }, "consequence": { "type": "string", "title": "Consequence" } }, "type": "object", "required": [ "transport_class", "strategy", "consequence" ], "title": "EnforcementPlanStrategy", "description": "The platform-derived strategy a single check resolves to on one transport class." }, "EngineeringTurnSummary": { "properties": { "turn_id": { "type": "string", "format": "uuid", "title": "Turn Id" }, "conversation_id": { "type": "string", "format": "uuid", "title": "Conversation Id" }, "schema_version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Schema Version" }, "mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mode" }, "turn_ttft_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Turn Ttft Ms" }, "perceived_ttft_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Perceived Ttft Ms" }, "turn_duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Turn Duration Ms" }, "tokens_out": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Tokens Out" }, "router_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Router Model" }, "router_ttft_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Router Ttft Ms" }, "router_duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Router Duration Ms" }, "router_tokens_out": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Router Tokens Out" }, "router_target_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Router Target Id" }, "router_intent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Router Intent" }, "router_fallback_applied": { "type": "boolean", "title": "Router Fallback Applied", "default": false }, "speculation_savings_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Speculation Savings Ms" }, "wasted_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Wasted Tokens" }, "flags": { "items": { "type": "string" }, "type": "array", "title": "Flags" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "additionalProperties": false, "type": "object", "required": [ "turn_id", "conversation_id", "created_at" ], "title": "EngineeringTurnSummary", "description": "Lightweight per-turn summary for the session-level engineering list (ENG-689 T3).\n\nReconstructed from Langfuse observations (the inverse of the T1 projector), this preserves the\nexact field set the retired ``TurnTelemetryListItem`` exposed so the frontend list contract is\nunchanged. ``created_at`` is the turn root's wall-clock start (the projector backdated every\nspan to it), not a DB insertion time." }, "ErrorBreakdownByStatusRow": { "properties": { "status_code": { "type": "integer", "title": "Status Code" }, "count": { "type": "integer", "title": "Count" }, "top_error_messages": { "items": { "type": "string" }, "type": "array", "title": "Top Error Messages" } }, "type": "object", "required": [ "status_code", "count", "top_error_messages" ], "title": "ErrorBreakdownByStatusRow" }, "ErrorRateRow": { "properties": { "organization_id": { "type": "string", "title": "Organization Id" }, "terminal_failures": { "type": "integer", "title": "Terminal Failures" }, "terminal_total": { "type": "integer", "title": "Terminal Total" }, "error_rate": { "type": "number", "title": "Error Rate" } }, "type": "object", "required": [ "organization_id", "terminal_failures", "terminal_total", "error_rate" ], "title": "ErrorRateRow" }, "ErrorResponse": { "properties": { "error": { "type": "string", "title": "Error" }, "message": { "type": "string", "title": "Message" }, "retryable": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Retryable" }, "retry_after": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Retry After" } }, "type": "object", "required": [ "error", "message" ], "title": "ErrorResponse", "description": "Standard error response returned by all API error handlers." }, "ErrorTrendRow": { "properties": { "current_error_rate": { "type": "number", "title": "Current Error Rate" }, "previous_error_rate": { "type": "number", "title": "Previous Error Rate" }, "delta": { "type": "number", "title": "Delta" }, "direction": { "type": "string", "title": "Direction" }, "current_total": { "type": "integer", "title": "Current Total" }, "previous_total": { "type": "integer", "title": "Previous Total" } }, "type": "object", "required": [ "current_error_rate", "previous_error_rate", "delta", "direction", "current_total", "previous_total" ], "title": "ErrorTrendRow" }, "EscalationRateRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "total_sessions": { "type": "integer", "title": "Total Sessions" }, "escalated_sessions": { "type": "integer", "title": "Escalated Sessions" }, "escalation_rate_pct": { "type": "number", "title": "Escalation Rate Pct" } }, "type": "object", "required": [ "time_bucket", "total_sessions", "escalated_sessions", "escalation_rate_pct" ], "title": "EscalationRateRow" }, "EvalActivityBucket": { "properties": { "date": { "type": "string", "format": "date", "title": "Date" }, "total": { "type": "integer", "title": "Total", "default": 0 }, "failed": { "type": "integer", "title": "Failed", "default": 0 }, "errored": { "type": "integer", "title": "Errored", "default": 0 } }, "type": "object", "required": [ "date" ], "title": "EvalActivityBucket", "description": "One UTC day of eval-run activity." }, "EvalActivityResponse": { "properties": { "period_start": { "type": "string", "format": "date-time", "title": "Period Start" }, "period_end": { "type": "string", "format": "date-time", "title": "Period End" }, "buckets": { "items": { "$ref": "#/components/schemas/EvalActivityBucket" }, "type": "array", "title": "Buckets" } }, "type": "object", "required": [ "period_start", "period_end" ], "title": "EvalActivityResponse", "description": "Day-bucketed eval-run counts over a window, for the activity calendar.\n\nDays are **UTC**. Every day in ``[period_start, period_end)`` is present,\nincluding zero days, so a calendar grid needs no client-side gap filling." }, "EvalRunDetailResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "evaluator_id": { "type": "string", "format": "uuid", "title": "Evaluator Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "channel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" }, "session_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Session Type" }, "status": { "type": "string", "title": "Status" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "finished_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Finished At" }, "error_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Text" }, "prompt_snapshot": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Prompt Snapshot" }, "threshold_snapshot": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Threshold Snapshot" }, "config_snapshot": { "additionalProperties": true, "type": "object", "title": "Config Snapshot" }, "severity_snapshot": { "type": "string", "title": "Severity Snapshot" }, "format_snapshot": { "type": "string", "title": "Format Snapshot" }, "is_critical_snapshot": { "type": "boolean", "title": "Is Critical Snapshot", "default": false }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "scores": { "items": { "$ref": "#/components/schemas/EvalScoreResponse" }, "type": "array", "title": "Scores" }, "session": { "anyOf": [ { "$ref": "#/components/schemas/ConversationSummary" }, { "type": "null" } ] }, "turns": { "anyOf": [ { "items": { "$ref": "#/components/schemas/TurnView" }, "type": "array" }, { "type": "null" } ], "title": "Turns" }, "turns_truncated": { "type": "boolean", "title": "Turns Truncated", "default": false }, "recording": { "anyOf": [ { "$ref": "#/components/schemas/RecordingRef" }, { "type": "null" } ] } }, "type": "object", "required": [ "id", "organization_id", "session_id", "evaluator_id", "status", "started_at", "finished_at", "error_text", "prompt_snapshot", "threshold_snapshot", "severity_snapshot", "format_snapshot", "created_at" ], "title": "EvalRunDetailResponse", "description": "``EvalRunResponse`` superset; extras stay null/[]/false unless requested." }, "EvalRunResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "evaluator_id": { "type": "string", "format": "uuid", "title": "Evaluator Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "channel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" }, "session_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Session Type" }, "status": { "type": "string", "title": "Status" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "finished_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Finished At" }, "error_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Text" }, "prompt_snapshot": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Prompt Snapshot" }, "threshold_snapshot": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Threshold Snapshot" }, "config_snapshot": { "additionalProperties": true, "type": "object", "title": "Config Snapshot" }, "severity_snapshot": { "type": "string", "title": "Severity Snapshot" }, "format_snapshot": { "type": "string", "title": "Format Snapshot" }, "is_critical_snapshot": { "type": "boolean", "title": "Is Critical Snapshot", "default": false }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "scores": { "items": { "$ref": "#/components/schemas/EvalScoreResponse" }, "type": "array", "title": "Scores" } }, "type": "object", "required": [ "id", "organization_id", "session_id", "evaluator_id", "status", "started_at", "finished_at", "error_text", "prompt_snapshot", "threshold_snapshot", "severity_snapshot", "format_snapshot", "created_at" ], "title": "EvalRunResponse" }, "EvalScoreResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "eval_run_id": { "type": "string", "format": "uuid", "title": "Eval Run Id" }, "value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Value" }, "raw_value": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Raw Value" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "passed": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Passed" }, "confidence": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Confidence" }, "rationale": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Rationale" }, "severity": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Severity" }, "blocking": { "type": "boolean", "title": "Blocking" }, "evidence_observation_ids": { "items": { "type": "string" }, "type": "array", "title": "Evidence Observation Ids" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "eval_run_id", "value", "raw_value", "label", "passed", "confidence", "rationale", "severity", "blocking", "created_at" ], "title": "EvalScoreResponse" }, "EvalTaskAcceptedResponse": { "properties": { "task_id": { "type": "string", "title": "Task Id" }, "status": { "type": "string", "const": "queued", "title": "Status", "default": "queued" } }, "type": "object", "required": [ "task_id" ], "title": "EvalTaskAcceptedResponse", "description": "202 acknowledgement returned by reevaluate / retry endpoints." }, "EvaluationSettingsUpdate": { "properties": { "evaluate_live": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Evaluate Live" } }, "additionalProperties": false, "type": "object", "title": "EvaluationSettingsUpdate", "description": "PATCH /assistants/{id}/operational-settings/evaluation (\u00a73.2)." }, "EvaluatorBindingCreate": { "properties": { "evaluator_id": { "type": "string", "format": "uuid", "title": "Evaluator Id" }, "scope": { "type": "string", "enum": [ "scenario", "agent" ], "title": "Scope" }, "scenario_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Scenario Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "is_critical": { "type": "boolean", "title": "Is Critical", "default": false } }, "type": "object", "required": [ "evaluator_id", "scope" ], "title": "EvaluatorBindingCreate", "description": "Create a binding scoped to either a scenario or an agent.\n\nThe ``scope`` discriminator must match the populated id: scope='scenario'\nrequires ``scenario_id`` and forbids ``agent_id`` (and vice-versa).\n\n``is_critical=True`` marks this binding's runs as load-bearing for the\nsession's headline success/partial/failure verdict. Non-critical bindings\nstill run and display, but don't move the session pill." }, "EvaluatorBindingResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "evaluator_id": { "type": "string", "format": "uuid", "title": "Evaluator Id" }, "scope": { "type": "string", "title": "Scope" }, "scenario_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Scenario Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "is_critical": { "type": "boolean", "title": "Is Critical" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "evaluator_id", "scope", "scenario_id", "agent_id", "is_critical", "created_at" ], "title": "EvaluatorBindingResponse" }, "EvaluatorBindingUpdate": { "properties": { "is_critical": { "type": "boolean", "title": "Is Critical" } }, "type": "object", "required": [ "is_critical" ], "title": "EvaluatorBindingUpdate", "description": "Update a mutable field on a binding. Only ``is_critical`` is mutable." }, "EvaluatorCreate": { "properties": { "name": { "type": "string", "maxLength": 200, "title": "Name" }, "description": { "anyOf": [ { "type": "string", "maxLength": 4096 }, { "type": "null" } ], "title": "Description" }, "owner": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ], "title": "Owner" }, "status": { "type": "string", "enum": [ "active", "inactive", "archived" ], "title": "Status", "default": "active" }, "config": { "additionalProperties": true, "type": "object", "title": "Config" }, "prompt": { "anyOf": [ { "type": "string", "maxLength": 16384 }, { "type": "null" } ], "title": "Prompt" }, "threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Threshold" }, "severity": { "type": "string", "enum": [ "info", "low", "medium", "high", "critical" ], "title": "Severity", "default": "medium" }, "judge_model_override": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ], "title": "Judge Model Override" }, "kind": { "type": "string", "enum": [ "model_judge", "deterministic" ], "title": "Kind", "default": "model_judge" }, "format": { "type": "string", "enum": [ "boolean", "enum", "numeric", "score" ], "title": "Format", "default": "score" }, "tags": { "items": { "type": "string" }, "type": "array", "maxItems": 64, "title": "Tags" } }, "type": "object", "required": [ "name" ], "title": "EvaluatorCreate" }, "EvaluatorResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "kind": { "type": "string", "title": "Kind" }, "format": { "type": "string", "title": "Format" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "owner": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Owner" }, "status": { "type": "string", "title": "Status" }, "config": { "additionalProperties": true, "type": "object", "title": "Config" }, "prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Prompt" }, "threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Threshold" }, "severity": { "type": "string", "title": "Severity" }, "judge_model_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Judge Model Override" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags" }, "created_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Created By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "kind", "format", "description", "owner", "status", "prompt", "threshold", "severity", "judge_model_override", "created_at", "updated_at" ], "title": "EvaluatorResponse" }, "EvaluatorUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string", "maxLength": 4096 }, { "type": "null" } ], "title": "Description" }, "owner": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ], "title": "Owner" }, "status": { "anyOf": [ { "type": "string", "enum": [ "active", "inactive", "archived" ] }, { "type": "null" } ], "title": "Status" }, "config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Config" }, "prompt": { "anyOf": [ { "type": "string", "maxLength": 16384 }, { "type": "null" } ], "title": "Prompt" }, "threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Threshold" }, "severity": { "anyOf": [ { "type": "string", "enum": [ "info", "low", "medium", "high", "critical" ] }, { "type": "null" } ], "title": "Severity" }, "judge_model_override": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ], "title": "Judge Model Override" }, "format": { "anyOf": [ { "type": "string", "enum": [ "boolean", "enum", "numeric", "score" ] }, { "type": "null" } ], "title": "Format" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "maxItems": 64 }, { "type": "null" } ], "title": "Tags" } }, "additionalProperties": false, "type": "object", "title": "EvaluatorUpdate" }, "EventCatalogEntry": { "properties": { "type": { "$ref": "#/components/schemas/EventType" }, "description": { "type": "string", "title": "Description" }, "group": { "type": "string", "title": "Group", "description": "Display grouping, e.g. 'Conversation'." }, "sensitivity": { "$ref": "#/components/schemas/Sensitivity" } }, "type": "object", "required": [ "type", "description", "group", "sensitivity" ], "title": "EventCatalogEntry", "description": "One entitlement-visible webhook event in the org's catalog." }, "EventCatalogResponse": { "properties": { "events": { "items": { "$ref": "#/components/schemas/EventCatalogEntry" }, "type": "array", "title": "Events" } }, "type": "object", "required": [ "events" ], "title": "EventCatalogResponse", "description": "Supported customer webhook event types." }, "EventType": { "type": "string", "enum": [ "conversation.session.completed", "session.extraction.completed", "integration.connection.error", "integration.connection.disconnected", "knowledge_base.document.indexed", "knowledge_base.document.failed", "knowledge_base.document.quarantined", "policy.violation.detected" ], "title": "EventType", "description": "Named platform events in the v1 launch catalog." }, "EvidenceDisplay": { "properties": { "label": { "type": "string", "title": "Label" }, "short_label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Short Label" }, "citation_marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Citation Marker" } }, "type": "object", "required": [ "label" ], "title": "EvidenceDisplay" }, "EvidenceItem": { "properties": { "evidence_id": { "type": "string", "format": "uuid", "title": "Evidence Id" }, "rag_query_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Rag Query Id" }, "attribution_level": { "type": "string", "const": "exposed", "title": "Attribution Level", "default": "exposed" }, "prompt_order": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Prompt Order" }, "provenance": { "$ref": "#/components/schemas/EvidenceProvenance" }, "position": { "anyOf": [ { "$ref": "#/components/schemas/EvidencePosition" }, { "type": "null" } ] }, "score": { "anyOf": [ { "$ref": "#/components/schemas/EvidenceScore" }, { "type": "null" } ] }, "usage_constraints": { "anyOf": [ { "$ref": "#/components/schemas/EvidenceUsageConstraints" }, { "type": "null" } ] }, "display": { "anyOf": [ { "$ref": "#/components/schemas/EvidenceDisplay" }, { "type": "null" } ] }, "source_trust": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Trust" }, "scan_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scan Status" } }, "type": "object", "required": [ "evidence_id", "provenance" ], "title": "EvidenceItem" }, "EvidenceItemDisplay": { "properties": { "citation_marker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Citation Marker" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "short_label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Short Label" }, "document_title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Document Title" }, "version_number": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Version Number" }, "section": { "anyOf": [ { "$ref": "#/components/schemas/EvidenceSection" }, { "type": "null" } ] }, "deep_link": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Deep Link" }, "kb_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Kb Id" }, "kb_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Kb Name" }, "document_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Document Id" }, "source_provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Provider" }, "external_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Id" }, "external_uri": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Uri" } }, "type": "object", "title": "EvidenceItemDisplay", "description": "One end-user source card \u2014 the ``display`` projection of an\n:class:`EvidenceItem`.\n\nCarries card fields plus SOURCE IDENTITY (which KB, which document, where it\ncame from). Audit internals stay structurally absent: raw/basis/band scores,\n``content_sha256``, ``chunk_id`` / ``chunk_index``, ``rag_query_id``,\n``prompt_order`` and usage constraints are never emitted here.\n\nSource identity is on the end-user card deliberately. A white-label consumer\nrenders \"Sources shown to the model\" in its own UI and needs to say *which*\nsource, and to link its own record for it \u2014 which needs the ids, not just a\nhuman label. None of these fields expose retrieval behavior." }, "EvidencePackageDisplay": { "properties": { "view": { "type": "string", "const": "display", "title": "View", "default": "display" }, "schema_version": { "type": "integer", "title": "Schema Version", "default": 1 }, "package_id": { "type": "string", "format": "uuid", "title": "Package Id" }, "conversation_id": { "type": "string", "format": "uuid", "title": "Conversation Id" }, "message_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Message Id" }, "turn_id": { "type": "string", "format": "uuid", "title": "Turn Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "evidence_status": { "type": "string", "enum": [ "complete", "partial", "failed", "not_applicable" ], "title": "Evidence Status" }, "kb_used": { "type": "boolean", "title": "Kb Used", "default": false }, "items": { "items": { "$ref": "#/components/schemas/EvidenceItemDisplay" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "package_id", "conversation_id", "turn_id", "created_at", "evidence_status", "items" ], "title": "EvidencePackageDisplay", "description": "End-user serialization view \u2014 source cards only, NO audit internals.\n\nA distinct model (not :class:`EvidencePackage` with a narrower config) so the\nomitted fields are absent from the schema, and so ``view`` yields a clean\ntagged union. ``organization_id``, ``agent_id`` and ``status_reason`` are\nfull-only and intentionally not present here.\n\n``kb_used`` exists because ``status_reason`` is deliberately full-only: several\nof its values (``build_failed``, ``item_cap_applied``,\n``partial_missing_source_rows``) describe internal packing/DB state that an\nend-user surface must not see. But a consumer still has one legitimate question\nthat ``items=[]`` alone cannot answer \u2014 *was the knowledge base consulted on\nthis turn at all?* An empty card set means \"no KB search ran\" under\n``not_applicable`` but \"searched, packed nothing\" under ``complete``. ``kb_used``\nanswers that directly instead of making every client hard-code which\n``evidence_status`` value is the magic one." }, "EvidencePackageFull": { "properties": { "schema_version": { "type": "integer", "title": "Schema Version", "default": 1 }, "package_id": { "type": "string", "format": "uuid", "title": "Package Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "conversation_id": { "type": "string", "format": "uuid", "title": "Conversation Id" }, "message_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Message Id" }, "turn_id": { "type": "string", "format": "uuid", "title": "Turn Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "evidence_status": { "type": "string", "enum": [ "complete", "partial", "failed", "not_applicable" ], "title": "Evidence Status" }, "status_reason": { "anyOf": [ { "type": "string", "enum": [ "complete", "no_kb_used", "no_exposed_chunks", "answerability_suppressed", "partial_missing_source_rows", "item_cap_applied", "build_failed" ] }, { "type": "null" } ], "title": "Status Reason" }, "items": { "items": { "$ref": "#/components/schemas/EvidenceItem" }, "type": "array", "title": "Items" }, "view": { "type": "string", "const": "full", "title": "View", "default": "full" } }, "type": "object", "required": [ "package_id", "organization_id", "conversation_id", "turn_id", "created_at", "evidence_status", "items" ], "title": "EvidencePackageFull", "description": "Staff/audit serialization view \u2014 the full envelope plus a ``view`` tag.\n\nAdds only the ``full`` discriminator literal; every audit field\n(scores/basis/band, ``rag_query_id``, chunk ids, hashes, constraints,\n``status_reason``) rides through unchanged from :class:`EvidencePackage`." }, "EvidencePosition": { "properties": { "type": { "type": "string", "const": "text", "title": "Type", "default": "text" }, "start_char": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Start Char" }, "end_char": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "End Char" } }, "type": "object", "title": "EvidencePosition" }, "EvidenceProvenance": { "properties": { "kb_id": { "type": "string", "format": "uuid", "title": "Kb Id" }, "kb_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Kb Name" }, "document_id": { "type": "string", "format": "uuid", "title": "Document Id" }, "document_title": { "type": "string", "title": "Document Title" }, "version_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Version Id" }, "version_number": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Version Number" }, "source_type": { "type": "string", "title": "Source Type" }, "source_provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Provider" }, "deep_link": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Deep Link" }, "external_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Id" }, "external_uri": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Uri" }, "inline_sources": { "items": { "$ref": "#/components/schemas/InlineSource" }, "type": "array", "title": "Inline Sources" }, "filename": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Filename" }, "section": { "anyOf": [ { "$ref": "#/components/schemas/EvidenceSection" }, { "type": "null" } ] }, "chunk_id": { "type": "string", "title": "Chunk Id" }, "chunk_index": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Chunk Index" }, "content_sha256": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content Sha256" }, "last_processed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Processed At" } }, "type": "object", "required": [ "kb_id", "document_id", "document_title", "source_type", "chunk_id" ], "title": "EvidenceProvenance" }, "EvidenceScore": { "properties": { "retrieval_score_raw": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Retrieval Score Raw" }, "retrieval_score_display": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Retrieval Score Display" }, "score_basis": { "type": "string", "enum": [ "raw_hybrid_dotproduct", "minmax_normalized", "reranked_original_score", "grouped_unranked" ], "title": "Score Basis" }, "band": { "type": "string", "enum": [ "high", "medium", "low", "unknown" ], "title": "Band", "default": "unknown" }, "calibrated": { "type": "boolean", "title": "Calibrated", "default": false } }, "type": "object", "required": [ "score_basis" ], "title": "EvidenceScore", "description": "Relevance signal \u2014 NOT a probability (``calibrated=False`` always in v1)." }, "EvidenceSection": { "properties": { "path_titles": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Path Titles" }, "path_numbers": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Path Numbers" }, "display_label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Label" }, "confidence": { "type": "string", "enum": [ "parsed", "derived", "unknown" ], "title": "Confidence", "default": "unknown" } }, "type": "object", "title": "EvidenceSection", "description": "A document section path \u2014 never a fabricated ``\u00a7N``." }, "EvidenceTurnListResponse": { "properties": { "turns": { "items": { "$ref": "#/components/schemas/EvidenceTurnRow" }, "type": "array", "title": "Turns" }, "missing_turn_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Missing Turn Ids" } }, "type": "object", "title": "EvidenceTurnListResponse" }, "EvidenceTurnRow": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "role": { "type": "string", "title": "Role" }, "content": { "type": "string", "title": "Content" }, "is_compacted": { "type": "boolean", "title": "Is Compacted", "default": false }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "session_id", "role", "content", "created_at" ], "title": "EvidenceTurnRow" }, "EvidenceUsageConstraints": { "properties": { "sensitivity": { "anyOf": [ { "type": "string", "enum": [ "public", "internal", "confidential", "restricted" ] }, { "type": "null" } ], "title": "Sensitivity" }, "sensitivity_level": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Sensitivity Level" }, "visibility_mode": { "anyOf": [ { "type": "string", "enum": [ "org_wide", "audience" ] }, { "type": "null" } ], "title": "Visibility Mode" }, "audience_tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Audience Tags" }, "constraint_source": { "type": "string", "enum": [ "acl_columns", "metadata", "none" ], "title": "Constraint Source", "default": "none" }, "raw": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Raw" } }, "type": "object", "title": "EvidenceUsageConstraints", "description": "Carried, not enforced (v1)." }, "ExportFileStatus": { "properties": { "name": { "type": "string", "title": "Name" }, "sha256_plaintext": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sha256 Plaintext" }, "download_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Download Token" } }, "type": "object", "required": [ "name" ], "title": "ExportFileStatus", "description": "Per-file status; ``download_token`` is present only when downloadable." }, "ExportJobResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "status": { "type": "string", "title": "Status" }, "export_format": { "type": "string", "title": "Export Format" }, "window_start": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Window Start" }, "window_end": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Window End" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "finalized_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Finalized At" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "total_rows": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Total Rows" }, "partial_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Partial Count" }, "failed_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Failed Count" }, "error_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Code" }, "filters": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Filters" }, "files": { "items": { "$ref": "#/components/schemas/ExportFileStatus" }, "type": "array", "title": "Files", "default": [] } }, "type": "object", "required": [ "id", "status", "export_format", "created_at" ], "title": "ExportJobResponse", "description": "Status view of an export job (with per-file download tokens when ready)." }, "ExportRequest": { "properties": { "export_format": { "type": "string", "enum": [ "csv", "ndjson" ], "title": "Export Format", "default": "csv" }, "start": { "type": "string", "format": "date-time", "title": "Start" }, "end": { "type": "string", "format": "date-time", "title": "End" }, "kb_ids": { "anyOf": [ { "items": { "type": "string", "format": "uuid" }, "type": "array" }, { "type": "null" } ], "title": "Kb Ids" }, "statuses": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Statuses" }, "actor_user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Actor User Id" }, "session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" } }, "type": "object", "required": [ "start", "end" ], "title": "ExportRequest", "description": "POST body for an async encrypted audit export." }, "ExpressionFieldSchema": { "properties": { "path": { "type": "string", "title": "Path", "description": "Dotted path, e.g. 'response.text'. A namespace ends in '.*'." }, "type": { "type": "string", "title": "Type", "description": "Value type hint: string / boolean / int / uuid / any / namespace." }, "description": { "type": "string", "title": "Description" }, "namespace": { "type": "boolean", "title": "Namespace", "default": false } }, "type": "object", "required": [ "path", "type", "description" ], "title": "ExpressionFieldSchema", "description": "One referenceable context path in the expression DSL." }, "ExpressionPointSchema": { "properties": { "enforcement_point": { "$ref": "#/components/schemas/PolicyEnforcementPoint" }, "content_paths": { "items": { "$ref": "#/components/schemas/ExpressionFieldSchema" }, "type": "array", "title": "Content Paths" } }, "type": "object", "required": [ "enforcement_point", "content_paths" ], "title": "ExpressionPointSchema", "description": "The content surface a check can read at one enforcement point.\n\n``content_paths`` are the point-SPECIFIC paths (the user message, the tool\ncall/result, the reply). The cross-point ``common_fields`` (state / identity /\nsession) live once at the top level of :class:`ExpressionSchemaResponse`." }, "ExpressionPredicateSchema": { "properties": { "name": { "type": "string", "title": "Name" }, "signature": { "type": "string", "title": "Signature" }, "description": { "type": "string", "title": "Description" } }, "type": "object", "required": [ "name", "signature", "description" ], "title": "ExpressionPredicateSchema", "description": "One predicate call form available in the DSL." }, "ExpressionSchemaResponse": { "properties": { "predicates": { "items": { "$ref": "#/components/schemas/ExpressionPredicateSchema" }, "type": "array", "title": "Predicates" }, "operators": { "items": { "type": "string" }, "type": "array", "title": "Operators" }, "common_fields": { "items": { "$ref": "#/components/schemas/ExpressionFieldSchema" }, "type": "array", "title": "Common Fields" }, "points": { "items": { "$ref": "#/components/schemas/ExpressionPointSchema" }, "type": "array", "title": "Points" } }, "type": "object", "required": [ "predicates", "operators", "common_fields", "points" ], "title": "ExpressionSchemaResponse", "description": "The full authoring surface for the ``expression`` check DSL." }, "ExpressiveStyle": { "type": "string", "enum": [ "warm", "professional", "upbeat", "calm", "empathetic", "confident", "dynamic" ], "title": "ExpressiveStyle", "description": "Selectable delivery style for Inworld TTS-2 expressive steering.\n\nEach value maps to a tone block interpolated into the shared expressive\ncontract (:func:`src.runtime.speech_output.build_inworld_tts2_expressive_directive`)\nand, in the voice layer, to a default Inworld ``delivery_mode``. ``WARM``\nreproduces the original single-directive behavior and is the default applied\nwhen a config enables expressive speech without picking a style." }, "ExternalIdConflictResponse": { "properties": { "error": { "type": "string", "const": "EXTERNAL_ID_CONFLICT", "title": "Error", "default": "EXTERNAL_ID_CONFLICT" }, "message": { "type": "string", "title": "Message" }, "conflicting_owner_id": { "type": "string", "title": "Conflicting Owner Id" }, "org_external_end_user_id": { "type": "string", "title": "Org External End User Id" } }, "type": "object", "required": [ "message", "conflicting_owner_id", "org_external_end_user_id" ], "title": "ExternalIdConflictResponse", "description": "Returned with 409 when a PUT's ``org_external_end_user_id`` collides with\nanother end user's and the caller has not opted into the destructive merge\nvia ``?allow_merge=true``. No mutation occurs \u2014 the target end user is\nuntouched and still exists." }, "ExtractionJobListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ExtractionJobResponse" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "ExtractionJobListResponse" }, "ExtractionJobResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "trigger_source": { "type": "string", "enum": [ "close", "rerun" ], "title": "Trigger Source" }, "status": { "type": "string", "enum": [ "queued", "processing", "completed", "failed", "skipped", "cancelled" ], "title": "Status" }, "schema_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Schema Id" }, "schema_version": { "type": "integer", "title": "Schema Version" }, "attempts": { "type": "integer", "title": "Attempts" }, "skip_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Skip Reason" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "failed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Failed At" } }, "type": "object", "required": [ "id", "trigger_source", "status", "schema_id", "schema_version", "attempts", "skip_reason", "error_message", "created_at", "started_at", "completed_at", "failed_at" ], "title": "ExtractionJobResponse" }, "ExtractionRerunRequest": { "properties": { "schema_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Schema Id" } }, "type": "object", "title": "ExtractionRerunRequest" }, "ExtractionResultResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "schema_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Schema Id" }, "schema_version": { "type": "integer", "title": "Schema Version" }, "status": { "type": "string", "enum": [ "completed", "partial", "validation_failed", "failed", "skipped" ], "title": "Status" }, "skip_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Skip Reason" }, "extracted_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Extracted Data" }, "validation_errors": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Validation Errors" }, "missing_required_fields": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Missing Required Fields" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "model_used": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Used" }, "tokens_input": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Tokens Input" }, "tokens_output": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Tokens Output" }, "latency_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Latency Ms" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "session_id", "agent_id", "schema_id", "schema_version", "status", "skip_reason", "extracted_data", "validation_errors", "missing_required_fields", "error_message", "model_used", "tokens_input", "tokens_output", "latency_ms", "created_at", "updated_at" ], "title": "ExtractionResultResponse" }, "ExtractionSchemaCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Description" }, "schema_json": { "additionalProperties": true, "type": "object", "title": "Schema Json" } }, "type": "object", "required": [ "name", "schema_json" ], "title": "ExtractionSchemaCreate" }, "ExtractionSchemaListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ExtractionSchemaResponse" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "ExtractionSchemaListResponse" }, "ExtractionSchemaResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "version": { "type": "integer", "title": "Version" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "schema_json": { "additionalProperties": true, "type": "object", "title": "Schema Json" }, "status": { "type": "string", "enum": [ "draft", "active", "archived" ], "title": "Status" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "agent_id", "version", "name", "description", "schema_json", "status", "created_at", "updated_at" ], "title": "ExtractionSchemaResponse" }, "ExtractionSchemaUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Description" }, "status": { "anyOf": [ { "type": "string", "enum": [ "active", "archived" ] }, { "type": "null" } ], "title": "Status" } }, "type": "object", "title": "ExtractionSchemaUpdate", "description": "Partial update of an extraction schema \u2014 only supplied fields change.\n\nExplicit ``null`` is rejected for non-nullable columns (``name``,\n``status``) \u2014 omit the field instead. ``description`` is the only\nnullable column, so it accepts ``null`` as a clear-the-column signal.\nMirrors ``PersonaUpdate`` so a wire-level ``{\"name\": null}`` fails\nfast instead of returning a misleading 200 with no change applied." }, "FailedTransferRead": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "conversation_id": { "type": "string", "format": "uuid", "title": "Conversation Id" }, "customer_phone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Customer Phone" }, "supervisor_phone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Supervisor Phone" }, "failure_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Failure Reason" }, "fallback_mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Fallback Mode" }, "briefing_snippet": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Briefing Snippet" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "dialing_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Dialing At" }, "ended_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Ended At" } }, "additionalProperties": false, "type": "object", "required": [ "id", "conversation_id", "customer_phone", "supervisor_phone", "failure_reason", "fallback_mode", "briefing_snippet", "status", "created_at", "dialing_at", "ended_at" ], "title": "FailedTransferRead", "description": "Inbox list item for a failed warm-transfer attempt." }, "FallbackAnalysisRow": { "properties": { "attempt_kind": { "type": "string", "title": "Attempt Kind" }, "invocations": { "type": "integer", "title": "Invocations" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "success_rate": { "type": "number", "title": "Success Rate" }, "p95_ms": { "type": "number", "title": "P95 Ms" } }, "type": "object", "required": [ "attempt_kind", "invocations", "total_cost_usd", "success_rate", "p95_ms" ], "title": "FallbackAnalysisRow" }, "FallbackEventResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "failed_model": { "type": "string", "title": "Failed Model" }, "next_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Model" }, "error_class": { "type": "string", "title": "Error Class" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "invocation_type": { "type": "string", "title": "Invocation Type" }, "router_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Router Config Id" }, "session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "failed_model", "next_model", "error_class", "error_message", "invocation_type", "router_config_id", "session_id", "agent_id", "created_at" ], "title": "FallbackEventResponse" }, "FallbackRateRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "total_calls": { "type": "integer", "title": "Total Calls" }, "fallback_calls": { "type": "integer", "title": "Fallback Calls" }, "fallback_rate": { "type": "number", "title": "Fallback Rate" } }, "type": "object", "required": [ "time_bucket", "total_calls", "fallback_calls", "fallback_rate" ], "title": "FallbackRateRow" }, "FeedbackEntry": { "properties": { "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp" }, "rating": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Rating" }, "comment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Comment" } }, "type": "object", "required": [ "timestamp" ], "title": "FeedbackEntry", "description": "Free-form user feedback against a session.\n\nNullable in v1 \u2014 no capture surface yet. Shape is reserved so downstream\nconsumers can plan against it." }, "FieldChange": { "properties": { "field": { "type": "string", "title": "Field" }, "op": { "type": "string", "enum": [ "added", "removed", "modified" ], "title": "Op" }, "text_diff": { "anyOf": [ { "$ref": "#/components/schemas/TextDiff" }, { "type": "null" } ] }, "before": { "anyOf": [ {}, { "type": "null" } ], "title": "Before" }, "after": { "anyOf": [ {}, { "type": "null" } ], "title": "After" } }, "type": "object", "required": [ "field", "op" ], "title": "FieldChange", "description": "Change to a single named field within a node, config block, or collection entry." }, "FieldChangeCollection": { "properties": { "added": { "items": { "$ref": "#/components/schemas/FieldChange" }, "type": "array", "title": "Added" }, "removed": { "items": { "$ref": "#/components/schemas/FieldChange" }, "type": "array", "title": "Removed" }, "changed": { "items": { "$ref": "#/components/schemas/FieldChange" }, "type": "array", "title": "Changed" } }, "type": "object", "title": "FieldChangeCollection", "description": "Generic collection diff for scalar config fields." }, "FirstResponseTimeRow": { "properties": { "total_sessions": { "type": "integer", "title": "Total Sessions" }, "avg_seconds": { "type": "number", "title": "Avg Seconds" }, "p50_seconds": { "type": "number", "title": "P50 Seconds" }, "p90_seconds": { "type": "number", "title": "P90 Seconds" }, "p95_seconds": { "type": "number", "title": "P95 Seconds" } }, "type": "object", "required": [ "total_sessions", "avg_seconds", "p50_seconds", "p90_seconds", "p95_seconds" ], "title": "FirstResponseTimeRow" }, "FirstSpeakingConfig": { "properties": { "first_speaker": { "type": "string", "enum": [ "agent", "user" ], "title": "First Speaker", "default": "agent" }, "mode": { "type": "string", "enum": [ "static", "dynamic" ], "title": "Mode", "default": "static" }, "text": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Text" }, "instructions": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Instructions" }, "interruptible": { "type": "boolean", "title": "Interruptible", "default": true }, "ai_disclosure_text": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Ai Disclosure Text" } }, "type": "object", "title": "FirstSpeakingConfig", "description": "Config for the AI's opening turn (no user input yet).\n\nLives inside ``ChannelConfig`` \u2014 first-speaking is per-channel.\n\nMode-agnostic fields:\n- ``first_speaker``: ``\"agent\"`` opens the call with the rendered\n message; ``\"user\"`` skips the greeting (caller speaks first).\n Non-voice channels treat the inbound user message as the\n ``\"user\"`` opener and ignore this field at runtime.\n\nGreeting source (only applies when ``first_speaker=\"agent\"``):\n- ``static`` mode: ``text`` is required and emitted verbatim\n (templated via the shared ``{{var}}`` engine, ``src.shared.templating.render``).\n- ``dynamic`` mode: ``instructions`` are sent to the model router\n with the agent persona to render an opening line (instructions\n are templated). When omitted/empty, ``instructions`` falls back\n to ``DEFAULT_DYNAMIC_FIRST_SPEAKING_INSTRUCTIONS`` so operators\n who just want a generic friendly opener don't have to author copy.\n\nVoice-only fields (ignored on non-audio channels):\n- ``interruptible``: whether the caller can barge in mid-greeting.\n- ``ai_disclosure_text``: regulatory disclosure (e.g. CA SB 1001),\n played as an uninterruptible TTS frame BEFORE the greeting.\n Disclosure plays even when ``first_speaker=\"user\"`` because the\n regulation requires the disclosure regardless of who speaks first." }, "GapEventSummary": { "properties": { "gap_event_id": { "type": "string", "format": "uuid", "title": "Gap Event Id" }, "candidate_id": { "type": "string", "title": "Candidate Id" }, "canonical_question": { "type": "string", "title": "Canonical Question" }, "effective_gap_type": { "type": "string", "title": "Effective Gap Type" }, "original_gap_type": { "type": "string", "title": "Original Gap Type" }, "corrected_gap_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Corrected Gap Type" }, "severity": { "type": "string", "title": "Severity" }, "completion_impact": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Completion Impact" }, "confidence": { "type": "number", "title": "Confidence" }, "validation_confidence": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Validation Confidence" }, "product_area": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Product Area" }, "cluster_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Cluster Id" }, "claims": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Claims" }, "retrieved_doc_ids": { "items": { "type": "string" }, "type": "array", "title": "Retrieved Doc Ids" }, "cited_doc_ids": { "items": { "type": "string" }, "type": "array", "title": "Cited Doc Ids" }, "implicated_doc_ids": { "items": { "type": "string" }, "type": "array", "title": "Implicated Doc Ids" } }, "type": "object", "required": [ "gap_event_id", "candidate_id", "canonical_question", "effective_gap_type", "original_gap_type", "severity", "confidence" ], "title": "GapEventSummary" }, "GovernanceEventResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "event_type": { "type": "string", "title": "Event Type" }, "source": { "type": "string", "title": "Source" }, "from_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "From Status" }, "to_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "To Status" }, "from_expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "From Expires At" }, "to_expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "To Expires At" }, "actor_type": { "type": "string", "title": "Actor Type" }, "actor_user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Actor User Id" }, "reason_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason Code" }, "note": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Note" }, "request_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Request Id" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" }, "changed_fields": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Changed Fields" }, "details": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Details" }, "idempotency_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Idempotency Key" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "event_type", "source", "actor_type", "created_at" ], "title": "GovernanceEventResponse", "description": "A single governance lifecycle event (history feed item)." }, "GovernanceUpdateRequest": { "properties": { "governance_status": { "anyOf": [ { "type": "string", "enum": [ "active", "retired", "suppressed", "manual_hold", "expired" ] }, { "type": "null" } ], "title": "Governance Status" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "reason_code": { "anyOf": [ { "type": "string", "maxLength": 64 }, { "type": "null" } ], "title": "Reason Code" }, "note": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Note" }, "idempotency_key": { "anyOf": [ { "type": "string", "maxLength": 128 }, { "type": "null" } ], "title": "Idempotency Key" } }, "additionalProperties": false, "type": "object", "title": "GovernanceUpdateRequest", "description": "PATCH body. ``extra='forbid'`` rejects unknown keys; field presence is\nread via ``model_fields_set`` so an explicit ``expires_at: null`` (clear)\nis distinguishable from an omitted ``expires_at`` (leave unchanged)." }, "GovernanceVersionResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "document_id": { "type": "string", "format": "uuid", "title": "Document Id" }, "knowledge_base_id": { "type": "string", "format": "uuid", "title": "Knowledge Base Id" }, "version_number": { "type": "integer", "title": "Version Number" }, "state": { "type": "string", "title": "State" }, "scan_status": { "type": "string", "title": "Scan Status" }, "governance_status": { "type": "string", "title": "Governance Status" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "governance_reason_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Governance Reason Code" }, "governance_note": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Governance Note" }, "governance_updated_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Governance Updated By" }, "governance_updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Governance Updated At" }, "governance_policy_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Governance Policy Version" }, "effective_serving_status": { "type": "string", "title": "Effective Serving Status" } }, "type": "object", "required": [ "id", "document_id", "knowledge_base_id", "version_number", "state", "scan_status", "governance_status", "effective_serving_status" ], "title": "GovernanceVersionResponse", "description": "Governance view of a version + the computed effective serving status." }, "GraphDiff": { "properties": { "summary": { "$ref": "#/components/schemas/GraphSummary" }, "graph_meta": { "$ref": "#/components/schemas/src__workflow__diff__models__GraphMeta" }, "nodes": { "$ref": "#/components/schemas/NodeCollectionDiff" }, "edges": { "$ref": "#/components/schemas/EdgeCollectionDiff" }, "context_variables": { "$ref": "#/components/schemas/ContextVarCollectionDiff" } }, "type": "object", "required": [ "summary", "graph_meta" ], "title": "GraphDiff", "description": "Full behavior diff \u2014 projected graph comparison." }, "GraphSummary": { "properties": { "nodes_added": { "type": "integer", "title": "Nodes Added", "default": 0 }, "nodes_removed": { "type": "integer", "title": "Nodes Removed", "default": 0 }, "nodes_changed": { "type": "integer", "title": "Nodes Changed", "default": 0 }, "edges_added": { "type": "integer", "title": "Edges Added", "default": 0 }, "edges_removed": { "type": "integer", "title": "Edges Removed", "default": 0 }, "edges_changed": { "type": "integer", "title": "Edges Changed", "default": 0 }, "context_vars_added": { "type": "integer", "title": "Context Vars Added", "default": 0 }, "context_vars_removed": { "type": "integer", "title": "Context Vars Removed", "default": 0 }, "context_vars_changed": { "type": "integer", "title": "Context Vars Changed", "default": 0 } }, "type": "object", "title": "GraphSummary", "description": "Counts of changes across the graph diff (for the summary header)." }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "HandoffEvent": { "properties": { "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp" }, "transferred_to_agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Transferred To Agent Id" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" } }, "type": "object", "required": [ "timestamp" ], "title": "HandoffEvent", "description": "Human handoff transition recorded against the session." }, "HandoffMessageRead": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "conversation_id": { "type": "string", "format": "uuid", "title": "Conversation Id" }, "seq": { "type": "integer", "title": "Seq" }, "role": { "type": "string", "title": "Role" }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content" }, "authored_by": { "type": "string", "title": "Authored By" }, "operator_actor_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operator Actor Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "additionalProperties": false, "type": "object", "required": [ "id", "conversation_id", "seq", "role", "content", "authored_by", "operator_actor_id", "created_at" ], "title": "HandoffMessageRead", "description": "The persisted operator-relay ``conv_messages`` row (HITL-04 \u00a76.4.1).\n\nReturned by the relay endpoint so the operator UI can immediately render\nthe message it just sent (with its allocated ``seq`` watermark) without a\nfollow-up poll." }, "HandoffPacket": { "properties": { "static_text": { "type": "string", "title": "Static Text" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" }, "context_vars": { "additionalProperties": true, "type": "object", "title": "Context Vars" }, "summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Summary" }, "transcript_ptr": { "anyOf": [ { "$ref": "#/components/schemas/TranscriptPtr" }, { "type": "null" } ] }, "transfer_to": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Transfer To" }, "transfer_label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Transfer Label" } }, "additionalProperties": false, "type": "object", "required": [ "static_text" ], "title": "HandoffPacket", "description": "The complete, enriched handoff packet \u2014 the channel-runtime contract.\n\nTwo halves, by who fills them:\n\n* *engine-supplied intent* (rides on the ``handoff`` signal): ``reason``,\n ``static_text``, ``context_vars``.\n* *service-enriched at record time* (needs DB access \u2014 ``packet.py``):\n ``summary`` (from ``conversations.summary``) and ``transcript_ptr``." }, "HandoffPage": { "properties": { "items": { "items": { "$ref": "#/components/schemas/HandoffRead" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "additionalProperties": false, "type": "object", "required": [ "items" ], "title": "HandoffPage", "description": "A cursor page of handoffs." }, "HandoffRead": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "conversation_id": { "type": "string", "format": "uuid", "title": "Conversation Id" }, "conv_turn_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Conv Turn Id" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" }, "static_text": { "type": "string", "title": "Static Text" }, "status": { "type": "string", "enum": [ "requested", "assigned", "accepted", "resolved", "cancelled" ], "title": "Status" }, "assignee": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assignee" }, "source": { "type": "string", "enum": [ "workflow_terminal", "router", "policy", "call_transfer", "warm_call_transfer" ], "title": "Source" }, "packet": { "$ref": "#/components/schemas/HandoffPacket" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "resolved_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Resolved At" } }, "additionalProperties": false, "type": "object", "required": [ "id", "organization_id", "conversation_id", "conv_turn_id", "reason", "static_text", "status", "assignee", "source", "packet", "created_at", "resolved_at" ], "title": "HandoffRead", "description": "The API-response shape for a single ``handoffs`` row (UI + channel runtime)." }, "HandoffRelayRequest": { "properties": { "content": { "type": "string", "minLength": 1, "title": "Content" } }, "additionalProperties": false, "type": "object", "required": [ "content" ], "title": "HandoffRelayRequest", "description": "Body for the operator-relay mutation (``POST \u2026/messages``).\n\nThe relaying operator's identity comes from auth, not the body \u2014 only the\nmessage text the operator wants to send the end-user." }, "HeaderConfig": { "properties": { "key": { "type": "string", "title": "Key" }, "value": { "type": "string", "title": "Value" }, "secure": { "type": "boolean", "title": "Secure", "description": "When true, value is stored encrypted in the database", "default": false } }, "type": "object", "required": [ "key", "value" ], "title": "HeaderConfig", "description": "HTTP header with optional encryption for sensitive values." }, "HealthCheckRow": { "properties": { "tool_id": { "type": "string", "title": "Tool Id" }, "tool_name": { "type": "string", "title": "Tool Name" }, "tool_type": { "type": "string", "title": "Tool Type" }, "invocation_count": { "type": "integer", "title": "Invocation Count" }, "error_count": { "type": "integer", "title": "Error Count" }, "error_rate": { "type": "number", "title": "Error Rate" }, "p95_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "P95 Latency Ms" }, "status": { "type": "string", "title": "Status" }, "violations": { "items": { "type": "string" }, "type": "array", "title": "Violations" } }, "type": "object", "required": [ "tool_id", "tool_name", "tool_type", "invocation_count", "error_count", "error_rate", "status", "violations" ], "title": "HealthCheckRow" }, "HealthResponse": { "properties": { "bridges": { "type": "integer", "title": "Bridges" }, "procedure": { "type": "string", "title": "Procedure" } }, "type": "object", "required": [ "bridges", "procedure" ], "title": "HealthResponse" }, "HolidayCalendarSettings": { "properties": { "enabled": { "type": "boolean", "title": "Enabled", "default": true }, "holidays": { "items": { "$ref": "#/components/schemas/HolidayEntry" }, "type": "array", "title": "Holidays" } }, "type": "object", "title": "HolidayCalendarSettings", "description": "Per-org outbound holiday calendar. Sub-gate of the calling window.\n\nDates are interpreted in the calling window's timezone and only take effect\nwhile the calling window is enabled. Absent \u21d2 DEFAULT_HOLIDAY_CALENDAR\n(enabled with an empty list \u21d2 blocks nothing)." }, "HolidayEntry": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ], "title": "Name" }, "start_date": { "type": "string", "format": "date", "title": "Start Date" }, "end_date": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "null" } ], "title": "End Date" }, "recurring": { "type": "boolean", "title": "Recurring", "default": false } }, "type": "object", "required": [ "start_date" ], "title": "HolidayEntry", "description": "One holiday: a single day, a date range, or an annual recurrence.\n\n- Single day: ``start_date`` set, ``end_date`` None, ``recurring`` False.\n- Multi-day range: ``start_date`` + ``end_date`` (both inclusive),\n ``recurring`` False.\n- Annually recurring: ``recurring`` True \u2014 only the ``(month, day)`` of\n ``start_date``..``end_date`` is matched, ignoring the year. A recurring\n range may wrap the year boundary (e.g. Dec 30 \u2192 Jan 2). A recurring\n Feb-29 entry only matches in leap years." }, "ImportBridgeNumberRequest": { "properties": { "twilio_number_sid": { "type": "string", "maxLength": 64, "minLength": 1, "title": "Twilio Number Sid" }, "integration_connection_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Integration Connection Id", "description": "BYOT only. Pin the import to a specific connected Twilio integration. Required when the org has more than one connected Twilio integration; when omitted, the service auto-discovers the org's single connected integration and 422s on ambiguity." } }, "additionalProperties": false, "type": "object", "required": [ "twilio_number_sid" ], "title": "ImportBridgeNumberRequest", "description": "Request body for importing a Twilio number as a bridge number.\n\nAccepts either the Twilio Phone Number SID (PN\u2026) or the E.164 phone number\n(+1\u2026) \u2014 we resolve the canonical SID from Twilio either way. We resolve the\nTwilio account credentials from the org's Nango-connected Twilio integration\n(the same credentials SMS/voice already use). Bridge numbers are BYO-only:\nthe org must have a connected Twilio integration or the import is rejected." }, "InertToolPolicy": { "properties": { "policy_id": { "type": "string", "format": "uuid", "title": "Policy Id" }, "name": { "type": "string", "title": "Name" }, "tool_target": { "type": "string", "title": "Tool Target" }, "reason": { "type": "string", "title": "Reason", "default": "tool_not_in_assistant_surface" } }, "type": "object", "required": [ "policy_id", "name", "tool_target" ], "title": "InertToolPolicy", "description": "An attached tool-targeted policy that can never fire on this assistant.\n\nAdvisory only (NOT a blocking error): the policy is pinned to a ``tool_target`` the\nassistant doesn't use \u2014 neither in its revision ``tool_refs`` nor in its bound\nworkflow graph \u2014 so the runtime gate filters it out on every tool call (a silent\nno-op). Attaching it is still allowed (the tool may be added later, and org-wide tool\npolicies are inert on assistants lacking the tool by design); the UI surfaces this so\nthe operator isn't surprised by coverage they think they have." }, "IngestEmailThreadRequest": { "properties": { "event": { "$ref": "#/components/schemas/EmailInboundEvent" } }, "additionalProperties": false, "type": "object", "required": [ "event" ], "title": "IngestEmailThreadRequest", "description": "Canonical ingest body.\n\nThe path's ``{thread_id}`` MUST match ``event.provider_thread_id`` \u2014\nthe route enforces this so a caller can't bury a different thread id\ninside the body. Likewise ``event.organization_id`` must match the\ncaller's org from the auth dependency." }, "IngestEmailThreadResponse": { "properties": { "outcome": { "type": "string", "enum": [ "reply", "observe", "archive", "drop", "duplicate" ], "title": "Outcome" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" }, "session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" }, "user_turn_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "User Turn Id" }, "assistant_turn_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assistant Turn Id" }, "draft_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Draft Id" }, "auto_dispatched": { "type": "boolean", "title": "Auto Dispatched", "default": false } }, "additionalProperties": false, "type": "object", "required": [ "outcome" ], "title": "IngestEmailThreadResponse", "description": "Thin surface over ``CanonicalizerResult``.\n\n``outcome`` collapses the canonicalizer's decision plus the\n\"duplicate\" sentinel the Redis replay-dedup gate emits when the same\n``provider_message_id`` has already been processed." }, "IngestResponse": { "properties": { "ingestion_job_id": { "type": "string", "format": "uuid", "title": "Ingestion Job Id" }, "items": { "items": { "$ref": "#/components/schemas/IngestResultItem" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "ingestion_job_id", "items" ], "title": "IngestResponse", "description": "Response from the unified ingest endpoint.\n\n``ingestion_job_id`` is the parent IngestionJob for bulk submissions, or\nthe single-doc job for a 1-item manifest. ``items`` mirrors the manifest\norder so callers can render per-item outcomes without a second call." }, "IngestResultItem": { "properties": { "manifest_index": { "type": "integer", "title": "Manifest Index" }, "result": { "type": "string", "enum": [ "queued", "duplicate" ], "title": "Result" }, "document_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Document Id" }, "duplicate_of_document_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Duplicate Of Document Id" }, "duplicate_of_version_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Duplicate Of Version Id" }, "duplicate_of_document_title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Duplicate Of Document Title" } }, "type": "object", "required": [ "manifest_index", "result" ], "title": "IngestResultItem", "description": "Per-manifest-item outcome of an ingest request." }, "IngestionJobDocumentResponse": { "properties": { "document_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Document Id" }, "version_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Version Id" }, "processing_stage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Processing Stage" }, "duplicate_of_document_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Duplicate Of Document Id" }, "duplicate_of_version_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Duplicate Of Version Id" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "status": { "type": "string", "title": "Status" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "segment_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Segment Count" }, "processed_segments": { "type": "integer", "title": "Processed Segments", "default": 0 }, "pii_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pii Status" }, "sensitivity": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sensitivity" }, "pii_coverage_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pii Coverage Status" }, "pii_detection_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Pii Detection Count" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" } }, "type": "object", "required": [ "document_id", "status" ], "title": "IngestionJobDocumentResponse", "description": "Per-document status within a bulk job." }, "IngestionJobResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "job_type": { "type": "string", "title": "Job Type" }, "status": { "type": "string", "title": "Status" }, "knowledge_base_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Knowledge Base Id" }, "total_documents": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Total Documents" }, "completed": { "type": "integer", "title": "Completed", "default": 0 }, "duplicate": { "type": "integer", "title": "Duplicate", "default": 0 }, "failed": { "type": "integer", "title": "Failed", "default": 0 }, "partial_failure": { "type": "integer", "title": "Partial Failure", "default": 0 }, "processing": { "type": "integer", "title": "Processing", "default": 0 }, "queued": { "type": "integer", "title": "Queued", "default": 0 }, "segment_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Segment Count" }, "processed_segments": { "type": "integer", "title": "Processed Segments", "default": 0 }, "progress_pct": { "type": "number", "title": "Progress Pct", "default": 0.0 }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" } }, "type": "object", "required": [ "id", "job_type", "status", "created_at" ], "title": "IngestionJobResponse", "description": "Progress status for an ingestion job." }, "IngestionJobSummaryResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "job_type": { "type": "string", "title": "Job Type" }, "status": { "type": "string", "title": "Status" }, "knowledge_base_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Knowledge Base Id" }, "item_title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Item Title" }, "total_documents": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Total Documents" }, "processed_count": { "type": "integer", "title": "Processed Count", "default": 0 }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "progress_pct": { "type": "number", "title": "Progress Pct", "default": 0.0 }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" } }, "type": "object", "required": [ "id", "job_type", "status", "created_at" ], "title": "IngestionJobSummaryResponse", "description": "Lightweight ingestion job row for list views.\n\nDoes not include the per-status child breakdown (completed/failed/etc.) \u2014\nonly the fields stored directly on the IngestionJob row. Clients that need\nfull counts should fetch the individual job via GET /ingestion-jobs/{id}." }, "IngestionStatusResponse": { "properties": { "knowledge_base_id": { "type": "string", "format": "uuid", "title": "Knowledge Base Id" }, "pending": { "type": "integer", "title": "Pending", "default": 0 }, "processing": { "type": "integer", "title": "Processing", "default": 0 }, "active": { "type": "integer", "title": "Active", "default": 0 }, "draft": { "type": "integer", "title": "Draft", "default": 0 }, "archived": { "type": "integer", "title": "Archived", "default": 0 }, "failed": { "type": "integer", "title": "Failed", "default": 0 }, "quarantined": { "type": "integer", "title": "Quarantined", "default": 0 }, "total": { "type": "integer", "title": "Total", "default": 0 } }, "type": "object", "required": [ "knowledge_base_id" ], "title": "IngestionStatusResponse" }, "IngestionTaskLogResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "document_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Document Id" }, "task_name": { "type": "string", "title": "Task Name" }, "status": { "type": "string", "title": "Status" }, "input_summary": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Input Summary" }, "output_summary": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Output Summary" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Ms" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" } }, "type": "object", "required": [ "id", "task_name", "status", "started_at" ], "title": "IngestionTaskLogResponse", "description": "Audit log entry for a pipeline step." }, "InlineSource": { "properties": { "title": { "type": "string", "title": "Title" }, "url": { "type": "string", "title": "Url" } }, "type": "object", "required": [ "title", "url" ], "title": "InlineSource", "description": "One ``{title, url}`` source link written INSIDE a KB document's text.\n\nExtracted at retrieval time by :mod:`src.knowledge_base.inline_sources` and\npersisted here because chunk text is unrecoverable at any read surface.\n\n``url`` is VERBATIM as the document wrote it and MAY BE RELATIVE\n(``uploads/x.pdf``). This is deliberately NOT ``external_uri``, and it is\ndeliberately NOT run through :func:`_safe_uri_or_none`: a scheme is not\nrequired here. This is a scoped exception recorded as **DD-010** in\n``docs/design-decisions.md`` \u2014 NOT a relaxation of DD-007, which governs a\ndifferent field (``external_uri``) and still requires a scheme. The value\nhere is a customer's own document link rendered in that customer's own\nwhite-label UI, which joins its own base. Executable schemes are still\nstripped, at extraction.\n\n``title`` is heuristic (markdown link text \u25b8 ``Link for X:`` label \u25b8 last path\nsegment). Accuracy is a later pass; the honesty rule is only that nothing is\ninvented \u2014 every value here was literally present in the document." }, "InputArgConfig": { "properties": { "value": { "title": "Value" }, "type": { "$ref": "#/components/schemas/InputArgType", "default": "default" } }, "additionalProperties": false, "type": "object", "required": [ "value" ], "title": "InputArgConfig", "description": "One operator-configured input field: a ``value`` plus its enforcement ``type``.\n\nThe wire/stored shape of each entry in the ``input_defaults`` map. ``type``\ndefaults to ``default`` so a caller can omit it for the common case." }, "InputArgType": { "type": "string", "enum": [ "default", "pinned" ], "title": "InputArgType", "description": "How an operator-configured input value is enforced.\n\n* ``DEFAULT`` \u2014 a suggestion the agent may overwrite.\n* ``PINNED`` \u2014 a forced value the caller must use and cannot overwrite." }, "InstallPersonaRequest": { "properties": { "name_override": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name Override" } }, "additionalProperties": false, "type": "object", "title": "InstallPersonaRequest", "description": "POST body for ``/v1/library/personas/{id}/install``.\n\n``name_override`` lets callers pick a non-default name on install,\ntypically when re-installing a template that already has a copy in the\ntarget org. When omitted, the service appends ``\" (2)\"``, ``\" (3)\"``,\netc. to deduplicate against existing org personas." }, "IntegrationKey": { "type": "string", "enum": [ "slack", "custom_mcp", "notion", "google_drive", "calcom", "twilio", "email" ], "title": "IntegrationKey", "description": "Stable identifier for each supported integration.\n\nThe string value must match the vendor's per-provider identifier\n(for Nango: ``provider_config_key``). Persisted on\n``integration_connections.integration_key`` and\n``integration_connection_tools.integration_key``.\n\nAdding a new integration: append a member here, add an\n``IntegrationSpec`` to ``INTEGRATIONS``, register the provider in the\nvendor cloud via ``src/integrations/bootstrap.py`` (Step 3)." }, "IntegrationSummary": { "properties": { "key": { "$ref": "#/components/schemas/IntegrationKey" }, "display_name": { "type": "string", "title": "Display Name" }, "description": { "type": "string", "title": "Description" }, "category": { "type": "string", "title": "Category" }, "logo_url": { "type": "string", "title": "Logo Url" } }, "type": "object", "required": [ "key", "display_name", "description", "category", "logo_url" ], "title": "IntegrationSummary", "description": "Platform catalog row \u2014 one per ``IntegrationSpec``." }, "InventoryByHashMethodRow": { "properties": { "hash_method": { "type": "string", "title": "Hash Method" }, "documents": { "type": "integer", "title": "Documents" }, "chunks": { "type": "integer", "title": "Chunks" }, "tokens": { "type": "integer", "title": "Tokens" } }, "type": "object", "required": [ "hash_method", "documents", "chunks", "tokens" ], "title": "InventoryByHashMethodRow" }, "InventoryBySourceTypeRow": { "properties": { "source_type": { "type": "string", "title": "Source Type" }, "documents": { "type": "integer", "title": "Documents" }, "chunks": { "type": "integer", "title": "Chunks" }, "tokens": { "type": "integer", "title": "Tokens" } }, "type": "object", "required": [ "source_type", "documents", "chunks", "tokens" ], "title": "InventoryBySourceTypeRow" }, "InventoryEnvelope": { "properties": { "summary": { "$ref": "#/components/schemas/KbInventoryRow" }, "by_source_type": { "items": { "$ref": "#/components/schemas/InventoryBySourceTypeRow" }, "type": "array", "title": "By Source Type" }, "by_hash_method": { "items": { "$ref": "#/components/schemas/InventoryByHashMethodRow" }, "type": "array", "title": "By Hash Method" }, "growth": { "$ref": "#/components/schemas/InventoryGrowthRow" } }, "type": "object", "required": [ "summary", "by_source_type", "by_hash_method", "growth" ], "title": "InventoryEnvelope" }, "InventoryGrowthRow": { "properties": { "created_24h": { "type": "integer", "title": "Created 24H" }, "created_7d": { "type": "integer", "title": "Created 7D" }, "created_30d": { "type": "integer", "title": "Created 30D" }, "failed_7d": { "type": "integer", "title": "Failed 7D" }, "cleaned_up_7d": { "type": "integer", "title": "Cleaned Up 7D" } }, "type": "object", "required": [ "created_24h", "created_7d", "created_30d", "failed_7d", "cleaned_up_7d" ], "title": "InventoryGrowthRow" }, "InvocationsByAgentRow": { "properties": { "agent_id": { "type": "string", "title": "Agent Id" }, "invocations": { "type": "integer", "title": "Invocations" }, "successful": { "type": "integer", "title": "Successful" }, "failed": { "type": "integer", "title": "Failed" }, "success_rate": { "type": "number", "title": "Success Rate" } }, "type": "object", "required": [ "agent_id", "invocations", "successful", "failed", "success_rate" ], "title": "InvocationsByAgentRow" }, "InvocationsByIntegrationRow": { "properties": { "integration_key": { "type": "string", "title": "Integration Key" }, "invocations": { "type": "integer", "title": "Invocations" }, "successful": { "type": "integer", "title": "Successful" }, "vendor_errors": { "type": "integer", "title": "Vendor Errors" }, "exceptions": { "type": "integer", "title": "Exceptions" }, "success_rate_pct": { "type": "number", "title": "Success Rate Pct" }, "p95_latency_ms": { "type": "number", "title": "P95 Latency Ms" } }, "type": "object", "required": [ "integration_key", "invocations", "successful", "vendor_errors", "exceptions", "success_rate_pct", "p95_latency_ms" ], "title": "InvocationsByIntegrationRow" }, "InvocationsByModeRow": { "properties": { "mode": { "type": "string", "title": "Mode" }, "invocations": { "type": "integer", "title": "Invocations" }, "successful": { "type": "integer", "title": "Successful" }, "vendor_errors": { "type": "integer", "title": "Vendor Errors" }, "exceptions": { "type": "integer", "title": "Exceptions" }, "success_rate_pct": { "type": "number", "title": "Success Rate Pct" }, "p95_latency_ms": { "type": "number", "title": "P95 Latency Ms" } }, "type": "object", "required": [ "mode", "invocations", "successful", "vendor_errors", "exceptions", "success_rate_pct", "p95_latency_ms" ], "title": "InvocationsByModeRow" }, "InvocationsByToolRow": { "properties": { "tool_id": { "type": "string", "title": "Tool Id" }, "tool_name": { "type": "string", "title": "Tool Name" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" }, "tool_type": { "type": "string", "title": "Tool Type" }, "invocations": { "type": "integer", "title": "Invocations" }, "successful": { "type": "integer", "title": "Successful" }, "failed": { "type": "integer", "title": "Failed" }, "success_rate": { "type": "number", "title": "Success Rate" } }, "type": "object", "required": [ "tool_id", "tool_name", "tool_type", "invocations", "successful", "failed", "success_rate" ], "title": "InvocationsByToolRow" }, "InvocationsByTypeRow": { "properties": { "tool_type": { "type": "string", "title": "Tool Type" }, "invocations": { "type": "integer", "title": "Invocations" }, "successful": { "type": "integer", "title": "Successful" }, "failed": { "type": "integer", "title": "Failed" }, "success_rate": { "type": "number", "title": "Success Rate" } }, "type": "object", "required": [ "tool_type", "invocations", "successful", "failed", "success_rate" ], "title": "InvocationsByTypeRow" }, "InvokeRequest": { "properties": { "messages": { "items": { "$ref": "#/components/schemas/MessageInput" }, "type": "array", "maxItems": 200, "minItems": 1, "title": "Messages" }, "router_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Router Config Id" }, "config_overrides": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Config Overrides" }, "session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" }, "smart_routing": { "type": "boolean", "title": "Smart Routing", "default": false } }, "type": "object", "required": [ "messages" ], "title": "InvokeRequest" }, "JsonValue": {}, "KBConfigDefaults": { "properties": { "embedding_model": { "type": "string", "title": "Embedding Model" }, "embedding_dimensions": { "type": "integer", "title": "Embedding Dimensions" }, "chunk_size": { "type": "integer", "title": "Chunk Size" }, "chunk_overlap": { "type": "integer", "title": "Chunk Overlap" }, "retrieval_top_k": { "type": "integer", "title": "Retrieval Top K" }, "pdf_extraction_effort": { "type": "string", "title": "Pdf Extraction Effort" } }, "type": "object", "required": [ "embedding_model", "embedding_dimensions", "chunk_size", "chunk_overlap", "retrieval_top_k", "pdf_extraction_effort" ], "title": "KBConfigDefaults" }, "KBConfigResponse": { "properties": { "embedding_models": { "items": { "$ref": "#/components/schemas/EmbeddingModelOption" }, "type": "array", "title": "Embedding Models" }, "chunk_sizes": { "items": { "type": "integer" }, "type": "array", "title": "Chunk Sizes" }, "chunk_overlaps": { "items": { "type": "integer" }, "type": "array", "title": "Chunk Overlaps" }, "retrieval_top_k_range": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Retrieval Top K Range" }, "defaults": { "$ref": "#/components/schemas/KBConfigDefaults" } }, "type": "object", "required": [ "embedding_models", "chunk_sizes", "chunk_overlaps", "retrieval_top_k_range", "defaults" ], "title": "KBConfigResponse" }, "KBEvalCaseCreate": { "properties": { "question": { "type": "string", "title": "Question" }, "expected_answer": { "type": "string", "title": "Expected Answer" }, "success_criteria": { "items": { "type": "string" }, "type": "array", "title": "Success Criteria" } }, "additionalProperties": false, "type": "object", "required": [ "question", "expected_answer" ], "title": "KBEvalCaseCreate" }, "KBEvalCaseResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "suite_id": { "type": "string", "format": "uuid", "title": "Suite Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "question": { "type": "string", "title": "Question" }, "expected_answer": { "type": "string", "title": "Expected Answer" }, "success_criteria": { "items": { "type": "string" }, "type": "array", "title": "Success Criteria" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "suite_id", "organization_id", "question", "expected_answer", "created_at", "updated_at" ], "title": "KBEvalCaseResponse" }, "KBEvalCaseResultResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "run_id": { "type": "string", "format": "uuid", "title": "Run Id" }, "test_case_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Test Case Id" }, "question_snapshot": { "type": "string", "title": "Question Snapshot" }, "expected_answer_snapshot": { "type": "string", "title": "Expected Answer Snapshot" }, "retrieved_chunks": { "items": { "$ref": "#/components/schemas/KBEvalRetrievedChunk" }, "type": "array", "title": "Retrieved Chunks" }, "generated_answer": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Generated Answer" }, "answer_score": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Answer Score" }, "completeness_score": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Completeness Score" }, "passed": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Passed" }, "judge_reasoning": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Judge Reasoning" }, "judge_raw_output": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Judge Raw Output" }, "criteria_raw_output": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Criteria Raw Output" }, "criteria_results": { "items": { "$ref": "#/components/schemas/KBEvalCriterionResult" }, "type": "array", "title": "Criteria Results" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "retrieval_latency_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Retrieval Latency Ms" }, "generation_latency_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Generation Latency Ms" }, "judge_latency_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Judge Latency Ms" }, "generation_input_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Generation Input Tokens" }, "generation_output_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Generation Output Tokens" }, "generation_cost_usd": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Generation Cost Usd" }, "judge_input_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Judge Input Tokens" }, "judge_output_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Judge Output Tokens" }, "judge_cost_usd": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Judge Cost Usd" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "content_redacted": { "type": "boolean", "title": "Content Redacted", "default": false } }, "type": "object", "required": [ "id", "run_id", "test_case_id", "question_snapshot", "expected_answer_snapshot", "generated_answer", "answer_score", "completeness_score", "passed", "judge_reasoning", "judge_raw_output", "criteria_raw_output", "error_message", "retrieval_latency_ms", "generation_latency_ms", "judge_latency_ms", "generation_input_tokens", "generation_output_tokens", "generation_cost_usd", "judge_input_tokens", "judge_output_tokens", "judge_cost_usd", "created_at" ], "title": "KBEvalCaseResultResponse" }, "KBEvalCaseUpdate": { "properties": { "question": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Question" }, "expected_answer": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Expected Answer" }, "success_criteria": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Success Criteria" } }, "additionalProperties": false, "type": "object", "title": "KBEvalCaseUpdate" }, "KBEvalCriterionResult": { "properties": { "criterion": { "type": "string", "title": "Criterion" }, "passed": { "type": "boolean", "title": "Passed" }, "reasoning": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reasoning" } }, "type": "object", "required": [ "criterion", "passed" ], "title": "KBEvalCriterionResult" }, "KBEvalRetrievedChunk": { "properties": { "chunk_id": { "type": "string", "title": "Chunk Id" }, "kb_id": { "type": "string", "title": "Kb Id" }, "document_id": { "type": "string", "title": "Document Id" }, "version_id": { "type": "string", "title": "Version Id" }, "document_title": { "type": "string", "title": "Document Title" }, "content_preview": { "type": "string", "title": "Content Preview" }, "score": { "type": "number", "title": "Score" }, "chunk_index": { "type": "integer", "title": "Chunk Index" }, "judged_relevant": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Judged Relevant" }, "relevance_reasoning": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Relevance Reasoning" } }, "type": "object", "required": [ "chunk_id", "kb_id", "document_id", "version_id", "document_title", "content_preview", "score", "chunk_index" ], "title": "KBEvalRetrievedChunk" }, "KBEvalRunConflictDetail": { "properties": { "error": { "type": "string", "title": "Error" }, "existing_run_id": { "type": "string", "format": "uuid", "title": "Existing Run Id" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "error", "existing_run_id", "status" ], "title": "KBEvalRunConflictDetail" }, "KBEvalRunConflictResponse": { "properties": { "detail": { "$ref": "#/components/schemas/KBEvalRunConflictDetail" } }, "type": "object", "required": [ "detail" ], "title": "KBEvalRunConflictResponse", "description": "Wire-level shape of the 409 body: FastAPI wraps HTTPException detail." }, "KBEvalRunCreate": { "properties": { "kb_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "minItems": 1, "title": "Kb Ids" }, "prefer_draft": { "type": "boolean", "title": "Prefer Draft", "default": false }, "version_overrides": { "anyOf": [ { "additionalProperties": { "type": "string", "format": "uuid" }, "propertyNames": { "format": "uuid" }, "type": "object" }, { "type": "null" } ], "title": "Version Overrides" }, "generator_model_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Generator Model Override" }, "judge_model_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Judge Model Override" } }, "additionalProperties": false, "type": "object", "required": [ "kb_ids" ], "title": "KBEvalRunCreate" }, "KBEvalRunCreateResponse": { "properties": { "run_id": { "type": "string", "format": "uuid", "title": "Run Id" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "run_id", "status" ], "title": "KBEvalRunCreateResponse" }, "KBEvalRunResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "suite_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Suite Id" }, "suite_name_snapshot": { "type": "string", "title": "Suite Name Snapshot" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "created_by_user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Created By User Id" }, "status": { "type": "string", "title": "Status" }, "total_cases": { "type": "integer", "title": "Total Cases" }, "completed_cases": { "type": "integer", "title": "Completed Cases" }, "passed_cases": { "type": "integer", "title": "Passed Cases" }, "failed_cases": { "type": "integer", "title": "Failed Cases" }, "errored_cases": { "type": "integer", "title": "Errored Cases" }, "average_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Average Score" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "kb_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Kb Ids" }, "prefer_draft": { "type": "boolean", "title": "Prefer Draft" }, "version_overrides": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Version Overrides" }, "generator_model_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Generator Model Override" }, "judge_model_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Judge Model Override" }, "pass_threshold_snapshot": { "type": "integer", "title": "Pass Threshold Snapshot" }, "retrieval_top_k_snapshot": { "type": "integer", "title": "Retrieval Top K Snapshot" }, "total_input_tokens": { "type": "integer", "title": "Total Input Tokens" }, "total_output_tokens": { "type": "integer", "title": "Total Output Tokens" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "suite_id", "suite_name_snapshot", "organization_id", "created_by_user_id", "status", "total_cases", "completed_cases", "passed_cases", "failed_cases", "errored_cases", "average_score", "error_message", "kb_ids", "prefer_draft", "version_overrides", "generator_model_override", "judge_model_override", "pass_threshold_snapshot", "retrieval_top_k_snapshot", "total_input_tokens", "total_output_tokens", "total_cost_usd", "started_at", "completed_at", "created_at" ], "title": "KBEvalRunResponse" }, "KBEvalSuiteCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "pass_threshold": { "type": "integer", "maximum": 100.0, "minimum": 0.0, "title": "Pass Threshold", "default": 70 } }, "additionalProperties": false, "type": "object", "required": [ "name" ], "title": "KBEvalSuiteCreate" }, "KBEvalSuiteDetailResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "pass_threshold": { "type": "integer", "title": "Pass Threshold" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "cases": { "items": { "$ref": "#/components/schemas/KBEvalCaseResponse" }, "type": "array", "title": "Cases" } }, "type": "object", "required": [ "id", "organization_id", "name", "description", "pass_threshold", "created_at", "updated_at" ], "title": "KBEvalSuiteDetailResponse" }, "KBEvalSuiteResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "pass_threshold": { "type": "integer", "title": "Pass Threshold" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "description", "pass_threshold", "created_at", "updated_at" ], "title": "KBEvalSuiteResponse" }, "KBEvalSuiteUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "pass_threshold": { "anyOf": [ { "type": "integer", "maximum": 100.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Pass Threshold" } }, "additionalProperties": false, "type": "object", "title": "KBEvalSuiteUpdate" }, "KbAdoptionRow": { "properties": { "knowledge_base_id": { "type": "string", "title": "Knowledge Base Id" }, "documents_active": { "type": "integer", "title": "Documents Active" }, "documents_failed": { "type": "integer", "title": "Documents Failed" }, "documents_attempted": { "type": "integer", "title": "Documents Attempted" }, "adoption_rate_pct": { "type": "number", "title": "Adoption Rate Pct" }, "unique_documents": { "type": "integer", "title": "Unique Documents" } }, "type": "object", "required": [ "knowledge_base_id", "documents_active", "documents_failed", "documents_attempted", "adoption_rate_pct", "unique_documents" ], "title": "KbAdoptionRow" }, "KbInventoryRow": { "properties": { "total_documents": { "type": "integer", "title": "Total Documents" }, "total_chunks": { "type": "integer", "title": "Total Chunks" }, "total_tokens": { "type": "integer", "title": "Total Tokens" }, "normalized_pct": { "type": "number", "title": "Normalized Pct" }, "documents_failed_now": { "type": "integer", "title": "Documents Failed Now" }, "documents_processing_now": { "type": "integer", "title": "Documents Processing Now" }, "documents_quarantined_now": { "type": "integer", "title": "Documents Quarantined Now" }, "knowledge_bases_count": { "type": "integer", "title": "Knowledge Bases Count" } }, "type": "object", "required": [ "total_documents", "total_chunks", "total_tokens", "normalized_pct", "documents_failed_now", "documents_processing_now", "documents_quarantined_now", "knowledge_bases_count" ], "title": "KbInventoryRow" }, "KbPiiSettings": { "properties": { "enabled": { "type": "boolean", "title": "Enabled", "default": false } }, "type": "object", "title": "KbPiiSettings", "description": "Per-org KB document-ingestion PII redaction switch (ENG-677/ENG-679).\n\nOFF by default and enabled solely by this org-wide switch \u2014 decoupled from\nthe shared conversation/voice ``PrivacyConfig``. Read by\n``resolve_pii_config`` at ingest time from ``Organization.settings['kb_pii']``\n(the global ``kb_pii_enabled`` kill-switch still forces redaction off)." }, "KbSnapshotEntry": { "properties": { "captured_at": { "type": "string", "format": "date-time", "title": "Captured At" }, "kb_versions": { "additionalProperties": { "type": "integer" }, "propertyNames": { "format": "uuid" }, "type": "object", "title": "Kb Versions" } }, "type": "object", "required": [ "captured_at" ], "title": "KbSnapshotEntry", "description": "KB state captured at the moment of the session's first retrieval.\n\nMaps each KB used in the session to the active document-version count\n(as a coarse fingerprint of \"what was the KB at the time\"). The\nfine-grained per-doc version of a retrieved chunk is on\n``RetrievedChunk.version_id``." }, "KnowledgeBaseCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "embedding_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Model" }, "embedding_dimensions": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Embedding Dimensions" }, "chunk_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Chunk Size" }, "chunk_overlap": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Chunk Overlap" }, "retrieval_top_k": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Retrieval Top K" }, "pdf_extraction_effort": { "anyOf": [ { "type": "string", "const": "low" }, { "type": "null" } ], "title": "Pdf Extraction Effort" }, "default_sensitivity_level": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Default Sensitivity Level" } }, "type": "object", "required": [ "name" ], "title": "KnowledgeBaseCreate" }, "KnowledgeBaseRef": { "properties": { "id": { "type": "string", "title": "Id" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "clearance_level": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Clearance Level" } }, "type": "object", "required": [ "id" ], "title": "KnowledgeBaseRef", "description": "Canonical knowledge base reference.\n\n``description`` is the compiler-emitted usage intent for this KB (when/why\nto query it).\n\n``clearance_level`` (ENG-648 P4) optionally CAPS this reference's retrieval\nclearance below the agent revision's default \u2014 a finer-grained, per-node\nrestriction. It can only lower (never raise above) the agent's clearance and\nis resolved at peer-build time into the executor's access context. ``None``\n\u21d2 use the agent default. Stored on the graph IR (no DB migration)." }, "KnowledgeBaseResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "is_active": { "type": "boolean", "title": "Is Active" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "document_count": { "type": "integer", "title": "Document Count" }, "embedding_model": { "type": "string", "title": "Embedding Model" }, "embedding_dimensions": { "type": "integer", "title": "Embedding Dimensions" }, "chunk_size": { "type": "integer", "title": "Chunk Size" }, "chunk_overlap": { "type": "integer", "title": "Chunk Overlap" }, "retrieval_top_k": { "type": "integer", "title": "Retrieval Top K" }, "default_sensitivity_level": { "type": "integer", "title": "Default Sensitivity Level", "default": 10 }, "processing_config": { "additionalProperties": true, "type": "object", "title": "Processing Config" }, "pdf_extraction_effort": { "type": "string", "title": "Pdf Extraction Effort", "default": "low" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "description", "is_active", "document_count", "embedding_model", "embedding_dimensions", "chunk_size", "chunk_overlap", "retrieval_top_k", "created_at", "updated_at" ], "title": "KnowledgeBaseResponse" }, "KnowledgeBaseUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" }, "chunk_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Chunk Size" }, "chunk_overlap": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Chunk Overlap" }, "retrieval_top_k": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Retrieval Top K" }, "pdf_extraction_effort": { "anyOf": [ { "type": "string", "const": "low" }, { "type": "null" } ], "title": "Pdf Extraction Effort" }, "default_sensitivity_level": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Default Sensitivity Level" } }, "additionalProperties": false, "type": "object", "title": "KnowledgeBaseUpdate" }, "KnowledgeDashboardEnvelope": { "properties": { "adoption": { "items": { "$ref": "#/components/schemas/KbAdoptionRow" }, "type": "array", "title": "Adoption" }, "ingestion": { "items": { "$ref": "#/components/schemas/DocumentIngestionTimeseriesRow" }, "type": "array", "title": "Ingestion" }, "latency": { "items": { "$ref": "#/components/schemas/DocumentProcessingLatencyRow" }, "type": "array", "title": "Latency" }, "cleanup": { "items": { "$ref": "#/components/schemas/DocumentCleanupSummaryRow" }, "type": "array", "title": "Cleanup" }, "retrieval": { "items": { "$ref": "#/components/schemas/DocumentRetrievalTimeseriesRow" }, "type": "array", "title": "Retrieval" }, "inventory": { "$ref": "#/components/schemas/InventoryEnvelope" }, "freshness": { "items": { "$ref": "#/components/schemas/ConnectorFreshnessRow" }, "type": "array", "title": "Freshness" } }, "type": "object", "required": [ "adoption", "ingestion", "latency", "cleanup", "retrieval", "inventory", "freshness" ], "title": "KnowledgeDashboardEnvelope", "description": "Single envelope returned by ``/v1/analytics/knowledge/dashboard``." }, "KnowledgeGapAnalysisOutcome": { "type": "string", "enum": [ "resolved", "unresolved", "transferred", "expired", "error", "abandoned", "voicemail", "escalated", "call_failed" ], "title": "KnowledgeGapAnalysisOutcome", "description": "Canonical, analyzer-friendly outcome of a completed session.\n\nDerived from ``(SessionStatus, SessionTerminationReason)`` at close time\nand persisted on ``ConvSessionMeta.knowledge_gap_analysis_outcome``.\nFree-form ``termination_reason`` is preserved alongside for forensic\ndetail." }, "LatencyByProviderRow": { "properties": { "provider": { "type": "string", "title": "Provider" }, "invocations": { "type": "integer", "title": "Invocations" }, "p50_ms": { "type": "number", "title": "P50 Ms" }, "p90_ms": { "type": "number", "title": "P90 Ms" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "p99_ms": { "type": "number", "title": "P99 Ms" }, "avg_ms": { "type": "number", "title": "Avg Ms" }, "max_ms": { "type": "number", "title": "Max Ms" } }, "type": "object", "required": [ "provider", "invocations", "p50_ms", "p90_ms", "p95_ms", "p99_ms", "avg_ms", "max_ms" ], "title": "LatencyByProviderRow" }, "LatencyByToolRow": { "properties": { "tool_id": { "type": "string", "title": "Tool Id" }, "tool_name": { "type": "string", "title": "Tool Name" }, "tool_type": { "type": "string", "title": "Tool Type" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" }, "invocations": { "type": "integer", "title": "Invocations" }, "p50_ms": { "type": "number", "title": "P50 Ms" }, "p90_ms": { "type": "number", "title": "P90 Ms" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "p99_ms": { "type": "number", "title": "P99 Ms" }, "avg_ms": { "type": "number", "title": "Avg Ms" }, "max_ms": { "type": "number", "title": "Max Ms" } }, "type": "object", "required": [ "tool_id", "tool_name", "tool_type", "invocations", "p50_ms", "p90_ms", "p95_ms", "p99_ms", "avg_ms", "max_ms" ], "title": "LatencyByToolRow" }, "LatencyDistributionRow": { "properties": { "bucket_index": { "type": "integer", "title": "Bucket Index" }, "bucket": { "type": "string", "title": "Bucket" }, "invocations": { "type": "integer", "title": "Invocations" } }, "type": "object", "required": [ "bucket_index", "bucket", "invocations" ], "title": "LatencyDistributionRow" }, "LatencyRow": { "properties": { "served_model": { "type": "string", "title": "Served Model" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" }, "invocations": { "type": "integer", "title": "Invocations" }, "p50_ms": { "type": "number", "title": "P50 Ms" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "p99_ms": { "type": "number", "title": "P99 Ms" }, "avg_ms": { "type": "number", "title": "Avg Ms" }, "max_ms": { "type": "number", "title": "Max Ms" } }, "type": "object", "required": [ "served_model", "invocations", "p50_ms", "p95_ms", "p99_ms", "avg_ms", "max_ms" ], "title": "LatencyRow" }, "LeaseForceReleaseRequest": { "properties": { "reason": { "type": "string", "maxLength": 51, "minLength": 1, "title": "Reason", "description": "Short reason slug; persisted as manual_force_" }, "evidence": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Evidence", "description": "Optional forensic JSON stamped onto the lease's release_evidence" } }, "type": "object", "required": [ "reason" ], "title": "LeaseForceReleaseRequest", "description": "POST body for the staff-only emergency lease force-release.\n\nMirrors ``scripts/force_release_voice_lease.py`` but authenticated: the\nactor is the staff user's identity, not a caller-supplied string." }, "LeaseForceReleaseResponse": { "properties": { "lease_id": { "type": "string", "format": "uuid", "title": "Lease Id" }, "released": { "type": "boolean", "title": "Released" }, "release_reason": { "type": "string", "title": "Release Reason" } }, "type": "object", "required": [ "lease_id", "released", "release_reason" ], "title": "LeaseForceReleaseResponse", "description": "Result of a force-release: released=True only when THIS call released." }, "LegacySystemContextVariableSpec": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "enum": [ "string", "int", "float", "bool", "enum" ], "title": "Type" }, "enum_values": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Enum Values" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "source": { "anyOf": [ { "type": "string", "const": "system" }, { "type": "null" } ], "title": "Source" }, "reask_cap": { "type": "null", "title": "Reask Cap" } }, "additionalProperties": false, "type": "object", "required": [ "name", "type" ], "title": "LegacySystemContextVariableSpec", "description": "Deprecated assistant alias shape accepted for response round-tripping.\n\nOlder clients commonly write the response representation back through\n``context_variables``. Permit its redundant system marker and null workflow-only\nfield without weakening the canonical, source-free assistant request schema." }, "LibraryPersonaCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "body": { "type": "string", "minLength": 1, "title": "Body" }, "traits": { "additionalProperties": true, "type": "object", "title": "Traits" }, "behavior_config": { "$ref": "#/components/schemas/PersonaBehaviorConfig" }, "tags": { "items": { "type": "string" }, "type": "array", "maxItems": 20, "title": "Tags" } }, "additionalProperties": false, "type": "object", "required": [ "name", "body" ], "title": "LibraryPersonaCreate", "description": "Create a library persona (Feather-staff only at the router layer)." }, "LibraryPersonaResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "body": { "type": "string", "title": "Body" }, "traits": { "additionalProperties": true, "type": "object", "title": "Traits" }, "behavior_config": { "$ref": "#/components/schemas/PersonaBehaviorConfig" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "name", "description", "body", "traits", "behavior_config", "tags", "created_by", "created_at", "updated_at" ], "title": "LibraryPersonaResponse", "description": "Library persona payload returned by ``/v1/library/personas`` routes." }, "LibraryPersonaUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "body": { "anyOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "title": "Body" }, "traits": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Traits" }, "behavior_config": { "anyOf": [ { "$ref": "#/components/schemas/PersonaBehaviorConfig" }, { "type": "null" } ] }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "maxItems": 20 }, { "type": "null" } ], "title": "Tags" } }, "additionalProperties": false, "type": "object", "title": "LibraryPersonaUpdate", "description": "Partial update of a library persona. Same null-rejection rules as\n``PersonaUpdate``: explicit ``null`` is rejected for non-nullable columns.\nLibrary entries are not org-scoped, so ``is_active`` is intentionally\nnot exposed \u2014 library content is either present in the catalog or\ndeleted from it." }, "LibraryVoiceConfigCreate": { "properties": { "voice_tuning": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Voice Tuning" }, "stt_provider": { "anyOf": [ { "type": "string", "maxLength": 32 }, { "type": "null" } ], "title": "Stt Provider" }, "stt_model": { "anyOf": [ { "type": "string", "maxLength": 64 }, { "type": "null" } ], "title": "Stt Model" }, "stt_provider_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Stt Provider Data" }, "tts_speed": { "anyOf": [ { "type": "number", "exclusiveMaximum": 10.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Tts Speed" }, "tts_provider_data": { "anyOf": [ { "$ref": "#/components/schemas/VoiceTTSProviderDataInput" }, { "type": "null" } ] }, "vad_provider_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Vad Provider Data" }, "local_vad_params": { "anyOf": [ { "$ref": "#/components/schemas/LocalVADParams" }, { "type": "null" } ] }, "turn_analyzer_params": { "anyOf": [ { "$ref": "#/components/schemas/TurnAnalyzerParams" }, { "type": "null" } ] }, "pronunciation_overrides": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Pronunciation Overrides" }, "noise_cancellation_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Noise Cancellation Enabled" }, "noise_cancellation_provider": { "anyOf": [ { "$ref": "#/components/schemas/NoiseCancellationProvider" }, { "type": "null" } ] }, "language": { "anyOf": [ { "type": "string", "maxLength": 16 }, { "type": "null" } ], "title": "Language" }, "locale": { "anyOf": [ { "type": "string", "maxLength": 16 }, { "type": "null" } ], "title": "Locale" }, "multilingual_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Multilingual Enabled" }, "multilingual_languages": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "maxItems": 50 }, { "type": "null" } ], "title": "Multilingual Languages" }, "first_speaker": { "anyOf": [ { "type": "string", "enum": [ "agent", "user" ] }, { "type": "null" } ], "title": "First Speaker" }, "mode": { "anyOf": [ { "type": "string", "enum": [ "static", "dynamic" ] }, { "type": "null" } ], "title": "Mode" }, "text": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Text" }, "instructions": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Instructions" }, "interruptible": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Interruptible" }, "ai_disclosure_text": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Ai Disclosure Text" }, "voice_id": { "type": "string", "format": "uuid", "title": "Voice Id" } }, "additionalProperties": false, "type": "object", "required": [ "voice_id" ], "title": "LibraryVoiceConfigCreate", "description": "POST body for ``/v1/library/personas/{id}/voice-config``.\n\nReuses the same field surface as ``VoicePipelineConfigCreate`` minus\nthe ``agent_id`` / ``persona_id`` parent_xor \u2014 both are implied:\n``persona_id`` comes from the URL path, ``agent_id`` is always None\nfor library voice configs (library entries are persona-scoped, never\nagent-scoped)." }, "LifecycleEventRow": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "gap_cluster_id": { "type": "string", "format": "uuid", "title": "Gap Cluster Id" }, "from_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "From Status" }, "to_status": { "type": "string", "title": "To Status" }, "actor_user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Actor User Id" }, "actor_type": { "type": "string", "title": "Actor Type" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" }, "note": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Note" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "gap_cluster_id", "from_status", "to_status", "actor_user_id", "actor_type", "reason", "note", "created_at" ], "title": "LifecycleEventRow", "description": "One row of ``gap_cluster_lifecycle_events`` for the timeline view." }, "LifecycleEventsResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/LifecycleEventRow" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "LifecycleEventsResponse" }, "LifecycleTransitionResponse": { "properties": { "cluster_id": { "type": "string", "format": "uuid", "title": "Cluster Id" }, "from_status": { "type": "string", "title": "From Status" }, "to_status": { "type": "string", "title": "To Status" }, "actor_user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Actor User Id" }, "event_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Event Id" } }, "type": "object", "required": [ "cluster_id", "from_status", "to_status", "actor_user_id", "event_id" ], "title": "LifecycleTransitionResponse", "description": "Wire shape for a successful lifecycle mutation.\n\nMirrors ``ClusterTransitionResult`` from the lifecycle service with\nenum statuses flattened to their string values for SDK ergonomics." }, "LimitsResponse": { "properties": { "daily_org_budget_usd": { "type": "number", "title": "Daily Org Budget Usd" }, "daily_org_budget_alert_ratio": { "type": "number", "title": "Daily Org Budget Alert Ratio" }, "turns_per_minute_per_org": { "type": "integer", "title": "Turns Per Minute Per Org" }, "turns_per_day_per_org": { "type": "integer", "title": "Turns Per Day Per Org" }, "turns_per_day_per_user": { "type": "integer", "title": "Turns Per Day Per User" }, "total_tokens_limit": { "type": "integer", "title": "Total Tokens Limit" }, "tool_calls_limit": { "type": "integer", "title": "Tool Calls Limit" }, "max_iterations": { "type": "integer", "title": "Max Iterations" }, "history_char_budget_retry_ratio": { "type": "number", "title": "History Char Budget Retry Ratio" }, "max_tokens": { "type": "integer", "title": "Max Tokens" }, "max_code_output_chars": { "type": "integer", "title": "Max Code Output Chars" }, "history_char_budget": { "type": "integer", "title": "History Char Budget" }, "history_max_messages": { "type": "integer", "title": "History Max Messages" }, "web_search_max_uses": { "type": "integer", "title": "Web Search Max Uses" }, "max_tool_result_chars": { "type": "integer", "title": "Max Tool Result Chars" }, "turn_lock_ttl_seconds": { "type": "integer", "title": "Turn Lock Ttl Seconds" }, "compile_wait_timeout_seconds": { "type": "integer", "title": "Compile Wait Timeout Seconds" }, "compile_poll_interval_seconds": { "type": "number", "title": "Compile Poll Interval Seconds" } }, "type": "object", "required": [ "daily_org_budget_usd", "daily_org_budget_alert_ratio", "turns_per_minute_per_org", "turns_per_day_per_org", "turns_per_day_per_user", "total_tokens_limit", "tool_calls_limit", "max_iterations", "history_char_budget_retry_ratio", "max_tokens", "max_code_output_chars", "history_char_budget", "history_max_messages", "web_search_max_uses", "max_tool_result_chars", "turn_lock_ttl_seconds", "compile_wait_timeout_seconds", "compile_poll_interval_seconds" ], "title": "LimitsResponse", "description": "Current Ask Feather cost/quota limits (mirrors ``limits.AskFeatherLimits``).\nRead from / written to Redis via the internal ``/ask-feather/limits`` endpoint." }, "LimitsUpdate": { "properties": { "daily_org_budget_usd": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "null" } ], "title": "Daily Org Budget Usd" }, "daily_org_budget_alert_ratio": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Daily Org Budget Alert Ratio" }, "turns_per_minute_per_org": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Turns Per Minute Per Org" }, "turns_per_day_per_org": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Turns Per Day Per Org" }, "turns_per_day_per_user": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Turns Per Day Per User" }, "total_tokens_limit": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Total Tokens Limit" }, "tool_calls_limit": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Tool Calls Limit" }, "max_iterations": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Max Iterations" }, "history_char_budget_retry_ratio": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "History Char Budget Retry Ratio" }, "max_tokens": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Max Tokens" }, "max_code_output_chars": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Max Code Output Chars" }, "history_char_budget": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "History Char Budget" }, "history_max_messages": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "History Max Messages" }, "web_search_max_uses": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Web Search Max Uses" }, "max_tool_result_chars": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Max Tool Result Chars" }, "turn_lock_ttl_seconds": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Turn Lock Ttl Seconds" }, "compile_wait_timeout_seconds": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Compile Wait Timeout Seconds" }, "compile_poll_interval_seconds": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0.0 }, { "type": "null" } ], "title": "Compile Poll Interval Seconds" } }, "type": "object", "title": "LimitsUpdate", "description": "Partial update for Ask Feather limits \u2014 omitted fields keep their value." }, "ListDraftsResponse": { "properties": { "drafts": { "items": { "$ref": "#/components/schemas/DraftResponse" }, "type": "array", "title": "Drafts" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "additionalProperties": false, "type": "object", "required": [ "drafts" ], "title": "ListDraftsResponse" }, "ListMailboxAccountsResponse": { "properties": { "accounts": { "items": { "$ref": "#/components/schemas/MailboxAccountResponse" }, "type": "array", "title": "Accounts" } }, "additionalProperties": false, "type": "object", "required": [ "accounts" ], "title": "ListMailboxAccountsResponse", "description": "Wrapper for the list endpoint." }, "ListMessageEventsResponse": { "properties": { "provider_message_id": { "type": "string", "title": "Provider Message Id" }, "delivery_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Delivery Status" }, "delivery_status_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Delivery Status At" }, "events": { "items": { "$ref": "#/components/schemas/MessageEventResponse" }, "type": "array", "title": "Events" } }, "additionalProperties": false, "type": "object", "required": [ "provider_message_id", "delivery_status", "delivery_status_at" ], "title": "ListMessageEventsResponse", "description": "All recorded events for a single outbound message.\n\nPairs the canonical headline state (``delivery_status``,\n``delivery_status_at`` from the parent ``ConversationTurn``) with the\nfull append-only audit trail. The headline is the source of truth\nfor \"what state is the message in *now*\"; the audit is the timeline." }, "LocalVADParams": { "properties": { "confidence": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Confidence", "default": 0.7 }, "start_secs": { "type": "number", "maximum": 2.0, "minimum": 0.0, "title": "Start Secs", "default": 0.2 }, "stop_secs": { "type": "number", "maximum": 3.0, "minimum": 0.0, "title": "Stop Secs", "default": 0.5 }, "min_volume": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Min Volume", "default": 0.6 } }, "additionalProperties": false, "type": "object", "title": "LocalVADParams", "description": "Silero VAD tuning. Always applied for Deepgram Nova; ignored otherwise." }, "MailboxAccountResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "address": { "type": "string", "title": "Address" }, "provider": { "$ref": "#/components/schemas/MailboxProvider" }, "status": { "$ref": "#/components/schemas/MailboxStatus" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "team_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Revision Id" }, "external_account_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Account Id" }, "capabilities": { "items": { "type": "string" }, "type": "array", "title": "Capabilities" }, "default_signature_html": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Default Signature Html" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "additionalProperties": false, "type": "object", "required": [ "id", "address", "provider", "status", "agent_id", "external_account_id", "created_at", "updated_at" ], "title": "MailboxAccountResponse", "description": "One row in the org's connected-mailbox list." }, "MailboxProvider": { "type": "string", "enum": [ "gmail", "microsoft" ], "title": "MailboxProvider", "description": "Mailbox-native providers we connect to via Nylas in v1.\n\nBoth providers ride the same `MailboxConnector` (Nylas implementation).\nPattern B (brand-domain transactional sending: SendGrid / SES / Resend)\nis v2 and lives in a separate connector." }, "MailboxStatus": { "type": "string", "enum": [ "pending", "active", "paused", "error", "needs_reauth", "retired" ], "title": "MailboxStatus" }, "MemoryCoverageEnvelope": { "properties": { "users_with_memory": { "type": "integer", "title": "Users With Memory" }, "total_end_users": { "type": "integer", "title": "Total End Users" }, "coverage_rate_pct": { "type": "number", "title": "Coverage Rate Pct" }, "total_episodes": { "type": "integer", "title": "Total Episodes" }, "completed_episodes": { "type": "integer", "title": "Completed Episodes" } }, "type": "object", "required": [ "users_with_memory", "total_end_users", "coverage_rate_pct", "total_episodes", "completed_episodes" ], "title": "MemoryCoverageEnvelope", "description": "Single-object response for ``/v1/analytics/memory/coverage``.\n\nNumerator (``users_with_memory`` and the episode counts) comes from\nTinybird; ``total_end_users`` comes from Neo4j. The service merges\nboth, computing ``coverage_rate_pct`` and clamping at 100 for the\nedge case where a user was deleted after their memory was synced." }, "MemoryDashboardEnvelope": { "properties": { "ingestion": { "items": { "$ref": "#/components/schemas/MemoryIngestionTimeseriesRow" }, "type": "array", "title": "Ingestion" }, "coverage": { "$ref": "#/components/schemas/MemoryCoverageEnvelope" }, "recalls": { "items": { "$ref": "#/components/schemas/RecallTimeseriesRow" }, "type": "array", "title": "Recalls" }, "distribution": { "$ref": "#/components/schemas/UserDistributionRow" } }, "type": "object", "required": [ "ingestion", "coverage", "recalls", "distribution" ], "title": "MemoryDashboardEnvelope", "description": "Single envelope returned by ``/v1/analytics/memory/dashboard``." }, "MemoryFactResponse": { "properties": { "fact": { "type": "string", "title": "Fact" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "valid_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Valid At" }, "invalid_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Invalid At" }, "id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Id" }, "source_session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Source Session Id" } }, "type": "object", "required": [ "fact" ], "title": "MemoryFactResponse" }, "MemoryIngestionTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "episodes": { "type": "integer", "title": "Episodes" }, "completed": { "type": "integer", "title": "Completed" }, "failed": { "type": "integer", "title": "Failed" }, "partial": { "type": "integer", "title": "Partial" }, "skipped": { "type": "integer", "title": "Skipped" }, "pending": { "type": "integer", "title": "Pending" }, "messages_synced": { "type": "integer", "title": "Messages Synced" }, "success_rate_pct": { "type": "number", "title": "Success Rate Pct" } }, "type": "object", "required": [ "time_bucket", "episodes", "completed", "failed", "partial", "skipped", "pending", "messages_synced", "success_rate_pct" ], "title": "MemoryIngestionTimeseriesRow" }, "MemoryOrgSettings": { "properties": { "min_user_turns": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Min User Turns" }, "fact_cap": { "anyOf": [ { "type": "integer", "maximum": 100.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Fact Cap" }, "retention_days": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Retention Days" } }, "type": "object", "title": "MemoryOrgSettings", "description": "Per-org memory ingestion overrides.\n\nRead by ``resolve_memory_sync_policy`` / ``resolve_memory_fact_policy``\nfrom ``Organization.settings['memory']``. This is the strict WRITE-time\nguard enforced on the org-update API; its fail-safe READ mirrors are\n``Organization.settings_memory_min_user_turns`` /\n``settings_memory_fact_cap`` / ``settings_memory_retention_days`` (keep\nthe accepted ranges in sync with them)." }, "MessageDistributionRow": { "properties": { "bucket_index": { "type": "integer", "title": "Bucket Index" }, "bucket": { "type": "string", "title": "Bucket" }, "session_count": { "type": "integer", "title": "Session Count" }, "percentage": { "type": "number", "title": "Percentage" } }, "type": "object", "required": [ "bucket_index", "bucket", "session_count", "percentage" ], "title": "MessageDistributionRow" }, "MessageEntry": { "properties": { "turn_id": { "type": "string", "format": "uuid", "title": "Turn Id" }, "role": { "type": "string", "title": "Role" }, "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp" }, "content": { "type": "string", "title": "Content" }, "tool_calls": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ToolCall" }, "type": "array" }, { "type": "null" } ], "title": "Tool Calls" }, "tool_results": { "anyOf": [ { "$ref": "#/components/schemas/ToolResult" }, { "type": "null" } ] }, "model_used": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Used" }, "latency_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Latency Ms" }, "truncated": { "type": "boolean", "title": "Truncated", "default": false }, "original_char_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Original Char Count" } }, "type": "object", "required": [ "turn_id", "role", "timestamp", "content" ], "title": "MessageEntry", "description": "One redacted message in the transcript view of a session." }, "MessageEventResponse": { "properties": { "event_type": { "type": "string", "title": "Event Type" }, "occurred_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Occurred At" }, "vendor_event_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Vendor Event Type" }, "payload": { "additionalProperties": true, "type": "object", "title": "Payload" } }, "additionalProperties": false, "type": "object", "required": [ "event_type" ], "title": "MessageEventResponse", "description": "One row in the append-only ``EmailChannelTurn.provider_events`` audit.\n\nThe schema is intentionally permissive \u2014 the JSONB shape evolved\nover ENG-422 and is documented in\n``src.communication.email.providers``. ``payload`` carries the\noriginal event minus the fields promoted here." }, "MessageInput": { "properties": { "role": { "type": "string", "enum": [ "system", "user", "assistant" ], "title": "Role" }, "content": { "type": "string", "title": "Content" } }, "type": "object", "required": [ "role", "content" ], "title": "MessageInput" }, "MissingEvidenceReason": { "type": "string", "enum": [ "no_rag_trace", "no_kb_snapshot", "no_citations", "no_tool_trace", "no_csat", "no_user_feedback", "transcript_redaction_skipped", "legacy_session" ], "title": "MissingEvidenceReason", "description": "Why a downstream classification may need to lower confidence or skip.\n\nRecorded on ``SessionAnalysisInput.missing_evidence_reasons`` by the\nassembler when expected traces are unavailable. Analyzer code consults\nthis list to decide whether to attempt evidence-backed classifications." }, "MockCreate": { "properties": { "slug": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Slug" }, "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string", "maxLength": 4000 }, { "type": "null" } ], "title": "Description" }, "default_status": { "type": "integer", "maximum": 599.0, "minimum": 100.0, "title": "Default Status", "default": 404 }, "default_response_body": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Default Response Body" }, "is_enabled": { "type": "boolean", "title": "Is Enabled", "default": true } }, "type": "object", "required": [ "slug", "name" ], "title": "MockCreate" }, "MockDashboardEnvelope": { "properties": { "summary": { "items": { "$ref": "#/components/schemas/MockSummaryRow" }, "type": "array", "title": "Summary" }, "requests": { "items": { "$ref": "#/components/schemas/MockRequestsTimeseriesRow" }, "type": "array", "title": "Requests" }, "latency": { "items": { "$ref": "#/components/schemas/MockLatencyTimeseriesRow" }, "type": "array", "title": "Latency" }, "match_rate": { "items": { "$ref": "#/components/schemas/MockMatchRateTimeseriesRow" }, "type": "array", "title": "Match Rate" }, "top_scenarios": { "items": { "$ref": "#/components/schemas/MockTopScenarioRow" }, "type": "array", "title": "Top Scenarios" } }, "type": "object", "required": [ "summary", "requests", "latency", "match_rate", "top_scenarios" ], "title": "MockDashboardEnvelope" }, "MockLatencyTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "requests": { "type": "integer", "title": "Requests" }, "avg_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Avg Latency Ms" }, "p50_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "P50 Latency Ms" }, "p95_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "P95 Latency Ms" }, "p99_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "P99 Latency Ms" } }, "type": "object", "required": [ "time_bucket", "requests" ], "title": "MockLatencyTimeseriesRow" }, "MockMatchRateTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "requests": { "type": "integer", "title": "Requests" }, "matched_requests": { "type": "integer", "title": "Matched Requests" }, "match_rate": { "type": "number", "title": "Match Rate" } }, "type": "object", "required": [ "time_bucket", "requests", "matched_requests", "match_rate" ], "title": "MockMatchRateTimeseriesRow" }, "MockRequestLogCompact": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "mock_id": { "type": "string", "format": "uuid", "title": "Mock Id" }, "scenario_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Scenario Id" }, "method": { "type": "string", "title": "Method" }, "path": { "type": "string", "title": "Path" }, "response_status": { "type": "integer", "title": "Response Status" }, "latency_ms": { "type": "integer", "title": "Latency Ms" }, "truncated_request": { "type": "boolean", "title": "Truncated Request" }, "truncated_response": { "type": "boolean", "title": "Truncated Response" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "mock_id", "scenario_id", "method", "path", "response_status", "latency_ms", "truncated_request", "truncated_response", "created_at" ], "title": "MockRequestLogCompact", "description": "Compact entry returned by the list endpoint \u2014 no bodies/headers." }, "MockRequestLogVerbose": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "mock_id": { "type": "string", "format": "uuid", "title": "Mock Id" }, "scenario_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Scenario Id" }, "method": { "type": "string", "title": "Method" }, "path": { "type": "string", "title": "Path" }, "response_status": { "type": "integer", "title": "Response Status" }, "latency_ms": { "type": "integer", "title": "Latency Ms" }, "truncated_request": { "type": "boolean", "title": "Truncated Request" }, "truncated_response": { "type": "boolean", "title": "Truncated Response" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "request_query": { "additionalProperties": true, "type": "object", "title": "Request Query" }, "request_headers": { "additionalProperties": true, "type": "object", "title": "Request Headers" }, "request_body": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Request Body" }, "response_headers": { "additionalProperties": true, "type": "object", "title": "Response Headers" }, "response_body": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Response Body" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" } }, "type": "object", "required": [ "id", "mock_id", "scenario_id", "method", "path", "response_status", "latency_ms", "truncated_request", "truncated_response", "created_at", "request_query", "request_headers", "request_body", "response_headers", "response_body", "trace_id" ], "title": "MockRequestLogVerbose", "description": "Verbose single-get response: includes request/response bodies + headers." }, "MockRequestsTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "requests": { "type": "integer", "title": "Requests" }, "matched_requests": { "type": "integer", "title": "Matched Requests" }, "errors": { "type": "integer", "title": "Errors" } }, "type": "object", "required": [ "time_bucket", "requests", "matched_requests", "errors" ], "title": "MockRequestsTimeseriesRow" }, "MockResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "slug": { "type": "string", "title": "Slug" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "default_status": { "type": "integer", "title": "Default Status" }, "default_response_body": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Default Response Body" }, "is_enabled": { "type": "boolean", "title": "Is Enabled" }, "created_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Created By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "public_url_path": { "type": "string", "title": "Public Url Path" }, "scenarios": { "items": { "$ref": "#/components/schemas/MockScenarioResponse" }, "type": "array", "title": "Scenarios" } }, "type": "object", "required": [ "id", "organization_id", "slug", "name", "description", "default_status", "default_response_body", "is_enabled", "created_by", "created_at", "updated_at", "public_url_path" ], "title": "MockResponse" }, "MockScenarioCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "priority": { "type": "integer", "maximum": 10000.0, "minimum": 0.0, "title": "Priority", "default": 100 }, "match_method": { "type": "string", "title": "Match Method", "default": "ANY" }, "match_path_pattern": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Match Path Pattern" }, "match_headers": { "additionalProperties": true, "type": "object", "title": "Match Headers" }, "match_query": { "additionalProperties": true, "type": "object", "title": "Match Query" }, "match_body": { "additionalProperties": true, "type": "object", "title": "Match Body" }, "response_status": { "type": "integer", "maximum": 599.0, "minimum": 100.0, "title": "Response Status", "default": 200 }, "response_headers": { "additionalProperties": true, "type": "object", "title": "Response Headers" }, "response_body": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "items": {}, "type": "array" } ], "title": "Response Body" }, "delay_ms": { "type": "integer", "maximum": 60000.0, "minimum": 0.0, "title": "Delay Ms", "default": 0 }, "is_enabled": { "type": "boolean", "title": "Is Enabled", "default": true } }, "type": "object", "required": [ "name" ], "title": "MockScenarioCreate" }, "MockScenarioResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "mock_id": { "type": "string", "format": "uuid", "title": "Mock Id" }, "name": { "type": "string", "title": "Name" }, "priority": { "type": "integer", "title": "Priority" }, "match_method": { "type": "string", "title": "Match Method" }, "match_path_pattern": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Match Path Pattern" }, "match_headers": { "additionalProperties": true, "type": "object", "title": "Match Headers" }, "match_query": { "additionalProperties": true, "type": "object", "title": "Match Query" }, "match_body": { "additionalProperties": true, "type": "object", "title": "Match Body" }, "response_status": { "type": "integer", "title": "Response Status" }, "response_headers": { "additionalProperties": true, "type": "object", "title": "Response Headers" }, "response_body": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "items": {}, "type": "array" } ], "title": "Response Body" }, "delay_ms": { "type": "integer", "title": "Delay Ms" }, "is_enabled": { "type": "boolean", "title": "Is Enabled" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "mock_id", "name", "priority", "match_method", "match_path_pattern", "match_headers", "match_query", "match_body", "response_status", "response_headers", "response_body", "delay_ms", "is_enabled", "created_at", "updated_at" ], "title": "MockScenarioResponse" }, "MockScenarioUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "priority": { "anyOf": [ { "type": "integer", "maximum": 10000.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Priority" }, "match_method": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Match Method" }, "match_path_pattern": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Match Path Pattern" }, "match_headers": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Match Headers" }, "match_query": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Match Query" }, "match_body": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Match Body" }, "response_status": { "anyOf": [ { "type": "integer", "maximum": 599.0, "minimum": 100.0 }, { "type": "null" } ], "title": "Response Status" }, "response_headers": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Response Headers" }, "response_body": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Response Body" }, "delay_ms": { "anyOf": [ { "type": "integer", "maximum": 60000.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Delay Ms" }, "is_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Enabled" } }, "type": "object", "title": "MockScenarioUpdate", "description": "Partial update \u2014 every field optional, same caps as create.\n\nExplicit ``null`` is honoured only for nullable columns (currently just\n``match_path_pattern``); for every other field it's rejected at the\nschema layer with 422 (see ``_reject_null_on_not_null``)." }, "MockSummaryRow": { "properties": { "requests": { "type": "integer", "title": "Requests" }, "matched_requests": { "type": "integer", "title": "Matched Requests" }, "errors": { "type": "integer", "title": "Errors" }, "match_rate": { "type": "number", "title": "Match Rate" }, "error_rate": { "type": "number", "title": "Error Rate" }, "avg_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Avg Latency Ms" }, "p95_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "P95 Latency Ms" } }, "type": "object", "required": [ "requests", "matched_requests", "errors", "match_rate", "error_rate" ], "title": "MockSummaryRow" }, "MockTopScenarioRow": { "properties": { "scenario_id": { "type": "string", "title": "Scenario Id" }, "scenario_name": { "type": "string", "title": "Scenario Name" }, "requests": { "type": "integer", "title": "Requests" }, "avg_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Avg Latency Ms" }, "p95_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "P95 Latency Ms" } }, "type": "object", "required": [ "scenario_id", "scenario_name", "requests" ], "title": "MockTopScenarioRow" }, "MockUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string", "maxLength": 4000 }, { "type": "null" } ], "title": "Description" }, "default_status": { "anyOf": [ { "type": "integer", "maximum": 599.0, "minimum": 100.0 }, { "type": "null" } ], "title": "Default Status" }, "default_response_body": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "items": {}, "type": "array" }, { "type": "null" } ], "title": "Default Response Body" }, "is_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Enabled" } }, "type": "object", "title": "MockUpdate", "description": "Partial update. Fields the client omits are not modified. An explicit\n``null`` on a nullable column (``description``, ``default_response_body``)\nclears it; an explicit ``null`` on a NOT-NULL column is rejected at the\nschema layer (see ``_reject_null_on_not_null``)." }, "ModelCatalogResponse": { "properties": { "models": { "items": { "$ref": "#/components/schemas/AvailableModel" }, "type": "array", "title": "Models" }, "role_defaults": { "items": { "$ref": "#/components/schemas/RoleModelDefault" }, "type": "array", "title": "Role Defaults" }, "default_chain": { "items": { "$ref": "#/components/schemas/ModelChainEntry" }, "type": "array", "title": "Default Chain" } }, "type": "object", "required": [ "models", "role_defaults", "default_chain" ], "title": "ModelCatalogResponse", "description": "Selectable models, per-role code defaults, and the system default fallback chain.\n\n``default_chain`` is the platform-level fallback chain (a hardcoded constant\nfrom ``src.model_router.defaults``) used when no org-level default router\nconfig exists. It is read-only \u2014 there is no API to mutate it." }, "ModelChainEntry": { "properties": { "model": { "type": "string", "title": "Model" }, "config": { "$ref": "#/components/schemas/ModelConfig" } }, "type": "object", "required": [ "model" ], "title": "ModelChainEntry" }, "ModelConfig": { "properties": { "temperature": { "anyOf": [ { "type": "number", "maximum": 2.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Temperature" }, "max_tokens": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Max Tokens" }, "top_p": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Top P" }, "stop_sequences": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "maxItems": 8 }, { "type": "null" } ], "title": "Stop Sequences" }, "reasoning_effort": { "anyOf": [ { "type": "string", "enum": [ "none", "minimal", "low", "medium", "high", "xhigh", "max" ] }, { "type": "null" } ], "title": "Reasoning Effort" }, "request_timeout_ms": { "anyOf": [ { "type": "integer", "maximum": 20000.0, "minimum": 1000.0 }, { "type": "null" } ], "title": "Request Timeout Ms" }, "thinking_budget": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Thinking Budget" } }, "type": "object", "title": "ModelConfig" }, "ModelResponse": { "properties": { "content": { "type": "string", "title": "Content" }, "model_identifier": { "type": "string", "title": "Model Identifier" }, "provider": { "type": "string", "title": "Provider" }, "input_tokens": { "type": "integer", "title": "Input Tokens" }, "output_tokens": { "type": "integer", "title": "Output Tokens" }, "total_tokens": { "type": "integer", "title": "Total Tokens" }, "input_cost_usd": { "type": "number", "title": "Input Cost Usd" }, "output_cost_usd": { "type": "number", "title": "Output Cost Usd" }, "cache_cost_usd": { "type": "number", "title": "Cache Cost Usd", "default": 0.0 }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "latency_ms": { "type": "integer", "title": "Latency Ms" }, "routing_metadata": { "anyOf": [ { "$ref": "#/components/schemas/SmartRoutingMetadata" }, { "type": "null" } ] }, "parsed_output": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Parsed Output" }, "execution_engine": { "type": "string", "enum": [ "pydantic_text", "pydantic_structured" ], "title": "Execution Engine", "default": "pydantic_text" }, "cache_read_input_tokens": { "type": "integer", "title": "Cache Read Input Tokens", "default": 0 }, "cache_creation_input_tokens": { "type": "integer", "title": "Cache Creation Input Tokens", "default": 0 }, "cache_hit": { "type": "boolean", "title": "Cache Hit", "default": false }, "route_decision_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Route Decision Id" } }, "type": "object", "required": [ "content", "model_identifier", "provider", "input_tokens", "output_tokens", "total_tokens", "input_cost_usd", "output_cost_usd", "total_cost_usd", "latency_ms" ], "title": "ModelResponse" }, "ModelRouterDashboardEnvelope": { "properties": { "cost_timeseries": { "items": { "$ref": "#/components/schemas/CostByOrgDailyRow" }, "type": "array", "title": "Cost Timeseries" }, "cost_by_model": { "items": { "$ref": "#/components/schemas/CostByModelRow" }, "type": "array", "title": "Cost By Model" }, "latency": { "items": { "$ref": "#/components/schemas/LatencyRow" }, "type": "array", "title": "Latency" }, "error_rate": { "items": { "$ref": "#/components/schemas/ErrorRateRow" }, "type": "array", "title": "Error Rate" }, "cache_savings": { "items": { "$ref": "#/components/schemas/CacheSavingsRow" }, "type": "array", "title": "Cache Savings" }, "fallback_rate": { "items": { "$ref": "#/components/schemas/FallbackRateRow" }, "type": "array", "title": "Fallback Rate" } }, "type": "object", "required": [ "cost_timeseries", "cost_by_model", "latency", "error_rate", "cache_savings", "fallback_rate" ], "title": "ModelRouterDashboardEnvelope", "description": "One-shot LLM dashboard \u2014 fans out six existing model-router pipes." }, "ModelSettingsDiff": { "properties": { "analyzer": { "items": { "$ref": "#/components/schemas/FieldChange" }, "type": "array", "title": "Analyzer" }, "router": { "items": { "$ref": "#/components/schemas/FieldChange" }, "type": "array", "title": "Router" } }, "type": "object", "title": "ModelSettingsDiff", "description": "Diff over analyzer and router model settings dicts." }, "ModelTier": { "type": "string", "enum": [ "economy", "standard", "premium" ], "title": "ModelTier" }, "MonitorRolloutRow": { "properties": { "policy_id": { "type": "string", "title": "Policy Id" }, "policy_name": { "type": "string", "title": "Policy Name" }, "strictness": { "type": "string", "title": "Strictness" }, "evaluations": { "type": "integer", "title": "Evaluations" }, "would_be_violations": { "type": "integer", "title": "Would Be Violations" }, "would_be_rate_pct": { "type": "number", "title": "Would Be Rate Pct" }, "would_be_blocks": { "type": "integer", "title": "Would Be Blocks" }, "would_be_redacts": { "type": "integer", "title": "Would Be Redacts" }, "would_be_appends": { "type": "integer", "title": "Would Be Appends" }, "would_be_handoffs": { "type": "integer", "title": "Would Be Handoffs" }, "would_be_approvals": { "type": "integer", "title": "Would Be Approvals" }, "errors": { "type": "integer", "title": "Errors" }, "avg_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Avg Latency Ms" }, "p95_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "P95 Latency Ms" }, "response_p95_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Response P95 Latency Ms" } }, "type": "object", "required": [ "policy_id", "policy_name", "strictness", "evaluations", "would_be_violations", "would_be_rate_pct", "would_be_blocks", "would_be_redacts", "would_be_appends", "would_be_handoffs", "would_be_approvals", "errors" ], "title": "MonitorRolloutRow" }, "NamespaceSchemaResponse": { "properties": { "namespace": { "type": "string", "title": "Namespace" }, "summary": { "type": "string", "title": "Summary" }, "groups": { "items": { "type": "string" }, "type": "array", "title": "Groups" }, "fields": { "items": { "$ref": "#/components/schemas/ConfigFieldSchema" }, "type": "array", "title": "Fields" } }, "type": "object", "required": [ "namespace", "summary", "groups", "fields" ], "title": "NamespaceSchemaResponse" }, "NamespaceSummaryResponse": { "properties": { "namespace": { "type": "string", "title": "Namespace" }, "summary": { "type": "string", "title": "Summary" }, "field_count": { "type": "integer", "title": "Field Count" } }, "type": "object", "required": [ "namespace", "summary", "field_count" ], "title": "NamespaceSummaryResponse" }, "NodeChange": { "properties": { "id": { "type": "string", "title": "Id" }, "kind": { "type": "string", "enum": [ "agent", "action", "handoff", "approval", "component" ], "title": "Kind" }, "changes": { "items": { "$ref": "#/components/schemas/FieldChange" }, "type": "array", "title": "Changes" } }, "type": "object", "required": [ "id", "kind" ], "title": "NodeChange", "description": "Field-level changes within a matched (same id) node pair." }, "NodeCollectionDiff": { "properties": { "added": { "items": { "$ref": "#/components/schemas/ProjectedNode" }, "type": "array", "title": "Added" }, "removed": { "items": { "$ref": "#/components/schemas/ProjectedNode" }, "type": "array", "title": "Removed" }, "changed": { "items": { "$ref": "#/components/schemas/NodeChange" }, "type": "array", "title": "Changed" } }, "type": "object", "title": "NodeCollectionDiff", "description": "Diff over the node collection." }, "NoiseCancellationProvider": { "type": "string", "enum": [ "rnnoise", "dtln" ], "title": "NoiseCancellationProvider", "description": "Noise-suppression engine wired by ``audio_filters.build_audio_in_filter``.\n\nApplies only when ``noise_cancellation_enabled``. String values MUST match\nthe provider strings the factory dispatches on." }, "NotificationTypeConfigUpdate": { "properties": { "enabled": { "type": "boolean", "title": "Enabled" }, "severity_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Severity Override" }, "threshold_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Threshold Config" }, "delivery_mode": { "type": "string", "title": "Delivery Mode", "default": "immediate" }, "rate_limit_per_hour": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Rate Limit Per Hour" } }, "additionalProperties": false, "type": "object", "required": [ "enabled" ], "title": "NotificationTypeConfigUpdate", "description": "Upsert the per-org config for one notification type.\n\n``event_type`` is a path param. ``severity_override`` is validated server-side\nagainst ``NotificationSeverity``; ``threshold_config`` against the type's schema." }, "NotificationTypeView": { "properties": { "event_type": { "type": "string", "title": "Event Type" }, "category": { "type": "string", "title": "Category" }, "display_name": { "type": "string", "title": "Display Name" }, "description": { "type": "string", "title": "Description" }, "default_severity": { "type": "string", "title": "Default Severity" }, "supported_channels": { "items": { "type": "string" }, "type": "array", "title": "Supported Channels" }, "recommended": { "type": "boolean", "title": "Recommended" }, "template_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Template Id" }, "threshold_based": { "type": "boolean", "title": "Threshold Based" }, "threshold_config_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Threshold Config Schema" }, "payload_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Payload Schema" }, "enabled": { "type": "boolean", "title": "Enabled" }, "severity_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Severity Override" }, "threshold_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Threshold Config" }, "effective_severity": { "type": "string", "title": "Effective Severity" }, "delivery_mode": { "type": "string", "title": "Delivery Mode" }, "rate_limit_per_hour": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Rate Limit Per Hour" }, "resolved_destination_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Resolved Destination Ids" }, "has_destination": { "type": "boolean", "title": "Has Destination" } }, "type": "object", "required": [ "event_type", "category", "display_name", "description", "default_severity", "supported_channels", "recommended", "template_id", "threshold_based", "threshold_config_schema", "payload_schema", "enabled", "severity_override", "threshold_config", "effective_severity", "delivery_mode", "rate_limit_per_hour", "resolved_destination_ids", "has_destination" ], "title": "NotificationTypeView", "description": "A catalog type merged with this org's config and resolved destinations.\n\nBuilt by ``NotificationCatalogService`` (not from a single ORM row), so it\nsurfaces both the static catalog metadata and the org's live state. The\n``payload_schema`` / ``threshold_config_schema`` are JSON Schema (the\nvariables/validation manifest the frontend hints from)." }, "OperationalSettingsResponse": { "properties": { "evaluate_live": { "type": "boolean", "title": "Evaluate Live", "default": false }, "knowledge_gap_analysis_enabled": { "type": "boolean", "title": "Knowledge Gap Analysis Enabled", "default": true }, "release_suite_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Release Suite Id" }, "release_gate_mode": { "type": "string", "title": "Release Gate Mode", "default": "off" }, "release_gate_max_failures": { "type": "integer", "title": "Release Gate Max Failures", "default": 0 } }, "type": "object", "title": "OperationalSettingsResponse", "description": "GET /assistants/{id}/operational-settings (\u00a73.2)." }, "OrgChannelPromptOverride": { "properties": { "mode": { "type": "string", "enum": [ "append", "replace" ], "title": "Mode" }, "prompt": { "type": "string", "title": "Prompt" } }, "type": "object", "required": [ "mode", "prompt" ], "title": "OrgChannelPromptOverride", "description": "One org-level override of a platform channel medium block.\n\n``mode=\"append\"`` adds the org text after the platform medium block; ``mode=\"replace\"``\nreplaces the platform medium block entirely with the org text. The machinery preamble\nand the platform baseline are NEVER configurable \u2014 they always render outside this\noverride, regardless of mode." }, "OrgChannelPromptsResponse": { "properties": { "channel_prompts": { "additionalProperties": { "$ref": "#/components/schemas/OrgChannelPromptOverride" }, "type": "object", "title": "Channel Prompts" } }, "type": "object", "required": [ "channel_prompts" ], "title": "OrgChannelPromptsResponse", "description": "The org's currently stored channel-prompt override map (empty when unset)." }, "OrgChannelPromptsUpdate": { "properties": { "channel_prompts": { "additionalProperties": { "$ref": "#/components/schemas/OrgChannelPromptOverride" }, "propertyNames": { "enum": [ "sms", "voice", "email", "chat" ] }, "type": "object", "title": "Channel Prompts" } }, "type": "object", "required": [ "channel_prompts" ], "title": "OrgChannelPromptsUpdate", "description": "PUT body for the org-level channel-prompt override map.\n\nReplaces the whole map (last-writer-wins), matching the judge-model settings\nsemantics. Sparse: a channel absent from ``channel_prompts`` inherits the platform\ndefault. Keyed by :data:`OverridableChannel` \u2014 those are the only channels\nwith a platform medium block to override; any other channel (``api``, ``sandbox``, or\nan unknown value) rejects with 422." }, "OrgMemberResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "clerk_user_id": { "type": "string", "title": "Clerk User Id" }, "role": { "type": "string", "title": "Role" }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email" }, "is_active": { "type": "boolean", "title": "Is Active" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "clerk_user_id", "role", "display_name", "email", "is_active", "created_at", "updated_at" ], "title": "OrgMemberResponse" }, "OrgMemoryResponse": { "properties": { "memory_enabled": { "type": "boolean", "title": "Memory Enabled" } }, "type": "object", "required": [ "memory_enabled" ], "title": "OrgMemoryResponse", "description": "The org-level memory module toggle (effective boolean, never null)." }, "OrgMemoryUpdate": { "properties": { "memory_enabled": { "type": "boolean", "title": "Memory Enabled" } }, "type": "object", "required": [ "memory_enabled" ], "title": "OrgMemoryUpdate", "description": "Set the org-level memory module toggle.\n\n``memory_enabled=False`` disables all memory recall and ingestion for this\norg (GDPR purge bypasses this flag). ``True`` re-enables it. Defaults to\n``True`` when the key has never been set." }, "OrgPolicyEnforcementResponse": { "properties": { "policy_enforcement_enabled": { "type": "boolean", "title": "Policy Enforcement Enabled" } }, "type": "object", "required": [ "policy_enforcement_enabled" ], "title": "OrgPolicyEnforcementResponse", "description": "The org-wide policy enforcement master (kill) switch." }, "OrgPolicyEnforcementUpdate": { "properties": { "enabled": { "type": "boolean", "title": "Enabled" } }, "type": "object", "required": [ "enabled" ], "title": "OrgPolicyEnforcementUpdate", "description": "Flip the org-wide policy enforcement master switch.\n\n``enabled=False`` is a global kill switch: the resolver yields an empty set for\nevery assistant in the org, suspending ALL policy enforcement without deleting\nany policy. ``True`` restores per-policy enforcement." }, "OrgPolicyJudgeModelResponse": { "properties": { "model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] } }, "type": "object", "title": "OrgPolicyJudgeModelResponse", "description": "The org-level default model for ``llm_judge`` policy checks.\n\n``model_settings`` is the org's chosen ``ModelChainEntry`` (``{model, config}``), or\n``null`` when unset \u2014 in which case the runtime falls back to the code role default\n(``gpt-5.4-mini`` / effort ``low``). The UI renders that fallback label from the model\ncatalog's ``policy_judge`` role default, so this response carries ONLY the override." }, "OrgPolicyJudgeModelUpdate": { "properties": { "model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] } }, "type": "object", "title": "OrgPolicyJudgeModelUpdate", "description": "Set or clear the org-level ``llm_judge`` model default.\n\n``model_settings=null`` clears the override (back to the code role default). A non-null\nentry must reference a model in ``MODEL_REGISTRY`` (422 otherwise); since the catalog ==\nregistry, anything the UI dropdown offers passes. The ``ModelChainEntry`` shape also\nvalidates the config knobs at the boundary." }, "OrgPostSessionExtractionResponse": { "properties": { "post_session_extraction_enabled": { "type": "boolean", "title": "Post Session Extraction Enabled" } }, "type": "object", "required": [ "post_session_extraction_enabled" ], "title": "OrgPostSessionExtractionResponse", "description": "The org-level post-call extraction toggle (effective boolean, never null)." }, "OrgPostSessionExtractionUpdate": { "properties": { "post_session_extraction_enabled": { "type": "boolean", "title": "Post Session Extraction Enabled" } }, "type": "object", "required": [ "post_session_extraction_enabled" ], "title": "OrgPostSessionExtractionUpdate", "description": "Set the org-level post-call structured-extraction toggle.\n\n``True`` arms post-call extraction for every agent in the org; each agent\nstill needs its own ACTIVE extraction schema. ``False`` (the default) makes\nevery terminal session record a durable ``skipped`` extraction job." }, "OrgSettings": { "properties": { "retry": { "anyOf": [ { "$ref": "#/components/schemas/RetryConfig" }, { "type": "null" } ] }, "kb_pii": { "anyOf": [ { "$ref": "#/components/schemas/KbPiiSettings" }, { "type": "null" } ] }, "kb_role_clearance_map": { "anyOf": [ { "additionalProperties": { "type": "integer" }, "type": "object" }, { "type": "null" } ], "title": "Kb Role Clearance Map" }, "kb_role_audience_map": { "anyOf": [ { "additionalProperties": { "items": { "type": "string" }, "type": "array" }, "type": "object" }, { "type": "null" } ], "title": "Kb Role Audience Map" }, "kb_classification_mode": { "anyOf": [ { "type": "string", "enum": [ "auto", "kb_default" ] }, { "type": "null" } ], "title": "Kb Classification Mode" }, "kb_acl_oversample_factor": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Kb Acl Oversample Factor" }, "call_window": { "anyOf": [ { "$ref": "#/components/schemas/CallWindowSettings" }, { "type": "null" } ] }, "call_expiry": { "anyOf": [ { "$ref": "#/components/schemas/CallExpirySettings" }, { "type": "null" } ] }, "holiday_calendar": { "anyOf": [ { "$ref": "#/components/schemas/HolidayCalendarSettings" }, { "type": "null" } ] }, "voice_entitlements": { "anyOf": [ { "$ref": "#/components/schemas/VoiceEntitlementSettings" }, { "type": "null" } ] }, "memory": { "anyOf": [ { "$ref": "#/components/schemas/MemoryOrgSettings" }, { "type": "null" } ] }, "inline_kb_sources": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Inline Kb Sources" }, "current_time": { "anyOf": [ { "$ref": "#/components/schemas/CurrentTimeSettings" }, { "type": "null" } ] } }, "additionalProperties": true, "type": "object", "title": "OrgSettings", "description": "Typed schema for Organization.settings JSON column." }, "OrgVoiceEntitlementResponse": { "properties": { "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "max_active_calls": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Active Calls" }, "outbound_cps": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Outbound Cps" }, "queue_weight": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Queue Weight" }, "priority_class": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Priority Class" }, "priority_aging_max_wait_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Priority Aging Max Wait Seconds", "description": "Per-org scheduler aging override in seconds; null means the org inherits the fleet voice_concurrency.priority_aging_max_wait_seconds tunable." }, "inbound_reserved_calls": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Inbound Reserved Calls" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "organization_id", "updated_at" ], "title": "OrgVoiceEntitlementResponse", "description": "The org's standing entitlement, read from ``Organization.settings``.\n\n``updated_at`` is the org row's last-modified timestamp (there is no dedicated\nentitlement row anymore); the dashboard uses it as a form remount key." }, "OrgVoiceEntitlementUpdate": { "properties": { "max_active_calls": { "anyOf": [ { "type": "integer", "maximum": 10000.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Max Active Calls" }, "outbound_cps": { "anyOf": [ { "type": "number", "maximum": 10000.0, "exclusiveMinimum": 0.0 }, { "type": "null" } ], "title": "Outbound Cps" }, "queue_weight": { "anyOf": [ { "type": "number", "maximum": 1000.0, "exclusiveMinimum": 0.0 }, { "type": "null" } ], "title": "Queue Weight" }, "priority_class": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Priority Class" }, "priority_aging_max_wait_seconds": { "anyOf": [ { "type": "integer", "maximum": 86400.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Priority Aging Max Wait Seconds", "description": "Seconds the org's oldest queued outbound call must wait before aging takes over priority ordering (its oldest job replaces its highest-priority job as the scheduling candidate). Omit to leave unchanged; explicit null inherits the fleet voice_concurrency.priority_aging_max_wait_seconds tunable. Applies on the next scheduler tick (~5s), including to already-queued calls. Keep it high to preserve priority ordering longer; keep it low to drain stale low-priority jobs sooner." }, "inbound_reserved_calls": { "anyOf": [ { "type": "integer", "maximum": 10000.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Inbound Reserved Calls" } }, "additionalProperties": false, "type": "object", "title": "OrgVoiceEntitlementUpdate", "description": "PATCH body \u2014 every field optional. ``model_dump(exclude_unset=True)`` is the\ncontract: an **omitted** field is left unchanged, while an explicit ``null``\nclears the column back to \"inherit the config default\" for that dimension." }, "OrganizationResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "clerk_org_id": { "type": "string", "title": "Clerk Org Id" }, "name": { "type": "string", "title": "Name" }, "slug": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Slug" }, "settings": { "$ref": "#/components/schemas/OrgSettings" }, "is_active": { "type": "boolean", "title": "Is Active" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "clerk_org_id", "name", "slug", "settings", "is_active", "created_at", "updated_at" ], "title": "OrganizationResponse" }, "OrganizationUpdate": { "properties": { "settings": { "anyOf": [ { "$ref": "#/components/schemas/OrgSettings" }, { "type": "null" } ] } }, "additionalProperties": false, "type": "object", "title": "OrganizationUpdate" }, "OutboundControlsResponse": { "properties": { "org_paused": { "type": "boolean", "title": "Org Paused", "description": "True if the whole org is paused." }, "paused_agents": { "items": { "$ref": "#/components/schemas/PauseStateEntry" }, "type": "array", "title": "Paused Agents" }, "paused_teams": { "items": { "$ref": "#/components/schemas/PauseStateEntry" }, "type": "array", "title": "Paused Teams" } }, "type": "object", "required": [ "org_paused" ], "title": "OutboundControlsResponse", "description": "The org's full outbound pause/cancel control state." }, "OutboundRequest": { "properties": { "from_phone_number_id": { "type": "string", "format": "uuid", "title": "From Phone Number Id", "description": "Org-scoped phone number id to dial FROM. Must have an outbound_call agent attached so a SIP outbound trunk has been provisioned." }, "to_phone_number": { "type": "string", "pattern": "^\\+[1-9]\\d{6,14}$", "title": "To Phone Number", "description": "E.164 phone number to dial, e.g. +15555550123" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id", "description": "Optional: dial AS this specific agent. Must already be attached to the from-number as an outbound_call binding. Provide this XOR `team_id`; omit both to let the backend pick a bound dialer at random (load-balanced across the fleet)." }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id", "description": "Optional: dial AS this specific team (its default member answers). Must already be attached to the from-number as an outbound_call binding. Provide this XOR `agent_id`; omit both for random pick." }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id", "description": "Optional: run THIS call on a specific published revision of `agent_id` instead of the revision pinned on the number's binding (pin-at-bind). Use to canary a newly published revision on live traffic before re-binding the number. Only valid alongside `agent_id`; the revision must belong to that agent and be published \u2014 drafts stay undialerable on live numbers (use /web-call for draft testing). Omitted \u2192 the binding's pinned revision, exactly as before. The call's context_variables are validated against the SAME revision that runs." }, "context_variables": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Context Variables", "description": "Optional seed values for the bound agent's typed context variables, applied once at session bootstrap. Each key must be a variable declared on the agent or one of its bound workflows; values are coerced against the variable's type/enum. An unknown key or an uncoercible value is rejected (422). System vars are frozen on-file; derived seeds satisfy the collection gate. Only honored for single-agent bindings in v1 (ignored for team-bound dialers)." }, "idempotency_key": { "anyOf": [ { "type": "string", "pattern": "^[A-Za-z0-9_\\-]{1,120}$" }, { "type": "null" } ], "title": "Idempotency Key", "description": "Client-supplied dedup key; a retry of a still-queued call returns the same queued envelope (no second dial). Alphanumeric + dash/underscore, 1-120 chars." }, "instant": { "type": "boolean", "title": "Instant", "description": "Test/instant dispatch: bypass the calling-hours window and dispatch immediately. Rate-limited separately; concurrency limits still apply.", "default": false }, "expires_in_seconds": { "anyOf": [ { "type": "integer", "maximum": 2592000.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Expires In Seconds", "description": "Override the org's queued-call expiry for THIS call. Seconds from enqueue after which the call is expired if still waiting in the queue (never dialed). `0` disables expiry for this call even if the org has a default; omit (null) to use the org's `call_expiry` setting. Max 30 days." }, "override_pause": { "type": "boolean", "title": "Override Pause", "description": "Bypass the outbound pause gate and dispatch inline. Valid ONLY with `instant=True` (enforced by the schema validator). Requires the `communication:manage` permission \u2014 enforced in the router, not here. No effect on the queued (non-instant) path.", "default": false } }, "type": "object", "required": [ "from_phone_number_id", "to_phone_number" ], "title": "OutboundRequest" }, "OutboundResponse": { "properties": { "queued": { "type": "boolean", "title": "Queued", "default": false }, "room_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Room Name" }, "dispatch_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Dispatch Id" }, "agent_name": { "type": "string", "title": "Agent Name" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "agent_revision_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent Revision Name" }, "revision_source": { "anyOf": [ { "type": "string", "enum": [ "override", "pin", "active_fallback" ] }, { "type": "null" } ], "title": "Revision Source" } }, "type": "object", "required": [ "agent_name", "session_id" ], "title": "OutboundResponse" }, "OutcomeBreakdownRow": { "properties": { "call_status": { "type": "string", "title": "Call Status" }, "call_count": { "type": "integer", "title": "Call Count" }, "percentage": { "type": "number", "title": "Percentage" } }, "type": "object", "required": [ "call_status", "call_count", "percentage" ], "title": "OutcomeBreakdownRow" }, "OverrideEventResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "scope_id": { "type": "string", "format": "uuid", "title": "Scope Id" }, "action": { "type": "string", "title": "Action" }, "old_requested_capacity": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Old Requested Capacity" }, "new_requested_capacity": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "New Requested Capacity" }, "old_effective_capacity": { "type": "integer", "title": "Old Effective Capacity" }, "new_effective_capacity": { "type": "integer", "title": "New Effective Capacity" }, "actor": { "type": "string", "title": "Actor" }, "reason": { "type": "string", "title": "Reason" }, "source": { "type": "string", "title": "Source" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "scope_id", "action", "old_effective_capacity", "new_effective_capacity", "actor", "reason", "source", "created_at" ], "title": "OverrideEventResponse", "description": "One row in the append-only override audit trail." }, "OverrideResetRequest": { "properties": { "reason": { "type": "string", "maxLength": 2048, "minLength": 1, "title": "Reason", "description": "Non-empty justification" } }, "type": "object", "required": [ "reason" ], "title": "OverrideResetRequest", "description": "DELETE body to explicitly clear an override." }, "OverrideSetRequest": { "properties": { "capacity": { "type": "integer", "minimum": 0.0, "title": "Capacity", "description": "Requested operational safety ceiling" }, "reason": { "type": "string", "maxLength": 2048, "minLength": 1, "title": "Reason", "description": "Non-empty justification" }, "review_by": { "type": "string", "format": "date-time", "title": "Review By", "description": "Staff review deadline (\u2264 24h away)" } }, "type": "object", "required": [ "capacity", "reason", "review_by" ], "title": "OverrideSetRequest", "description": "PUT body to set or update an operational override.\n\n``capacity`` is the requested safety ceiling (admission enforces\n``min(capacity, configured_capacity)`` so a value above configured is\nharmless). ``review_by`` must be at most 24 hours away \u2014 an overdue\noverride stays restrictive and alerts; it never silently expires upward." }, "OverrideStateResponse": { "properties": { "scope_id": { "type": "string", "format": "uuid", "title": "Scope Id" }, "scope_type": { "type": "string", "title": "Scope Type" }, "scope_key": { "type": "string", "title": "Scope Key" }, "configured_capacity": { "type": "integer", "title": "Configured Capacity" }, "operational_admission_capacity": { "type": "integer", "title": "Operational Admission Capacity" }, "effective_capacity": { "type": "integer", "title": "Effective Capacity" }, "used": { "type": "integer", "title": "Used" }, "override_requested_capacity": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Override Requested Capacity" }, "override_source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Override Source" }, "override_actor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Override Actor" }, "override_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Override Reason" }, "override_set_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Override Set At" }, "override_review_by": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Override Review By" }, "overdue": { "type": "boolean", "title": "Overdue", "default": false } }, "type": "object", "required": [ "scope_id", "scope_type", "scope_key", "configured_capacity", "operational_admission_capacity", "effective_capacity", "used" ], "title": "OverrideStateResponse", "description": "The current override state for a capacity scope." }, "PIIScrubLogResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" }, "source": { "type": "string", "title": "Source" }, "entity_types_detected": { "items": { "type": "string" }, "type": "array", "title": "Entity Types Detected" }, "detection_count": { "type": "integer", "title": "Detection Count" }, "score_threshold_used": { "type": "number", "title": "Score Threshold Used" }, "scrub_config_snapshot": { "additionalProperties": true, "type": "object", "title": "Scrub Config Snapshot" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "session_id", "source", "entity_types_detected", "detection_count", "score_threshold_used", "scrub_config_snapshot", "created_at" ], "title": "PIIScrubLogResponse" }, "PauseRequest": { "properties": { "scope": { "type": "string", "enum": [ "org", "agent", "team" ], "title": "Scope", "description": "The grain to pause: the whole org, a single agent, or a team." }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id", "description": "Required when scope='agent'. Ignored otherwise." }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id", "description": "Required when scope='team'. Ignored otherwise." }, "reason": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Reason", "description": "Optional human-readable pause reason." } }, "type": "object", "required": [ "scope" ], "title": "PauseRequest" }, "PauseStateEntry": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "scope": { "type": "string", "enum": [ "org", "agent", "team" ], "title": "Scope" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "paused": { "type": "boolean", "title": "Paused" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" }, "paused_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Paused At" }, "paused_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Paused By" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "scope", "paused", "updated_at" ], "title": "PauseStateEntry" }, "Payload": { "additionalProperties": { "$ref": "#/components/schemas/JsonValue" }, "type": "object" }, "PendingApproval": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id" }, "name": { "type": "string", "title": "Name" }, "input": { "additionalProperties": true, "type": "object", "title": "Input" } }, "type": "object", "required": [ "tool_call_id", "name", "input" ], "title": "PendingApproval", "description": "A tool call paused for human approval (the turn's trailing response\ncarried an unanswered ``ToolCallPart``). Mirrors the ``requires_approval``\nSSE payload so a refreshed client can rebuild the approval prompt." }, "PendingClassificationItem": { "properties": { "document_id": { "type": "string", "format": "uuid", "title": "Document Id" }, "title": { "type": "string", "title": "Title" }, "sensitivity": { "type": "string", "title": "Sensitivity" }, "sensitivity_level": { "type": "integer", "title": "Sensitivity Level" }, "classification_status": { "type": "string", "title": "Classification Status" }, "classification_confidence": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Classification Confidence" }, "classified_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Classified At" }, "detected_sensitivity": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Detected Sensitivity" } }, "type": "object", "required": [ "document_id", "title", "sensitivity", "sensitivity_level", "classification_status" ], "title": "PendingClassificationItem", "description": "One document in the classification review queue (ENG-647).\n\nSurfaces only classification metadata \u2014 never document content \u2014 so the\nqueue can be listed at ``KB_READ``. Built explicitly: ``document_id`` maps to\n``Document.id`` and ``detected_sensitivity`` comes from the active version." }, "PersonaBehaviorConfig": { "properties": { "first_speaker": { "type": "string", "enum": [ "persona", "agent" ], "title": "First Speaker", "default": "persona" }, "cut_in": { "$ref": "#/components/schemas/PersonaCutInConfig" }, "language": { "anyOf": [ { "type": "string", "maxLength": 20 }, { "type": "null" } ], "title": "Language" }, "background_noise": { "type": "string", "enum": [ "none", "office", "cafe", "city", "keyboard_typing" ], "title": "Background Noise", "default": "none" }, "background_noise_volume": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Background Noise Volume", "default": 0.3 }, "wait_seconds": { "type": "number", "maximum": 30.0, "minimum": 0.0, "title": "Wait Seconds", "default": 0.0 }, "yield_on_overlap": { "$ref": "#/components/schemas/PersonaYieldConfig" }, "interruption_mode": { "type": "string", "enum": [ "off", "low", "medium", "high" ], "title": "Interruption Mode", "default": "off" }, "backchannel_style": { "type": "string", "enum": [ "neutral", "impatient", "polite" ], "title": "Backchannel Style", "default": "neutral" }, "backchannel_overrides": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Backchannel Overrides" }, "reaction_pause_ms_min": { "type": "integer", "maximum": 5000.0, "minimum": 0.0, "title": "Reaction Pause Ms Min", "default": 200 }, "reaction_pause_ms_max": { "type": "integer", "maximum": 5000.0, "minimum": 0.0, "title": "Reaction Pause Ms Max", "default": 500 }, "text_burst": { "$ref": "#/components/schemas/TextBurstConfig" } }, "additionalProperties": false, "type": "object", "title": "PersonaBehaviorConfig", "description": "Advanced simulation knobs attached to a persona. Stored as JSONB on\n``personas.behavior_config``; per-run overrides will reuse this shape on\n``SimulationRun`` (ENG-474)." }, "PersonaCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "is_active": { "type": "boolean", "title": "Is Active", "default": true }, "body": { "type": "string", "minLength": 1, "title": "Body" }, "traits": { "additionalProperties": true, "type": "object", "title": "Traits" }, "behavior_config": { "$ref": "#/components/schemas/PersonaBehaviorConfig" } }, "additionalProperties": false, "type": "object", "required": [ "name", "body" ], "title": "PersonaCreate", "description": "Create a persona." }, "PersonaCutInConfig": { "properties": { "min_words": { "anyOf": [ { "type": "integer", "maximum": 20.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Min Words" }, "min_duration_ms": { "anyOf": [ { "type": "integer", "maximum": 10000.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Min Duration Ms" }, "backoff_ms": { "type": "integer", "maximum": 10000.0, "minimum": 0.0, "title": "Backoff Ms", "default": 1000 } }, "additionalProperties": false, "type": "object", "title": "PersonaCutInConfig", "description": "Persona-as-interrupter \u2014 when the agent is speaking, when does the\npersona cut in? Mirrors voice ``interruption_*`` knobs on\n``VoicePipelineConfig``.\n\n``min_words`` / ``min_duration_ms`` are **overrides on the\n``interruption_mode`` preset**, not standalone thresholds. ``None`` (the\ndefault) means \"use whatever the preset says\"; an explicit value replaces\nthe preset's floor for that dimension while the preset keeps supplying the\nper-turn jitter \u2014 the persona sets the floor, the mode sets the spread.\n\nThey are nullable on purpose. Every persona write round-trips through this\nmodel and stores all defaults, so a non-null default would be\nindistinguishable from an author deliberately choosing that number, and\nevery existing persona would silently become an explicit low-threshold\ninterrupter.\n\nSetting either has no effect when ``interruption_mode == \"off\"`` \u2014 an\noverride tunes interrupting, it doesn't switch it on." }, "PersonaResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "is_active": { "type": "boolean", "title": "Is Active" }, "body": { "type": "string", "title": "Body" }, "traits": { "additionalProperties": true, "type": "object", "title": "Traits" }, "behavior_config": { "$ref": "#/components/schemas/PersonaBehaviorConfig" }, "cloned_from_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Cloned From Id" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "description", "is_active", "body", "traits", "behavior_config", "created_by", "created_at", "updated_at" ], "title": "PersonaResponse" }, "PersonaUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" }, "body": { "anyOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "title": "Body" }, "traits": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Traits" }, "behavior_config": { "anyOf": [ { "$ref": "#/components/schemas/PersonaBehaviorConfig" }, { "type": "null" } ] } }, "additionalProperties": false, "type": "object", "title": "PersonaUpdate", "description": "Partial update of a persona \u2014 only supplied fields change.\n``behavior_config``, when supplied, fully replaces the existing config\n(no deep merge).\n\nExplicit ``null`` is rejected for non-nullable columns\n(``name``, ``body``, ``is_active``, ``traits``, ``behavior_config``) \u2014\nomit the field instead. ``description`` is the only nullable column,\nso it accepts ``null`` as a clear-the-column signal. This mirrors the\nvoice-config update API and prevents client bugs (\"forgot to fill in\n``name``\") from looking like successful no-ops." }, "PersonaYieldConfig": { "properties": { "after_words": { "anyOf": [ { "type": "integer", "maximum": 20.0, "minimum": 1.0 }, { "type": "null" } ], "title": "After Words", "default": 2 }, "after_seconds": { "anyOf": [ { "type": "number", "maximum": 10.0, "minimum": 0.1 }, { "type": "null" } ], "title": "After Seconds", "default": 0.5 } }, "additionalProperties": false, "type": "object", "title": "PersonaYieldConfig", "description": "Persona-as-yielder \u2014 when the persona is speaking and the agent\nstarts talking, when does the persona stop? Whichever threshold fires\nfirst triggers the yield. ``None`` disables that dimension." }, "PhoneCapability": { "type": "string", "enum": [ "sms", "voice" ], "title": "PhoneCapability" }, "PhoneNumberCreate": { "properties": { "phone_e164": { "type": "string", "maxLength": 20, "minLength": 2, "title": "Phone E164" }, "vendor": { "$ref": "#/components/schemas/PhoneVendor" }, "vendor_mode": { "$ref": "#/components/schemas/VendorMode" }, "capabilities": { "items": { "$ref": "#/components/schemas/PhoneCapability" }, "type": "array", "title": "Capabilities" }, "vendor_metadata": { "additionalProperties": true, "type": "object", "title": "Vendor Metadata" }, "integration_connection_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Integration Connection Id", "description": "BYOT only. Pin the new Sender to a specific connected Twilio integration. Required when the org has more than one connected Twilio integration; when omitted, the service auto-discovers the org's single connected integration and 422s on ambiguity." } }, "additionalProperties": false, "type": "object", "required": [ "phone_e164", "vendor", "vendor_mode" ], "title": "PhoneNumberCreate" }, "PhoneNumberResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "phone_e164": { "type": "string", "title": "Phone E164" }, "vendor": { "$ref": "#/components/schemas/PhoneVendor" }, "vendor_mode": { "$ref": "#/components/schemas/VendorMode" }, "capabilities": { "items": { "$ref": "#/components/schemas/PhoneCapability" }, "type": "array", "title": "Capabilities" }, "vendor_metadata": { "additionalProperties": true, "type": "object", "title": "Vendor Metadata" }, "status": { "$ref": "#/components/schemas/PhoneNumberStatus" }, "retired_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Retired At" }, "retired_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Retired By" }, "restored_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Restored At" }, "restored_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Restored By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "phone_e164", "vendor", "vendor_mode", "capabilities", "vendor_metadata", "status", "created_at", "updated_at" ], "title": "PhoneNumberResponse" }, "PhoneNumberStatus": { "type": "string", "enum": [ "active", "paused", "retired" ], "title": "PhoneNumberStatus" }, "PhoneNumberUpdate": { "properties": { "status": { "anyOf": [ { "$ref": "#/components/schemas/PhoneNumberStatus" }, { "type": "null" } ] }, "capabilities": { "anyOf": [ { "items": { "$ref": "#/components/schemas/PhoneCapability" }, "type": "array" }, { "type": "null" } ], "title": "Capabilities" }, "vendor_metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Vendor Metadata" } }, "type": "object", "title": "PhoneNumberUpdate" }, "PhoneVendor": { "type": "string", "enum": [ "twilio" ], "title": "PhoneVendor" }, "PlatformConfigEventResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "namespace": { "type": "string", "title": "Namespace" }, "old_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Old Config" }, "new_config": { "additionalProperties": true, "type": "object", "title": "New Config" }, "actor": { "type": "string", "title": "Actor" }, "reason": { "type": "string", "title": "Reason" }, "source": { "type": "string", "title": "Source" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "namespace", "old_config", "new_config", "actor", "reason", "source", "created_at" ], "title": "PlatformConfigEventResponse" }, "PlatformConfigLoadMetadata": { "properties": { "source": { "type": "string", "title": "Source" }, "revision": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Revision" }, "loaded_at": { "type": "string", "format": "date-time", "title": "Loaded At" }, "degraded": { "type": "boolean", "title": "Degraded" }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Detail" } }, "type": "object", "required": [ "source", "revision", "loaded_at", "degraded" ], "title": "PlatformConfigLoadMetadata", "description": "Provenance of the values returned by one config load path." }, "PlatformConfigStateResponse": { "properties": { "namespace": { "type": "string", "title": "Namespace" }, "effective_values": { "additionalProperties": true, "type": "object", "title": "Effective Values" }, "raw_overrides": { "additionalProperties": true, "type": "object", "title": "Raw Overrides" }, "field_sources": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Field Sources" }, "revision": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Revision" }, "load_metadata": { "$ref": "#/components/schemas/PlatformConfigLoadMetadata" } }, "type": "object", "required": [ "namespace", "effective_values", "raw_overrides", "field_sources", "revision", "load_metadata" ], "title": "PlatformConfigStateResponse", "description": "Effective and source state for one namespace." }, "PlatformConfigUpdateRequest": { "properties": { "partial": { "additionalProperties": true, "type": "object", "title": "Partial" }, "unset_fields": { "items": { "type": "string" }, "type": "array", "title": "Unset Fields" }, "reason": { "type": "string", "minLength": 1, "title": "Reason" } }, "type": "object", "required": [ "reason" ], "title": "PlatformConfigUpdateRequest", "description": "Partial config merge + the operator-supplied audit reason." }, "PlatformConnectionCreate": { "properties": { "nickname": { "type": "string", "title": "Nickname", "default": "Email" } }, "additionalProperties": false, "type": "object", "title": "PlatformConnectionCreate", "description": "Body for ``POST /v1/integrations/connections/email``.\n\nA credential-less \"platform\" integration (the Nylas API key is platform-level\nand the sending mailbox is connected via the separate email OAuth flow). The\nconnection is born ``active`` \u2014 there is nothing to authenticate here; it is a\npresence marker so the ``send_email`` tool materializes and becomes attachable.\nOnly a ``nickname`` is needed." }, "PlatformToolCatalogEntry": { "properties": { "name": { "type": "string", "title": "Name" }, "title": { "type": "string", "title": "Title" }, "summary": { "type": "string", "title": "Summary" }, "description": { "type": "string", "title": "Description" }, "kind": { "type": "string", "title": "Kind" }, "effect": { "type": "string", "title": "Effect" }, "parameters": { "additionalProperties": true, "type": "object", "title": "Parameters" } }, "type": "object", "required": [ "name", "title", "summary", "description", "kind", "effect" ], "title": "PlatformToolCatalogEntry", "description": "One available platform tool, projected from the hard-coded registry for config UIs.\n\n``name`` is the enable-map key + model-facing function name; ``title``/``summary`` are the\nhuman labels the dashboard renders; ``description`` is the model-facing prompt copy; ``effect``\nis the runtime control signal the call produces (e.g. ``end_session``); ``parameters`` is the\nmodel-facing JSON Schema for the tool's args." }, "PlatformToolCatalogResponse": { "properties": { "tools": { "items": { "$ref": "#/components/schemas/PlatformToolCatalogEntry" }, "type": "array", "title": "Tools" } }, "type": "object", "title": "PlatformToolCatalogResponse", "description": "The full set of platform tools an agent can enable (org-independent, static)." }, "PlaygroundSessionResponse": { "properties": { "session_id": { "type": "string", "title": "Session Id" }, "catalog_slug": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Catalog Slug" }, "revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Revision Id" }, "graph": { "$ref": "#/components/schemas/src__workflow__playground__schemas__GraphMeta" }, "current_step_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Current Step Id" }, "completed_steps": { "items": { "type": "string" }, "type": "array", "title": "Completed Steps" }, "context_vars": { "additionalProperties": true, "type": "object", "title": "Context Vars" }, "step_count": { "type": "integer", "title": "Step Count" }, "last_signal": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Signal" }, "awaiting_approval": { "type": "boolean", "title": "Awaiting Approval", "default": false }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "session_id", "graph", "current_step_id", "completed_steps", "context_vars", "step_count", "last_signal", "created_at" ], "title": "PlaygroundSessionResponse", "description": "Session metadata returned by ``POST /sessions`` and ``GET /sessions/{id}``.\n\nExactly one of ``catalog_slug`` / ``revision_id`` is set, reflecting which source\nthe session was opened against." }, "PolicyAction": { "type": "string", "enum": [ "block", "redact", "append", "require_approval", "handoff" ], "title": "PolicyAction", "description": "What happens when a check fails.\n\n- ``block``: emit a canned safe message, raise ``PolicyViolationError``, short-circuit.\n- ``redact``: deterministic regex/truncate (NO LLM rewrite).\n- ``append``: append a disclaimer.\n- ``require_approval``: route through the HITL approval seam (``pre_tool`` only).\n- ``handoff``: hand off via ``HandoffService`` (source=\"policy\").\n\nThe v1 ``monitor`` action is gone \u2014 observe-only is the ``monitor`` *mode* now." }, "PolicyActionCapability": { "properties": { "action": { "$ref": "#/components/schemas/PolicyAction" }, "label": { "type": "string", "title": "Label" }, "degradation_note": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Degradation Note" }, "config_requirements": { "items": { "type": "string" }, "type": "array", "title": "Config Requirements" }, "warning": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Warning" }, "warning_applies_to_checks": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Warning Applies To Checks" }, "supports_judge_message": { "type": "boolean", "title": "Supports Judge Message", "default": false } }, "type": "object", "required": [ "action", "label" ], "title": "PolicyActionCapability", "description": "One action available at a point, with its surfaced effect.\n\n``label`` is the human-readable name the UI renders. ``degradation_note`` is\nplain-language and rendered verbatim \u2014 it describes WHAT the action does (the\nper-transport latency/guarantee lives in the runtime-resolution section, not here).\n``config_requirements`` lists action_config keys the validator requires at least one\nof (redact needs ``patterns`` or ``max_length``). ``warning`` flags a\ndiscouraged-but-allowed combination (llm_judge + redact); ``warning_applies_to_checks``\nnames the check kinds the warning is relevant to so the UI shows it only when that kind\nis the selected check. ``supports_judge_message`` is True where an llm_judge can author\nthe user-facing block/append copy itself (opt-in via\n``check_config['judge_authored_message']``)." }, "PolicyAttachmentResponse": { "properties": { "revision_id": { "type": "string", "format": "uuid", "title": "Revision Id" }, "policies_enabled": { "type": "boolean", "title": "Policies Enabled" }, "policy_refs": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Policy Refs" }, "inert_tool_policies": { "items": { "$ref": "#/components/schemas/InertToolPolicy" }, "type": "array", "title": "Inert Tool Policies" } }, "type": "object", "required": [ "revision_id", "policies_enabled" ], "title": "PolicyAttachmentResponse", "description": "The assistant revision's current policy attachment after a write/read." }, "PolicyAttachmentUpdate": { "properties": { "policy_refs": { "anyOf": [ { "items": { "$ref": "#/components/schemas/PolicyRefSpec" }, "type": "array" }, { "type": "null" } ], "title": "Policy Refs" }, "policies_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Policies Enabled" } }, "type": "object", "title": "PolicyAttachmentUpdate", "description": "Full-replace of an assistant revision's policy attachment.\n\n``policy_refs`` is the complete attached set (``[]`` detaches all; omit to\nleave unchanged). ``policies_enabled`` flips the per-revision master switch;\nomit to leave unchanged." }, "PolicyCapabilitiesResponse": { "properties": { "points": { "items": { "$ref": "#/components/schemas/PolicyPointCapability" }, "type": "array", "title": "Points" }, "resolutions": { "items": { "$ref": "#/components/schemas/ResolutionEntry" }, "type": "array", "title": "Resolutions" }, "check_types": { "items": { "$ref": "#/components/schemas/PolicyCheckCapability" }, "type": "array", "title": "Check Types" }, "cross_cutting": { "items": { "$ref": "#/components/schemas/PolicyCrossCuttingFact" }, "type": "array", "title": "Cross Cutting" } }, "type": "object", "required": [ "points", "resolutions", "check_types", "cross_cutting" ], "title": "PolicyCapabilitiesResponse", "description": "The full policy capability table (static, org-independent).\n\n``points`` is the channel-blind authoring cascade; ``resolutions`` is the non-authored\nruntime-resolution section (per-transport strategy + consequence) for the behavior preview;\n``check_types`` is the presentation metadata for every check kind." }, "PolicyCheckCapability": { "properties": { "check_type": { "$ref": "#/components/schemas/PolicyCheckType" }, "label": { "type": "string", "title": "Label" }, "hint": { "type": "string", "title": "Hint" } }, "type": "object", "required": [ "check_type", "label", "hint" ], "title": "PolicyCheckCapability", "description": "Human-readable presentation metadata for one check kind the cascade offers.\n\nMirrors the UI's ``CHECK_TYPE_LABELS`` (``label``) and ``CHECK_TYPE_HINTS`` (``hint``).\nWhich kinds are offered at a point is driven by ``PolicyPointCapability.checks`` \u2014 this is\njust the shared label/hint copy." }, "PolicyCheckType": { "type": "string", "enum": [ "expression", "llm_judge" ], "title": "PolicyCheckType", "description": "How a policy decides whether content/state violates it.\n\n- ``expression``: a ``PolicyExprEvaluator`` boolean over turn state.\n- ``llm_judge``: a secondary LLM (via model_router) judges against ``guardrail_text``." }, "PolicyCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "enabled": { "type": "boolean", "title": "Enabled", "default": true }, "scope": { "$ref": "#/components/schemas/PolicyScope", "default": "attachable" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "check_type": { "$ref": "#/components/schemas/PolicyCheckType" }, "check_config": { "additionalProperties": true, "type": "object", "title": "Check Config" }, "enforcement_point": { "$ref": "#/components/schemas/PolicyEnforcementPoint" }, "action": { "$ref": "#/components/schemas/PolicyAction" }, "action_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Action Config" }, "tool_target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Target" }, "mode": { "$ref": "#/components/schemas/PolicyMode", "default": "monitor" }, "on_error": { "anyOf": [ { "$ref": "#/components/schemas/PolicyOnError" }, { "type": "null" } ] }, "timeout_ms": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Timeout Ms" }, "strictness": { "$ref": "#/components/schemas/PolicyStrictness", "default": "relaxed" }, "priority": { "type": "integer", "title": "Priority", "default": 0 } }, "type": "object", "required": [ "name", "check_type", "enforcement_point", "action" ], "title": "PolicyCreate", "description": "Create a policy + its initial ``main`` revision in one call.\n\nIdentity fields (``name``/``description``/``metadata``) plus the\nfull revision config. The initial revision is created and set active." }, "PolicyCrossCuttingFact": { "properties": { "key": { "type": "string", "title": "Key" }, "note": { "type": "string", "title": "Note" } }, "type": "object", "required": [ "key", "note" ], "title": "PolicyCrossCuttingFact", "description": "A table-level invariant the UI surfaces (not tied to one point)." }, "PolicyEnforcementPoint": { "type": "string", "enum": [ "input", "pre_tool", "post_tool", "agent_response" ], "title": "PolicyEnforcementPoint", "description": "Where in a turn a policy's check fires (v2: one point per policy).\n\n``agent_response`` is the single author-facing reply point \u2014 the v1\n``response`` (per-streamed-unit) + ``post_response`` (complete reply) split is\nan internal runtime detail now, selected by the platform-derived enforcement\nstrategy (buffer-and-gate vs per-unit), not an authored distinction." }, "PolicyEvaluationResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "policy_id": { "type": "string", "format": "uuid", "title": "Policy Id" }, "policy_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Policy Name" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "conversation_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Conversation Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "enforcement_point": { "type": "string", "title": "Enforcement Point" }, "mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mode" }, "transport_class": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Transport Class" }, "channel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" }, "result": { "type": "string", "title": "Result" }, "action_taken": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Action Taken" }, "would_be_action": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Would Be Action" }, "violation_detail": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Violation Detail" }, "latency_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Latency Ms" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "policy_id", "organization_id", "enforcement_point", "result", "created_at" ], "title": "PolicyEvaluationResponse", "description": "One ``PolicyEvaluation`` audit row \u2014 what enforcement happened on a turn.\n\nThe Postgres-backed counterpart to the Tinybird policy analytics (which is\ndeploy-gated and empty locally): the engine writes one of these per policy\ncheck per enforcement point per turn, so the UI can show enforcement\ninline/post-hoc without a Tinybird deploy. ``policy_name`` is joined from the\nparent ``Policy`` for display (the audit row itself only carries ``policy_id``)." }, "PolicyEvaluationResult": { "type": "string", "enum": [ "pass", "fail", "error", "skipped" ], "title": "PolicyEvaluationResult", "description": "Outcome of one evaluation of a policy check." }, "PolicyListResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "enabled": { "type": "boolean", "title": "Enabled" }, "scope": { "type": "string", "title": "Scope" }, "active_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Active Revision Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "enabled", "scope", "created_at", "updated_at" ], "title": "PolicyListResponse" }, "PolicyMode": { "type": "string", "enum": [ "enforce", "monitor" ], "title": "PolicyMode", "description": "The author's INTENT dial \u2014 act vs observe. Channel-independent.\n\n- ``enforce``: the policy acts on a violation (block / redact / append /\n require_approval / handoff) per the platform-derived strategy.\n- ``monitor``: shadow/canary \u2014 the check runs and records ``would_be_action``\n but never affects the turn. The safe-rollout default.\n\nThe TRANSPORT property v2 conflated into ``enforcement_mode`` (buffer-and-gate\nvs best-effort) is now platform-derived from ``transport_class`` at runtime\n(:func:`src.policy.resolution.resolve_strategy`), never authored. New-policy\ndefault *selection* is ``monitor`` (shadow-first; set at the schema layer)." }, "PolicyNamesDiff": { "properties": { "added": { "items": { "type": "string" }, "type": "array", "title": "Added" }, "removed": { "items": { "type": "string" }, "type": "array", "title": "Removed" } }, "type": "object", "title": "PolicyNamesDiff", "description": "Added/removed policy names (name-resolved)." }, "PolicyOnError": { "type": "string", "enum": [ "fail_open", "fail_closed" ], "title": "PolicyOnError", "description": "What to do when a check errors/times out.\n\nAction-derived default (v2): ``block`` action \u2192 fail_closed; else fail_open." }, "PolicyPointCapability": { "properties": { "enforcement_point": { "$ref": "#/components/schemas/PolicyEnforcementPoint" }, "description": { "type": "string", "title": "Description" }, "checks": { "items": { "$ref": "#/components/schemas/PolicyPointCheckCapability" }, "type": "array", "title": "Checks" }, "actions": { "items": { "$ref": "#/components/schemas/PolicyActionCapability" }, "type": "array", "title": "Actions" }, "supports_tool_target": { "type": "boolean", "title": "Supports Tool Target", "default": false } }, "type": "object", "required": [ "enforcement_point", "description", "checks", "actions" ], "title": "PolicyPointCapability", "description": "One enforcement point \u2014 the checks + actions it offers (channel-blind, maximal menu).\n\n``supports_tool_target`` is True at pre_tool/post_tool, where a policy may be pinned to a\nsingle tool (``tool_target``); False at input/agent_response, where a tool is not in scope\nand a tool_target is rejected by the validator." }, "PolicyPointCheckCapability": { "properties": { "check_type": { "$ref": "#/components/schemas/PolicyCheckType" }, "strictness_options": { "items": { "type": "string" }, "type": "array", "title": "Strictness Options" }, "cost_note": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cost Note" } }, "type": "object", "required": [ "check_type", "strictness_options" ], "title": "PolicyPointCheckCapability", "description": "One check kind available at a point, with its per-(point, check) strictness options.\n\n``strictness_options`` are the ``PolicyStrictness`` string values an author may pick for\nthis (point, check). The UI renders the strictness control iff ``len > 1`` (so only\n``input``\u00b7llm_judge and ``agent_response``\u00b7expression); the write-validator coerces to the\nsingle value otherwise. ``cost_note`` is plain-language latency/cost guidance the UI\nsurfaces (e.g. the llm_judge round-trip cost). The kind's label/hint live once in the\ntop-level ``check_types`` metadata, not duplicated here." }, "PolicyRefSpec": { "properties": { "policy_id": { "type": "string", "format": "uuid", "title": "Policy Id" } }, "type": "object", "required": [ "policy_id" ], "title": "PolicyRefSpec", "description": "One attached-policy reference stored on ``AgentRevision.policy_refs``.\n\nThe single canonical attachment shape, shared by the assistant-revision\nattachment API (``PolicyAttachmentUpdate``) and the agents request bodies\n(``AgentRevisionCreate``/``Update``, which import this type). A ref carries ONLY\nthe ``policy_id`` \u2014 attaching a policy is what makes it run on the assistant.\nThere is no separate per-attachment run/suspend toggle: detach to stop a policy,\nor use the per-revision ``policies_enabled`` master switch (or the org-wide kill\nswitch) for coarser control. Mode is per-policy now (no per-attachment override).\nOnly ``scope=attachable`` policies are referenced here \u2014 ``scope=organization``\npolicies auto-apply and are never listed. Catalog existence + org-ownership of\nthe referenced policy is checked at write time." }, "PolicyResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "enabled": { "type": "boolean", "title": "Enabled" }, "scope": { "type": "string", "title": "Scope" }, "active_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Active Revision Id" }, "active_revision": { "anyOf": [ { "$ref": "#/components/schemas/PolicyRevisionResponse" }, { "type": "null" } ] }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "enabled", "scope", "created_at", "updated_at" ], "title": "PolicyResponse" }, "PolicyRevisionCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "based_on_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Based On Revision Id" }, "check_type": { "$ref": "#/components/schemas/PolicyCheckType" }, "check_config": { "additionalProperties": true, "type": "object", "title": "Check Config" }, "enforcement_point": { "$ref": "#/components/schemas/PolicyEnforcementPoint" }, "action": { "$ref": "#/components/schemas/PolicyAction" }, "action_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Action Config" }, "tool_target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Target" }, "mode": { "$ref": "#/components/schemas/PolicyMode", "default": "monitor" }, "on_error": { "anyOf": [ { "$ref": "#/components/schemas/PolicyOnError" }, { "type": "null" } ] }, "timeout_ms": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Timeout Ms" }, "strictness": { "$ref": "#/components/schemas/PolicyStrictness", "default": "relaxed" }, "priority": { "type": "integer", "title": "Priority", "default": 0 } }, "type": "object", "required": [ "name", "check_type", "enforcement_point", "action" ], "title": "PolicyRevisionCreate", "description": "Author a new named revision of a policy (optionally cloned from another)." }, "PolicyRevisionResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "policy_id": { "type": "string", "format": "uuid", "title": "Policy Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "check_type": { "type": "string", "title": "Check Type" }, "check_config": { "additionalProperties": true, "type": "object", "title": "Check Config" }, "enforcement_point": { "type": "string", "title": "Enforcement Point" }, "action": { "type": "string", "title": "Action" }, "action_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Action Config" }, "tool_target": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Target" }, "mode": { "type": "string", "title": "Mode" }, "on_error": { "type": "string", "title": "On Error" }, "timeout_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Timeout Ms" }, "strictness": { "type": "string", "title": "Strictness" }, "priority": { "type": "integer", "title": "Priority" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "policy_id", "name", "check_type", "enforcement_point", "action", "mode", "on_error", "strictness", "priority", "created_at", "updated_at" ], "title": "PolicyRevisionResponse" }, "PolicyScope": { "type": "string", "enum": [ "organization", "attachable" ], "title": "PolicyScope", "description": "Who the policy applies to.\n\n``organization`` policies auto-apply to every assistant in the org (NOT listed\nin an assistant's ``policy_refs``). ``attachable`` policies apply only where an\nassistant revision opts in via ``policy_refs``." }, "PolicyStrictness": { "type": "string", "enum": [ "strict", "relaxed" ], "title": "PolicyStrictness", "description": "The streaming latency/guarantee dial (renamed from the v2 ``severity``).\n\n- ``strict``: always enforce before the user sees anything. On a STREAMING\n transport this holds/buffers (or incrementally gates), accepting brief added\n latency; on a BLOCKING transport gating is free.\n- ``relaxed``: enforce without slowing the conversation \u2014 best-effort on streaming\n transports (content may stream while the check runs), but still a FULL gate on\n blocking transports (gating is free there). ``relaxed`` never means \"off\".\n\nConfigurable only at ``input``\u00b7llm_judge and ``agent_response``\u00b7expression; forced\n(and hidden in the UI) elsewhere. New-policy default is ``relaxed``." }, "PolicyToolSchemaResponse": { "properties": { "input_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Input Schema" }, "output_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Output Schema" }, "has_input": { "type": "boolean", "title": "Has Input" }, "has_output": { "type": "boolean", "title": "Has Output" }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" } }, "type": "object", "required": [ "has_input", "has_output" ], "title": "PolicyToolSchemaResponse", "description": "A tool_target's resolved input/output schema for the policy authoring surface." }, "PolicyUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "type": "object", "title": "PolicyUpdate", "description": "Patch a policy's identity fields (NOT its config \u2014 that's a new revision).\n\n``scope`` is intentionally NOT here: it is an identity-level fact set ONCE at create\n(spec \u00a72 \u2014 moved off the revision to ``Policy``, ``server_default='attachable'``, with no\nupdate path). Allowing it on PUT would advertise a mutable field the service silently drops;\norganization-vs-attachable is decided at authoring time, so it stays immutable post-create." }, "PortalLinkResponse": { "properties": { "url": { "type": "string", "title": "Url", "description": "Short-lived Svix-hosted App Portal URL." }, "expires_in_s": { "type": "integer", "title": "Expires In S", "description": "Seconds until the link/token expires." }, "read_only": { "type": "boolean", "title": "Read Only", "description": "True when the token is read-only (ViewBase); False grants manage caps." } }, "type": "object", "required": [ "url", "expires_in_s", "read_only" ], "title": "PortalLinkResponse", "description": "A short-lived Svix-hosted App Portal link.\n\n``url`` carries a scoped, expiring portal token \u2014 safe to hand to a browser.\nThe account-level Svix API key is never included." }, "PrivacyConfigResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "pii_scrubbing_enabled": { "type": "boolean", "title": "Pii Scrubbing Enabled" }, "scrub_types": { "items": { "type": "string" }, "type": "array", "title": "Scrub Types" }, "custom_deny_patterns": { "items": { "$ref": "#/components/schemas/CustomDenyPattern" }, "type": "array", "title": "Custom Deny Patterns" }, "custom_allow_patterns": { "items": { "$ref": "#/components/schemas/CustomAllowPattern" }, "type": "array", "title": "Custom Allow Patterns" }, "score_threshold": { "type": "number", "title": "Score Threshold" }, "audio_retention_policy": { "type": "string", "enum": [ "no_audio", "raw", "redacted" ], "title": "Audio Retention Policy" }, "audio_redaction_fill": { "type": "string", "enum": [ "silence", "tone_1khz" ], "title": "Audio Redaction Fill" }, "supported_languages": { "items": { "type": "string" }, "type": "array", "title": "Supported Languages" }, "default_language": { "type": "string", "title": "Default Language" }, "language_detection_enabled": { "type": "boolean", "title": "Language Detection Enabled" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "pii_scrubbing_enabled", "scrub_types", "custom_deny_patterns", "custom_allow_patterns", "score_threshold", "audio_retention_policy", "audio_redaction_fill", "supported_languages", "default_language", "language_detection_enabled", "created_at", "updated_at" ], "title": "PrivacyConfigResponse" }, "PrivacyConfigUpsert": { "properties": { "pii_scrubbing_enabled": { "type": "boolean", "title": "Pii Scrubbing Enabled", "default": true }, "scrub_types": { "items": { "type": "string" }, "type": "array", "title": "Scrub Types", "description": "PIIType enum values to scrub" }, "custom_deny_patterns": { "items": { "$ref": "#/components/schemas/CustomDenyPattern" }, "type": "array", "maxItems": 128, "title": "Custom Deny Patterns" }, "custom_allow_patterns": { "items": { "$ref": "#/components/schemas/CustomAllowPattern" }, "type": "array", "maxItems": 128, "title": "Custom Allow Patterns" }, "score_threshold": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Score Threshold", "description": "Presidio confidence threshold", "default": 0.4 }, "audio_retention_policy": { "type": "string", "enum": [ "no_audio", "raw", "redacted" ], "title": "Audio Retention Policy" }, "audio_redaction_fill": { "type": "string", "enum": [ "silence", "tone_1khz" ], "title": "Audio Redaction Fill", "default": "tone_1khz" }, "supported_languages": { "items": { "type": "string" }, "type": "array", "title": "Supported Languages", "description": "ISO-639-1 codes the org wants to scrub (subset of {en,es,fr,de,pt})", "default": [ "en" ] }, "default_language": { "type": "string", "title": "Default Language", "description": "Fallback language when detection is off or fails", "default": "en" }, "language_detection_enabled": { "type": "boolean", "title": "Language Detection Enabled", "description": "Detect language per scrub call; when false default_language is always used", "default": false } }, "type": "object", "required": [ "audio_retention_policy" ], "title": "PrivacyConfigUpsert", "description": "Body for ``PUT /privacy/config`` \u2014 a full config representation.\n\nIdempotent full replacement: ``audio_retention_policy`` is required for\nthis breaking contract; other omitted fields take their defaults rather\nthan preserving prior values (PUT semantics, not PATCH)." }, "ProjectedActionStep": { "properties": { "id": { "type": "string", "title": "Id" }, "kind": { "type": "string", "enum": [ "speak", "tool_call", "knowledge_retrieval" ], "title": "Kind" }, "text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Text" }, "tool_display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Display Name" }, "knowledge_base_names": { "items": { "type": "string" }, "type": "array", "title": "Knowledge Base Names" } }, "type": "object", "required": [ "id", "kind" ], "title": "ProjectedActionStep", "description": "Sanitized action step \u2014 kind, speak text, tool name, KB names.\n\ninput_mapping and output_bindings are stripped." }, "ProjectedContextVar": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "title": "Type" }, "source": { "type": "string", "title": "Source" }, "enum_values": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Enum Values" }, "reask_cap": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Reask Cap" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": [ "name", "type", "source" ], "title": "ProjectedContextVar", "description": "Author-facing context variable definition \u2014 all fields shown per \u00a75." }, "ProjectedEdge": { "properties": { "from_node": { "type": "string", "title": "From Node" }, "to_node": { "type": "string", "title": "To Node" }, "condition_readable": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Condition Readable" }, "is_failure_path": { "type": "boolean", "title": "Is Failure Path", "default": false } }, "type": "object", "required": [ "from_node", "to_node" ], "title": "ProjectedEdge", "description": "Author-facing edge \u2014 from/to node IDs + human-readable condition + failure label.\n\npriority raw int is stripped; order is preserved by list position in GraphDiff." }, "ProjectedKnowledgeBase": { "properties": { "kb_id": { "type": "string", "title": "Kb Id" }, "display_name": { "type": "string", "title": "Display Name" }, "clearance_level": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Clearance Level" } }, "type": "object", "required": [ "kb_id", "display_name" ], "title": "ProjectedKnowledgeBase", "description": "Sanitized KB reference \u2014 name + clearance level only." }, "ProjectedNode": { "properties": { "id": { "type": "string", "title": "Id" }, "kind": { "type": "string", "enum": [ "agent", "action", "handoff", "approval", "component" ], "title": "Kind" }, "is_entry": { "type": "boolean", "title": "Is Entry", "default": false }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions" }, "required_writes": { "items": { "type": "string" }, "type": "array", "title": "Required Writes" }, "writes": { "items": { "type": "string" }, "type": "array", "title": "Writes" }, "done_when_readable": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Done When Readable" }, "tools": { "items": { "$ref": "#/components/schemas/ProjectedTool" }, "type": "array", "title": "Tools" }, "knowledge_bases": { "items": { "$ref": "#/components/schemas/ProjectedKnowledgeBase" }, "type": "array", "title": "Knowledge Bases" }, "allow_jump_back": { "type": "boolean", "title": "Allow Jump Back", "default": false }, "jump_back_target": { "type": "boolean", "title": "Jump Back Target", "default": false }, "jump_back_when": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Jump Back When" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "failure_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Failure Message" }, "steps": { "items": { "$ref": "#/components/schemas/ProjectedActionStep" }, "type": "array", "title": "Steps" }, "result_write_names": { "items": { "type": "string" }, "type": "array", "title": "Result Write Names" }, "static_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Static Text" }, "voice_config": { "anyOf": [ { "$ref": "#/components/schemas/ProjectedVoiceHandoff" }, { "type": "null" } ] }, "on_failure": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Failure" }, "condition_readable": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Condition Readable" }, "approver_role": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Approver Role" }, "suspend_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Suspend Message" }, "timeout_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Timeout Seconds" }, "on_approve": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Approve" }, "on_deny": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "On Deny" }, "component_workflow_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Component Workflow Id" }, "pinned_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Pinned Revision Id" }, "input_bindings": { "items": { "additionalProperties": { "type": "string" }, "type": "object" }, "type": "array", "title": "Input Bindings" } }, "type": "object", "required": [ "id", "kind" ], "title": "ProjectedNode", "description": "Author-facing node shape \u2014 semantics only, IR wiring stripped.\n\nFields shown per the \u00a75 strip-list:\n- agent: id, kind, instructions, required_writes, writes, done_when_readable,\n tools (resolved names + produced var names), knowledge_bases,\n allow_jump_back, jump_back_target, jump_back_when\n- action: id, kind, description, failure_message, steps (sanitized),\n result_write_names (only the VAR NAMES, not dot-path templates)\n- handoff: id, kind, static_text, channels.voice (sanitized), on_failure\n- approval: id, kind, condition_readable, approver_role, suspend_message,\n timeout_seconds, on_approve, on_deny\n\nis_entry: true for the graph entry node (entry_node_id projected here, not as a\nraw field on the graph object)." }, "ProjectedTool": { "properties": { "canonical_key": { "type": "string", "title": "Canonical Key" }, "display_name": { "type": "string", "title": "Display Name" }, "produces_variables": { "items": { "type": "string" }, "type": "array", "title": "Produces Variables" } }, "type": "object", "required": [ "canonical_key", "display_name" ], "title": "ProjectedTool", "description": "Sanitized tool reference \u2014 name + produced variable names, no dot-paths." }, "ProjectedVoiceHandoff": { "properties": { "targets": { "items": { "$ref": "#/components/schemas/ProjectedVoiceTarget" }, "type": "array", "title": "Targets" }, "connecting_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Connecting Text" }, "mode": { "type": "string", "title": "Mode", "default": "cold" }, "max_retries": { "type": "integer", "title": "Max Retries", "default": 1 }, "retry_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Retry Text" } }, "type": "object", "title": "ProjectedVoiceHandoff", "description": "Voice channel config \u2014 targets + text, no internal destination fields." }, "ProjectedVoiceTarget": { "properties": { "label": { "type": "string", "title": "Label" }, "when_to_use": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "When To Use" } }, "type": "object", "required": [ "label" ], "title": "ProjectedVoiceTarget", "description": "One voice transfer destination shown to the author." }, "PromoteRequest": { "properties": { "version_id": { "type": "string", "format": "uuid", "title": "Version Id" } }, "type": "object", "required": [ "version_id" ], "title": "PromoteRequest" }, "QueryParamConfig": { "properties": { "key": { "type": "string", "title": "Key" }, "value": { "type": "string", "title": "Value" }, "secure": { "type": "boolean", "title": "Secure", "description": "When true, value is stored encrypted in the database", "default": false } }, "type": "object", "required": [ "key", "value" ], "title": "QueryParamConfig", "description": "URL query parameter with optional encryption for sensitive values." }, "QueuedCall": { "properties": { "conversation_id": { "type": "string", "format": "uuid", "title": "Conversation Id", "description": "The queued call's conversation id." }, "to_number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "To Number", "description": "Destination phone number (E.164)." }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id", "description": "Bound agent id (set for an agent-bound dial)." }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id", "description": "Bound team id (set for a team-bound dial)." }, "paused": { "type": "boolean", "title": "Paused", "description": "True if this call is individually paused (held out of dispatch)." }, "created_at": { "type": "string", "format": "date-time", "title": "Created At", "description": "When the call was enqueued." }, "eligible_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Eligible At", "description": "Earliest time the call may dispatch (calling-window gate)." }, "queue_expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Queue Expires At", "description": "Opt-in absolute deadline; the call is expired if undialed by then." } }, "type": "object", "required": [ "conversation_id", "paused", "created_at" ], "title": "QueuedCall", "description": "One queued (``PENDING_DISPATCH``) outbound dial awaiting the scheduler." }, "QueuedCallActionResponse": { "properties": { "conversation_id": { "type": "string", "format": "uuid", "title": "Conversation Id" }, "action": { "type": "string", "enum": [ "cancelled", "paused", "resumed" ], "title": "Action" }, "paused": { "type": "boolean", "title": "Paused", "description": "The call's paused state after the action (False after cancel/resume)." } }, "type": "object", "required": [ "conversation_id", "action", "paused" ], "title": "QueuedCallActionResponse", "description": "Result of a per-call cancel / pause / resume action." }, "RagTraceAnswerability": { "properties": { "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "reason_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason Code" }, "raw_top_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Raw Top Score" }, "score_basis": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Score Basis" }, "mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mode" }, "action": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Action" }, "threshold_low": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Threshold Low" }, "threshold_high": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Threshold High" } }, "type": "object", "title": "RagTraceAnswerability", "description": "Answerability verdict subset persisted on a RAG trace (ENG-671/672).\n\nPresent only when the gate ran (mode shadow/enforce); legacy / off-mode\ntraces leave :attr:`RagTraceEntry.answerability` ``None``. Every field is\noptional so a partial or older JSONB payload coerces rather than raising.\n``raw_top_score`` is the pre-normalization top score the retro retrieval-\nfailure detector prefers over the display ``top_score``." }, "RagTraceEntry": { "properties": { "rag_query_id": { "type": "string", "format": "uuid", "title": "Rag Query Id" }, "assistant_turn_id": { "type": "string", "format": "uuid", "title": "Assistant Turn Id" }, "query_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Query Hash" }, "kb_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Kb Ids" }, "retrieved": { "items": { "$ref": "#/components/schemas/RetrievedChunk" }, "type": "array", "title": "Retrieved" }, "top_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Top Score" }, "hit": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Hit" }, "latency_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Latency Ms" }, "answerability": { "anyOf": [ { "$ref": "#/components/schemas/RagTraceAnswerability" }, { "type": "null" } ] } }, "type": "object", "required": [ "rag_query_id", "assistant_turn_id" ], "title": "RagTraceEntry", "description": "One retrieval that fed a specific assistant turn." }, "ReadyResponse": { "properties": { "status": { "type": "string", "title": "Status", "default": "ok" }, "neo4j": { "type": "string", "title": "Neo4J", "default": "connected" }, "pg": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pg" }, "redis": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Redis" }, "voice": { "type": "string", "title": "Voice", "default": "ready" }, "voice_checks": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Voice Checks" } }, "type": "object", "title": "ReadyResponse", "description": "200 body for ``/ready`` while serving traffic.\n\n``status`` is ``\"ok\"`` when every probe passes, ``\"degraded\"`` when any\nplatform dependency probe (``pg``/``redis``) or voice-subsystem check is\nnon-ready \u2014 a degraded pod STILL serves traffic (nothing except SIGTERM\ndrain gates readiness). ``pg``/``redis``/``voice_checks`` carry the\ndetail; the ``voice_readiness_check_ok`` gauge carries the alertable\nvoice signal. Probe fields are null in test mode, where probes skip." }, "RecallTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "total": { "type": "integer", "title": "Total" }, "hits": { "type": "integer", "title": "Hits" }, "empties": { "type": "integer", "title": "Empties" }, "cache_hits": { "type": "integer", "title": "Cache Hits" }, "errors": { "type": "integer", "title": "Errors" }, "hit_rate_pct": { "type": "number", "title": "Hit Rate Pct" }, "cache_hit_rate_pct": { "type": "number", "title": "Cache Hit Rate Pct" }, "avg_context_length": { "type": "number", "title": "Avg Context Length" }, "p50_ms": { "type": "number", "title": "P50 Ms" }, "p90_ms": { "type": "number", "title": "P90 Ms" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "p99_ms": { "type": "number", "title": "P99 Ms" } }, "type": "object", "required": [ "time_bucket", "total", "hits", "empties", "cache_hits", "errors", "hit_rate_pct", "cache_hit_rate_pct", "avg_context_length", "p50_ms", "p90_ms", "p95_ms", "p99_ms" ], "title": "RecallTimeseriesRow" }, "ReclassifyResponse": { "properties": { "knowledge_base_id": { "type": "string", "format": "uuid", "title": "Knowledge Base Id" }, "status": { "type": "string", "const": "accepted", "title": "Status", "default": "accepted" } }, "type": "object", "required": [ "knowledge_base_id" ], "title": "ReclassifyResponse", "description": "202 handle for an enqueued bulk reclassify (ENG-647).\n\nThe job runs off-request (Celery): it re-classifies every active document in\nthe KB, honoring manual overrides, and writes an audit row per changed doc." }, "RecordingPlaybackResponse": { "properties": { "url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Url" }, "expires_in": { "type": "integer", "title": "Expires In" }, "duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Ms" }, "bytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Bytes" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "expires_in", "duration_ms", "bytes", "status" ], "title": "RecordingPlaybackResponse" }, "RecordingRef": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "kind": { "type": "string", "title": "Kind" }, "status": { "type": "string", "title": "Status" }, "duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Ms" }, "manifest_key": { "type": "string", "title": "Manifest Key" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "finalized_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Finalized At" } }, "type": "object", "required": [ "id", "kind", "status", "duration_ms", "manifest_key", "started_at", "finalized_at" ], "title": "RecordingRef", "description": "Metadata-only projection of a voice ``Recording`` (no presigned URL/bytes)." }, "RejectReviewRequestBody": { "properties": { "resolution_note": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resolution Note" } }, "type": "object", "title": "RejectReviewRequestBody" }, "ReleaseGateMode": { "type": "string", "enum": [ "off", "advisory" ], "title": "ReleaseGateMode", "description": "Per-agent release-gate mode (ENG-727). ``off`` = no release checks;\n``advisory`` = compute + display a verdict but never block activation.\nThe gate always runs and surfaces a verdict; it never refuses activation." }, "ReleaseGateSettingsUpdate": { "properties": { "release_suite_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Release Suite Id" }, "release_gate_mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Release Gate Mode" }, "release_gate_max_failures": { "anyOf": [ { "type": "integer", "maximum": 1000.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Release Gate Max Failures" } }, "additionalProperties": false, "type": "object", "title": "ReleaseGateSettingsUpdate", "description": "PATCH /assistants/{id}/operational-settings/release-gate (\u00a73.2)." }, "ReleaseRequest": { "properties": { "reason": { "type": "string", "maxLength": 2000, "minLength": 1, "title": "Reason" } }, "type": "object", "required": [ "reason" ], "title": "ReleaseRequest", "description": "Release a quarantined version as a reviewed false-positive (ENG-654)." }, "ReleaseResponse": { "properties": { "status": { "type": "string", "title": "Status" }, "document_id": { "type": "string", "format": "uuid", "title": "Document Id" }, "released_version_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Released Version Id" }, "new_job_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "New Job Id" } }, "type": "object", "required": [ "status", "document_id" ], "title": "ReleaseResponse" }, "ReleaseVerdict": { "properties": { "schema_version": { "type": "integer", "title": "Schema Version", "default": 2 }, "status": { "type": "string", "title": "Status" }, "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "suite_id": { "type": "string", "format": "uuid", "title": "Suite Id" }, "suite_run_id": { "type": "string", "format": "uuid", "title": "Suite Run Id" }, "max_failures": { "type": "integer", "title": "Max Failures", "default": 0 }, "summary": { "$ref": "#/components/schemas/ReleaseVerdictSummary" }, "scenarios": { "items": { "$ref": "#/components/schemas/ReleaseVerdictScenario" }, "type": "array", "title": "Scenarios" } }, "type": "object", "required": [ "status", "agent_id", "suite_id", "suite_run_id", "summary" ], "title": "ReleaseVerdict" }, "ReleaseVerdictEvaluator": { "properties": { "evaluator_id": { "type": "string", "format": "uuid", "title": "Evaluator Id" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "is_critical": { "type": "boolean", "title": "Is Critical", "default": false }, "severity": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Severity" }, "status": { "type": "string", "title": "Status" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Score" }, "threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Threshold" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" } }, "type": "object", "required": [ "evaluator_id", "status" ], "title": "ReleaseVerdictEvaluator" }, "ReleaseVerdictScenario": { "properties": { "simulation_run_id": { "type": "string", "format": "uuid", "title": "Simulation Run Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "scenario_id": { "type": "string", "format": "uuid", "title": "Scenario Id" }, "persona_id": { "type": "string", "format": "uuid", "title": "Persona Id" }, "suite_item_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Suite Item Id" }, "suite_attempt": { "type": "integer", "title": "Suite Attempt", "default": 1 }, "sut_snapshot_sha256": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sut Snapshot Sha256" }, "status": { "type": "string", "title": "Status" }, "session_eval_status": { "type": "string", "title": "Session Eval Status" }, "simulation_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Simulation Status" }, "simulation_stop_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Simulation Stop Reason" }, "failure_source": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Failure Source" }, "critical_total": { "type": "integer", "title": "Critical Total", "default": 0 }, "critical_succeeded": { "type": "integer", "title": "Critical Succeeded", "default": 0 }, "critical_failed": { "type": "integer", "title": "Critical Failed", "default": 0 }, "critical_pending": { "type": "integer", "title": "Critical Pending", "default": 0 }, "evaluators": { "items": { "$ref": "#/components/schemas/ReleaseVerdictEvaluator" }, "type": "array", "title": "Evaluators" } }, "type": "object", "required": [ "simulation_run_id", "session_id", "scenario_id", "persona_id", "status", "session_eval_status" ], "title": "ReleaseVerdictScenario" }, "ReleaseVerdictSummary": { "properties": { "total_scenarios": { "type": "integer", "title": "Total Scenarios", "default": 0 }, "passed_scenarios": { "type": "integer", "title": "Passed Scenarios", "default": 0 }, "failed_scenarios": { "type": "integer", "title": "Failed Scenarios", "default": 0 }, "lifecycle_failed_scenarios": { "type": "integer", "title": "Lifecycle Failed Scenarios", "default": 0 }, "pending_scenarios": { "type": "integer", "title": "Pending Scenarios", "default": 0 }, "critical_failures": { "type": "integer", "title": "Critical Failures", "default": 0 } }, "type": "object", "title": "ReleaseVerdictSummary" }, "ReliabilityRankingRow": { "properties": { "tool_id": { "type": "string", "title": "Tool Id" }, "tool_name": { "type": "string", "title": "Tool Name" }, "tool_type": { "type": "string", "title": "Tool Type" }, "invocation_count": { "type": "integer", "title": "Invocation Count" }, "error_count": { "type": "integer", "title": "Error Count" }, "success_rate_pct": { "type": "number", "title": "Success Rate Pct" }, "dominant_error_category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Dominant Error Category" } }, "type": "object", "required": [ "tool_id", "tool_name", "tool_type", "invocation_count", "error_count", "success_rate_pct" ], "title": "ReliabilityRankingRow" }, "RemoveContextVariableOp": { "properties": { "op": { "type": "string", "const": "remove_context_variable", "title": "Op" }, "name": { "type": "string", "title": "Name" } }, "type": "object", "required": [ "op", "name" ], "title": "RemoveContextVariableOp" }, "RemoveEdgeOp": { "properties": { "op": { "type": "string", "const": "remove_edge", "title": "Op" }, "from": { "type": "string", "title": "From" }, "to": { "type": "string", "title": "To" }, "index": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Index" } }, "type": "object", "required": [ "op", "from", "to" ], "title": "RemoveEdgeOp" }, "RemoveNodeOp": { "properties": { "op": { "type": "string", "const": "remove_node", "title": "Op" }, "id": { "type": "string", "title": "Id" } }, "type": "object", "required": [ "op", "id" ], "title": "RemoveNodeOp" }, "ReopenEntry": { "properties": { "timestamp": { "type": "string", "format": "date-time", "title": "Timestamp" }, "reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reason" } }, "type": "object", "required": [ "timestamp" ], "title": "ReopenEntry", "description": "Ticket reopen event. Nullable in v1 (no capture surface)." }, "ReprovisionResultView": { "properties": { "phone_e164": { "type": "string", "title": "Phone E164" }, "configured": { "type": "boolean", "title": "Configured" }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Detail" } }, "type": "object", "required": [ "phone_e164", "configured" ], "title": "ReprovisionResultView", "description": "Per-number outcome of re-applying the webhook URL (reprovision endpoint)." }, "ResolutionEntry": { "properties": { "enforcement_point": { "$ref": "#/components/schemas/PolicyEnforcementPoint" }, "transport_class": { "type": "string", "title": "Transport Class" }, "strictness": { "type": "string", "title": "Strictness" }, "check_type": { "$ref": "#/components/schemas/PolicyCheckType" }, "strategy": { "type": "string", "title": "Strategy" }, "consequence": { "type": "string", "title": "Consequence" } }, "type": "object", "required": [ "enforcement_point", "transport_class", "strictness", "check_type", "strategy", "consequence" ], "title": "ResolutionEntry", "description": "One row of the runtime-resolution section \u2014 the platform-derived strategy + consequence.\n\nNOT authored: a (point, transport_class, strictness, check_type) resolves to a ``strategy``\nwith a plain-language ``consequence``. The UI's behavior-by-transport preview reads these;\na drift-guard test pins them to :func:`src.policy.resolution.resolve_strategy`." }, "ResolutionTimeRow": { "properties": { "channel": { "type": "string", "title": "Channel" }, "priority": { "type": "string", "title": "Priority" }, "resolved_sessions": { "type": "integer", "title": "Resolved Sessions" }, "avg_resolution_seconds": { "type": "number", "title": "Avg Resolution Seconds" }, "p50_seconds": { "type": "number", "title": "P50 Seconds" }, "p90_seconds": { "type": "number", "title": "P90 Seconds" }, "p95_seconds": { "type": "number", "title": "P95 Seconds" }, "p99_seconds": { "type": "number", "title": "P99 Seconds" } }, "type": "object", "required": [ "channel", "priority", "resolved_sessions", "avg_resolution_seconds", "p50_seconds", "p90_seconds", "p95_seconds", "p99_seconds" ], "title": "ResolutionTimeRow" }, "ResolveIdentityRequest": { "properties": { "channel": { "type": "string", "title": "Channel" }, "external_id": { "type": "string", "title": "External Id" }, "org_external_end_user_id": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Org External End User Id" } }, "type": "object", "required": [ "channel", "external_id" ], "title": "ResolveIdentityRequest" }, "ResolveIdentityResponse": { "properties": { "end_user_id": { "type": "string", "title": "End User Id" }, "org_id": { "type": "string", "title": "Org Id" }, "is_new": { "type": "boolean", "title": "Is New" }, "context_level": { "type": "string", "title": "Context Level" }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "primary_email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Primary Email" }, "primary_phone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Primary Phone" }, "org_external_end_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Org External End User Id" }, "external_id_ignored": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Id Ignored" } }, "type": "object", "required": [ "end_user_id", "org_id", "is_new", "context_level" ], "title": "ResolveIdentityResponse" }, "ResponseFieldMapping": { "properties": { "path": { "type": "string", "title": "Path", "description": "Dot-path into the response (e.g. 'data.order.id')" }, "alias": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Alias", "description": "Output key name; defaults to the full dot-path" } }, "type": "object", "required": [ "path" ], "title": "ResponseFieldMapping", "description": "One field selected from a provider response." }, "ResponseFieldSelector": { "properties": { "field_mappings": { "items": { "$ref": "#/components/schemas/ResponseFieldMapping" }, "type": "array", "title": "Field Mappings" } }, "type": "object", "title": "ResponseFieldSelector", "description": "The projection applied to a tool response." }, "ResumeApprovalRequest": { "properties": { "decision": { "type": "string", "enum": [ "approve", "deny" ], "title": "Decision" }, "note": { "anyOf": [ { "type": "string", "maxLength": 50000 }, { "type": "null" } ], "title": "Note" } }, "type": "object", "required": [ "decision" ], "title": "ResumeApprovalRequest", "description": "Approve or deny the approval the session is suspended on (in-memory, no resume_token)." }, "RetentionPolicyCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "turn_retention_days": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Turn Retention Days" }, "session_retention_days": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Session Retention Days" }, "archive_strategy": { "type": "string", "enum": [ "soft_delete", "hard_delete" ], "title": "Archive Strategy", "default": "soft_delete" }, "is_default": { "type": "boolean", "title": "Is Default", "default": false } }, "type": "object", "required": [ "name" ], "title": "RetentionPolicyCreate" }, "RetentionPolicyUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "turn_retention_days": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Turn Retention Days" }, "session_retention_days": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Session Retention Days" }, "archive_strategy": { "anyOf": [ { "type": "string", "enum": [ "soft_delete", "hard_delete" ] }, { "type": "null" } ], "title": "Archive Strategy" }, "is_default": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Default" } }, "type": "object", "title": "RetentionPolicyUpdate" }, "RetentionPolicyUpdateRequest": { "properties": { "retention_days": { "anyOf": [ { "type": "integer", "minimum": 90.0 }, { "type": "null" } ], "title": "Retention Days" }, "legal_hold_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Legal Hold Enabled" }, "legal_hold_reason": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Legal Hold Reason" }, "archive_before_delete": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Archive Before Delete" }, "archive_destination": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Archive Destination" } }, "additionalProperties": false, "type": "object", "title": "RetentionPolicyUpdateRequest", "description": "PUT body for the retention policy. ``retention_days`` floor is enforced\nboth here (422 at the edge) and in the service (defense in depth)." }, "RetrievalAuditDetailResponse": { "properties": { "log": { "$ref": "#/components/schemas/RetrievalAuditLogDetail" }, "scopes": { "items": { "$ref": "#/components/schemas/RetrievalAuditScopeView" }, "type": "array", "title": "Scopes" }, "refs": { "items": { "$ref": "#/components/schemas/RetrievalAuditRefView" }, "type": "array", "title": "Refs" } }, "type": "object", "required": [ "log", "scopes", "refs" ], "title": "RetrievalAuditDetailResponse", "description": "A retrieval log plus its scopes (incl. misses/blocks) and chunk refs." }, "RetrievalAuditLogDetail": { "properties": { "ref": { "type": "string", "title": "Ref", "default": "" }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "retrieval_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Retrieval Status" }, "serving_decision": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Serving Decision" }, "audit_write_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Audit Write Status" }, "requested_kb_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Requested Kb Count" }, "result_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Result Count" }, "response_ref_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Response Ref Count" }, "eligible_version_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Eligible Version Count" }, "duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Ms" }, "actor_user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Actor User Id" }, "session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "rag_query_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Rag Query Id" }, "query_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Query Hash" }, "query_hash_key_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Query Hash Key Version" }, "query_length_bucket": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Query Length Bucket" }, "request_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Request Id" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" }, "caller": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Caller" }, "initiator_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Initiator Type" }, "principal_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Principal Type" }, "permission": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Permission" }, "permission_decision": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Permission Decision" }, "query_hash_scope": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Query Hash Scope" }, "query_length": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Query Length" }, "eligible_version_digest": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Eligible Version Digest" }, "ineligible_counts_by_reason": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Ineligible Counts By Reason" }, "policy_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Policy Version" }, "eligibility_rule_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Eligibility Rule Version" }, "scan_policy_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scan Policy Version" }, "scan_policy_decision": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scan Policy Decision" }, "retrieval_config_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Retrieval Config Version" }, "embedding_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Embedding Model" }, "reranker_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reranker Model" }, "top_k": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Top K" }, "effective_limit": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Effective Limit" }, "ranking_mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Ranking Mode" }, "alpha": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Alpha" }, "reranked": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Reranked" }, "error_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Code" }, "error_category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Category" }, "intent_recorded_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Intent Recorded At" }, "finalized_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Finalized At" } }, "type": "object", "required": [ "id", "created_at" ], "title": "RetrievalAuditLogDetail", "description": "Detail view \u2014 adds policy/config/error context (still hashes/ids only)." }, "RetrievalAuditLogSummary": { "properties": { "ref": { "type": "string", "title": "Ref", "default": "" }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "retrieval_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Retrieval Status" }, "serving_decision": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Serving Decision" }, "audit_write_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Audit Write Status" }, "requested_kb_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Requested Kb Count" }, "result_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Result Count" }, "response_ref_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Response Ref Count" }, "eligible_version_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Eligible Version Count" }, "duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Ms" }, "actor_user_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Actor User Id" }, "session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "rag_query_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Rag Query Id" }, "query_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Query Hash" }, "query_hash_key_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Query Hash Key Version" }, "query_length_bucket": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Query Length Bucket" }, "request_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Request Id" }, "trace_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trace Id" } }, "type": "object", "required": [ "id", "created_at" ], "title": "RetrievalAuditLogSummary", "description": "List-row view of one retrieval attempt." }, "RetrievalAuditRefView": { "properties": { "knowledge_base_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Knowledge Base Id" }, "document_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Document Id" }, "document_version_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Document Version Id" }, "chunk_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Chunk Id" }, "chunk_index": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Chunk Index" }, "chunk_stable_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Chunk Stable Id" }, "chunk_content_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Chunk Content Hash" }, "chunk_content_hash_key_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Chunk Content Hash Key Version" }, "document_version_content_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Document Version Content Hash" }, "citation_ref": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Citation Ref" }, "source_uri_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Uri Hash" }, "rank": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Rank" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Score" } }, "type": "object", "title": "RetrievalAuditRefView", "description": "One returned chunk reference \u2014 hashes/ids/rank/score only." }, "RetrievalAuditScopeView": { "properties": { "knowledge_base_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Knowledge Base Id" }, "requested": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Requested" }, "eligible_version_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Eligible Version Count" }, "result_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Result Count" }, "serving_decision": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Serving Decision" }, "scan_policy_decision": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scan Policy Decision" }, "effective_serving_status_counts": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Effective Serving Status Counts" } }, "type": "object", "title": "RetrievalAuditScopeView", "description": "One requested-KB scope of a retrieval (present even for misses/blocks)." }, "RetrievedChunk": { "properties": { "chunk_id": { "type": "string", "title": "Chunk Id" }, "doc_id": { "type": "string", "title": "Doc Id" }, "version_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Version Id" }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Score" } }, "type": "object", "required": [ "chunk_id", "doc_id" ], "title": "RetrievedChunk", "description": "One chunk returned by a retrieval call." }, "RetryAnalysisRow": { "properties": { "retry_count": { "type": "integer", "title": "Retry Count" }, "invocations": { "type": "integer", "title": "Invocations" }, "share": { "type": "number", "title": "Share" }, "avg_retry_count": { "type": "number", "title": "Avg Retry Count" }, "avg_latency_ms": { "type": "number", "title": "Avg Latency Ms" }, "p95_latency_ms": { "type": "number", "title": "P95 Latency Ms" } }, "type": "object", "required": [ "retry_count", "invocations", "share", "avg_retry_count", "avg_latency_ms", "p95_latency_ms" ], "title": "RetryAnalysisRow" }, "RetryConfig": { "properties": { "max_retries": { "type": "integer", "maximum": 5.0, "minimum": 0.0, "title": "Max Retries", "default": 0 }, "base_delay_seconds": { "type": "number", "maximum": 30.0, "minimum": 0.1, "title": "Base Delay Seconds", "default": 1.0 }, "max_delay_seconds": { "type": "number", "maximum": 120.0, "minimum": 1.0, "title": "Max Delay Seconds", "default": 30.0 }, "jitter": { "type": "boolean", "title": "Jitter", "default": true } }, "type": "object", "title": "RetryConfig", "description": "Retry configuration \u2014 same schema at org, tool, and integration-instance level." }, "ReviewRequestResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "org_id": { "type": "string", "title": "Org Id" }, "request_type": { "type": "string", "enum": [ "merge", "update" ], "title": "Request Type" }, "status": { "type": "string", "title": "Status" }, "left_end_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Left End User Id" }, "right_end_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Right End User Id" }, "suggested_survivor_end_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Suggested Survivor End User Id" }, "target_end_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target End User Id" }, "proposed_identifier_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Proposed Identifier Type" }, "proposed_masked_value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Proposed Masked Value" }, "reason": { "type": "string", "title": "Reason" }, "trigger_identifier_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trigger Identifier Type" }, "trigger_masked_value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trigger Masked Value" }, "evidence": { "additionalProperties": true, "type": "object", "title": "Evidence", "default": {} }, "created_at": { "type": "string", "title": "Created At" }, "updated_at": { "type": "string", "title": "Updated At" }, "resolved_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resolved At" }, "resolution_note": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Resolution Note" } }, "type": "object", "required": [ "id", "org_id", "request_type", "status", "reason", "created_at", "updated_at" ], "title": "ReviewRequestResponse", "description": "Polymorphic identity review request.\n\n``request_type`` is ``\"merge\"`` or ``\"update\"``. Fields relevant to each\ntype are populated accordingly (left/right for merge, target/proposed_*\nfor update)." }, "RevisionConfigUpdate": { "properties": { "base_version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Base Version" }, "persona": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Persona" }, "system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Prompt" }, "system_context_variables": { "anyOf": [ { "items": { "$ref": "#/components/schemas/SystemContextVariableSpec" }, "type": "array" }, { "type": "null" } ], "title": "System Context Variables" }, "context_variables": { "anyOf": [ { "items": { "$ref": "#/components/schemas/LegacySystemContextVariableSpec" }, "type": "array" }, { "type": "null" } ], "title": "Context Variables", "description": "Deprecated alias for system_context_variables.", "deprecated": true }, "variable_defaults": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Variable Defaults" }, "channel_specific_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Channel Specific Config" }, "router_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Router Config Id" }, "model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "analyzer_model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ], "description": "Assistant-revision override for the bound workflow analyzer; stored but inactive while the assistant has no effective workflow." }, "workflow_enabled": { "type": "boolean", "title": "Workflow Enabled", "description": "Run the stored workflow for this revision. Omitted leaves it unchanged; explicit null is invalid.", "default": false }, "memory_enabled": { "type": "boolean", "title": "Memory Enabled", "description": "Enable semantic memory recall and ingestion for this revision.", "default": true }, "current_time": { "anyOf": [ { "$ref": "#/components/schemas/CurrentTimeSettings" }, { "type": "null" } ] }, "kb_clearance_level": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Kb Clearance Level" }, "kb_audience_tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Kb Audience Tags" }, "tool_refs": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ToolRef" }, "type": "array" }, { "type": "null" } ], "title": "Tool Refs" }, "knowledge_base_refs": { "anyOf": [ { "items": { "$ref": "#/components/schemas/KnowledgeBaseRef" }, "type": "array" }, { "type": "null" } ], "title": "Knowledge Base Refs" }, "platform_tools": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Platform Tools" }, "continue_after_flow": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Continue After Flow" } }, "additionalProperties": false, "type": "object", "title": "RevisionConfigUpdate", "description": "Request body for PATCH /assistants/{id}/revisions/{rid} \u2014 edit any revision.\n\nA subset of the behavioral fields that live on AgentRevision.\n``base_version`` is the optimistic-concurrency version of the revision.\nIf supplied, the revision's ``version`` column must match; a mismatch\nraises ConflictError (409).\n\n``extra=forbid``: unknown or removed fields return 422." }, "RevisionCurrentTimeSettingsUpdate": { "properties": { "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" }, "timezone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Timezone" }, "base_version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Base Version" } }, "additionalProperties": false, "type": "object", "title": "RevisionCurrentTimeSettingsUpdate", "description": "Full replacement for one revision tier, with optional optimistic concurrency." }, "RevisionDiffSide": { "properties": { "revision_id": { "type": "string", "format": "uuid", "title": "Revision Id" }, "name": { "type": "string", "title": "Name" }, "provenance": { "type": "string", "enum": [ "compiled", "hand_edited", "uncompiled" ], "title": "Provenance" } }, "type": "object", "required": [ "revision_id", "name", "provenance" ], "title": "RevisionDiffSide", "description": "Metadata about one side of the diff (base or target)." }, "RevisionResponse": { "properties": { "revision": { "$ref": "#/components/schemas/AgentRevisionResponse" }, "version": { "type": "integer", "title": "Version", "default": 0 }, "prompt_findings": { "items": { "$ref": "#/components/schemas/ValidationFinding" }, "type": "array", "title": "Prompt Findings", "description": "Non-blocking authoring diagnostics for assistant persona/system-prompt mentions. Error severity does not mean an ordinary draft write failed; activation and active-revision updates block until these findings resolve." } }, "type": "object", "required": [ "revision" ], "title": "RevisionResponse", "description": "Response for revision create/update \u2014 the revision + optimistic version." }, "RevisionStackEntry": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "stack_position": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Stack Position" }, "based_on_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Based On Revision Id" }, "promoted_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Promoted At" }, "promoted_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Promoted By" }, "promotion_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Promotion Reason" }, "content_fingerprint": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content Fingerprint" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" } }, "type": "object", "required": [ "id", "name", "created_at" ], "title": "RevisionStackEntry", "description": "One entry in the revision stack (\u00a72.2)." }, "RevisionStackResponse": { "properties": { "revisions": { "items": { "$ref": "#/components/schemas/RevisionStackEntry" }, "type": "array", "title": "Revisions" }, "has_more": { "type": "boolean", "title": "Has More", "default": false }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "revisions" ], "title": "RevisionStackResponse", "description": "GET /assistants/{id}/revisions \u2014 paginated revision stack (\u00a72.2)." }, "RoleModelDefault": { "properties": { "role": { "type": "string", "title": "Role" }, "model": { "type": "string", "title": "Model" }, "reasoning_effort": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reasoning Effort" }, "max_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Tokens" }, "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature" }, "thinking_budget": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Thinking Budget" } }, "type": "object", "required": [ "role", "model" ], "title": "RoleModelDefault", "description": "A runtime role and its code-default model + generation settings.\n\nSurfaces the constants the runtime uses when an entity (agent/team/workflow)\nhas not configured a model, so the UI can show \"uses default: \"." }, "RolloutStatusResponse": { "properties": { "state": { "type": "string", "title": "State" }, "preflight_report": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Preflight Report" }, "reasons": { "items": { "type": "string" }, "type": "array", "title": "Reasons", "default": [] } }, "type": "object", "required": [ "state" ], "title": "RolloutStatusResponse" }, "RootResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "knowledge_base_source_id": { "type": "string", "format": "uuid", "title": "Knowledge Base Source Id" }, "provider_item_id": { "type": "string", "maxLength": 255, "title": "Provider Item Id" }, "item_type": { "type": "string", "maxLength": 50, "title": "Item Type" }, "display_name": { "type": "string", "maxLength": 500, "title": "Display Name" }, "source_url": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Source Url" }, "is_recursive": { "type": "boolean", "title": "Is Recursive", "default": false }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "knowledge_base_source_id", "provider_item_id", "item_type", "display_name", "created_at", "updated_at" ], "title": "RootResponse" }, "RouteResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "event_type": { "type": "string", "title": "Event Type" }, "destination_id": { "type": "string", "format": "uuid", "title": "Destination Id" }, "enabled": { "type": "boolean", "title": "Enabled" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "event_type", "destination_id", "enabled", "created_at", "updated_at" ], "title": "RouteResponse" }, "RouteUpsert": { "properties": { "event_type": { "type": "string", "minLength": 1, "title": "Event Type" }, "destination_id": { "type": "string", "format": "uuid", "title": "Destination Id" }, "enabled": { "type": "boolean", "title": "Enabled", "default": true } }, "additionalProperties": false, "type": "object", "required": [ "event_type", "destination_id" ], "title": "RouteUpsert", "description": "Map an ``event_type`` to a destination (idempotent on the pair)." }, "RouterConfigCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "model_chain": { "items": { "$ref": "#/components/schemas/ModelChainEntry" }, "type": "array", "minItems": 1, "title": "Model Chain" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "is_default": { "type": "boolean", "title": "Is Default", "default": false }, "smart_routing_enabled": { "type": "boolean", "title": "Smart Routing Enabled", "default": false }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "type": "object", "required": [ "name", "model_chain" ], "title": "RouterConfigCreate" }, "RouterConfigResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "is_default": { "type": "boolean", "title": "Is Default" }, "smart_routing_enabled": { "type": "boolean", "title": "Smart Routing Enabled" }, "model_chain": { "items": { "$ref": "#/components/schemas/ModelChainEntry" }, "type": "array", "title": "Model Chain" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "description", "is_default", "smart_routing_enabled", "model_chain", "created_at", "updated_at" ], "title": "RouterConfigResponse" }, "RouterConfigUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "model_chain": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ModelChainEntry" }, "type": "array", "minItems": 1 }, { "type": "null" } ], "title": "Model Chain" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "is_default": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Default" }, "smart_routing_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Smart Routing Enabled" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "type": "object", "title": "RouterConfigUpdate" }, "STTModelListResponse": { "properties": { "models": { "items": { "$ref": "#/components/schemas/STTModelOut" }, "type": "array", "title": "Models" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "total" ], "title": "STTModelListResponse" }, "STTModelOut": { "properties": { "external_id": { "type": "string", "title": "External Id" }, "display_name": { "type": "string", "title": "Display Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "tier": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tier" }, "is_default": { "type": "boolean", "title": "Is Default", "default": false }, "capabilities": { "additionalProperties": true, "type": "object", "title": "Capabilities" } }, "type": "object", "required": [ "external_id", "display_name" ], "title": "STTModelOut" }, "SavedVoiceConfigCreate": { "properties": { "voice_tuning": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Voice Tuning" }, "stt_provider": { "anyOf": [ { "type": "string", "maxLength": 32 }, { "type": "null" } ], "title": "Stt Provider" }, "stt_model": { "anyOf": [ { "type": "string", "maxLength": 64 }, { "type": "null" } ], "title": "Stt Model" }, "stt_provider_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Stt Provider Data" }, "tts_speed": { "anyOf": [ { "type": "number", "exclusiveMaximum": 10.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Tts Speed" }, "tts_provider_data": { "anyOf": [ { "$ref": "#/components/schemas/VoiceTTSProviderDataInput" }, { "type": "null" } ] }, "vad_provider_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Vad Provider Data" }, "local_vad_params": { "anyOf": [ { "$ref": "#/components/schemas/LocalVADParams" }, { "type": "null" } ] }, "turn_analyzer_params": { "anyOf": [ { "$ref": "#/components/schemas/TurnAnalyzerParams" }, { "type": "null" } ] }, "pronunciation_overrides": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Pronunciation Overrides" }, "noise_cancellation_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Noise Cancellation Enabled" }, "noise_cancellation_provider": { "anyOf": [ { "$ref": "#/components/schemas/NoiseCancellationProvider" }, { "type": "null" } ] }, "language": { "anyOf": [ { "type": "string", "maxLength": 16 }, { "type": "null" } ], "title": "Language" }, "locale": { "anyOf": [ { "type": "string", "maxLength": 16 }, { "type": "null" } ], "title": "Locale" }, "multilingual_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Multilingual Enabled" }, "multilingual_languages": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "maxItems": 50 }, { "type": "null" } ], "title": "Multilingual Languages" }, "first_speaker": { "anyOf": [ { "type": "string", "enum": [ "agent", "user" ] }, { "type": "null" } ], "title": "First Speaker" }, "mode": { "anyOf": [ { "type": "string", "enum": [ "static", "dynamic" ] }, { "type": "null" } ], "title": "Mode" }, "text": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Text" }, "instructions": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Instructions" }, "interruptible": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Interruptible" }, "ai_disclosure_text": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Ai Disclosure Text" }, "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "agent_id": { "type": "null", "title": "Agent Id" }, "team_id": { "type": "null", "title": "Team Id" }, "persona_id": { "type": "null", "title": "Persona Id" }, "voice_id": { "type": "string", "format": "uuid", "title": "Voice Id" } }, "additionalProperties": false, "type": "object", "required": [ "name", "voice_id" ], "title": "SavedVoiceConfigCreate", "description": "Create a reusable, named (saved) voice config \u2014 no parent binding.\n\nSaved configs are owned by the org and can be referenced by multiple\nagents via ``Agent.voice_config_id``. They must have a non-empty name\nand must NOT set agent_id / team_id / persona_id (those are for inline\nconfigs only)." }, "SavedVoiceConfigUpdate": { "properties": { "voice_tuning": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Voice Tuning" }, "stt_provider": { "anyOf": [ { "type": "string", "maxLength": 32 }, { "type": "null" } ], "title": "Stt Provider" }, "stt_model": { "anyOf": [ { "type": "string", "maxLength": 64 }, { "type": "null" } ], "title": "Stt Model" }, "stt_provider_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Stt Provider Data" }, "tts_speed": { "anyOf": [ { "type": "number", "exclusiveMaximum": 10.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Tts Speed" }, "tts_provider_data": { "anyOf": [ { "$ref": "#/components/schemas/VoiceTTSProviderDataInput" }, { "type": "null" } ] }, "vad_provider_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Vad Provider Data" }, "local_vad_params": { "anyOf": [ { "$ref": "#/components/schemas/LocalVADParams" }, { "type": "null" } ] }, "turn_analyzer_params": { "anyOf": [ { "$ref": "#/components/schemas/TurnAnalyzerParams" }, { "type": "null" } ] }, "pronunciation_overrides": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Pronunciation Overrides" }, "noise_cancellation_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Noise Cancellation Enabled" }, "noise_cancellation_provider": { "anyOf": [ { "$ref": "#/components/schemas/NoiseCancellationProvider" }, { "type": "null" } ] }, "language": { "anyOf": [ { "type": "string", "maxLength": 16 }, { "type": "null" } ], "title": "Language" }, "locale": { "anyOf": [ { "type": "string", "maxLength": 16 }, { "type": "null" } ], "title": "Locale" }, "multilingual_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Multilingual Enabled" }, "multilingual_languages": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "maxItems": 50 }, { "type": "null" } ], "title": "Multilingual Languages" }, "first_speaker": { "anyOf": [ { "type": "string", "enum": [ "agent", "user" ] }, { "type": "null" } ], "title": "First Speaker" }, "mode": { "anyOf": [ { "type": "string", "enum": [ "static", "dynamic" ] }, { "type": "null" } ], "title": "Mode" }, "text": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Text" }, "instructions": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Instructions" }, "interruptible": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Interruptible" }, "ai_disclosure_text": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Ai Disclosure Text" }, "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "voice_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Voice Id" } }, "additionalProperties": false, "type": "object", "title": "SavedVoiceConfigUpdate", "description": "Partial update for saved configs.\n\n``name`` can be patched on saved configs. Other fields share the same\nvalidation as inline configs." }, "ScenarioAgentRef": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" } }, "type": "object", "required": [ "id", "name" ], "title": "ScenarioAgentRef" }, "ScenarioChannel": { "type": "string", "enum": [ "text", "voice" ], "title": "ScenarioChannel" }, "ScenarioCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "intent": { "type": "string", "maxLength": 500, "minLength": 1, "title": "Intent" }, "journey": { "type": "string", "maxLength": 20000, "title": "Journey", "default": "" }, "source": { "$ref": "#/components/schemas/ScenarioSource", "default": "manual" }, "source_brief": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Source Brief" }, "source_agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Source Agent Id" }, "source_persona_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Source Persona Id" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags" }, "agent_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Agent Ids" } }, "type": "object", "required": [ "name", "intent" ], "title": "ScenarioCreate" }, "ScenarioDraft": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "intent": { "type": "string", "maxLength": 500, "minLength": 1, "title": "Intent" }, "journey": { "type": "string", "maxLength": 20000, "title": "Journey", "default": "" }, "source": { "$ref": "#/components/schemas/ScenarioSource", "default": "manual" }, "source_brief": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Source Brief" }, "source_agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Source Agent Id" }, "source_persona_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Source Persona Id" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags" }, "agent_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Agent Ids" }, "source_agent_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Agent Name" }, "source_persona_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Persona Name" } }, "type": "object", "required": [ "name", "intent" ], "title": "ScenarioDraft" }, "ScenarioDraftFromSessionRequest": { "properties": { "session_id": { "type": "string", "format": "uuid", "title": "Session Id" } }, "type": "object", "required": [ "session_id" ], "title": "ScenarioDraftFromSessionRequest" }, "ScenarioDraftRequest": { "properties": { "brief": { "type": "string", "maxLength": 2000, "minLength": 1, "title": "Brief" }, "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "persona_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Persona Id" } }, "type": "object", "required": [ "brief", "agent_id" ], "title": "ScenarioDraftRequest" }, "ScenarioReorderItem": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "priority": { "type": "integer", "maximum": 10000.0, "minimum": 0.0, "title": "Priority" } }, "type": "object", "required": [ "id", "priority" ], "title": "ScenarioReorderItem" }, "ScenarioReorderRequest": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ScenarioReorderItem" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "ScenarioReorderRequest" }, "ScenarioResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "intent": { "type": "string", "title": "Intent" }, "journey": { "type": "string", "title": "Journey" }, "source": { "$ref": "#/components/schemas/ScenarioSource" }, "source_brief": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Brief" }, "source_agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Source Agent Id" }, "source_agent_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Agent Name" }, "source_persona_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Source Persona Id" }, "source_persona_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Source Persona Name" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags" }, "agents": { "items": { "$ref": "#/components/schemas/ScenarioAgentRef" }, "type": "array", "title": "Agents" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "intent", "journey", "source", "tags", "created_at", "updated_at" ], "title": "ScenarioResponse" }, "ScenarioSource": { "type": "string", "enum": [ "manual", "drafted" ], "title": "ScenarioSource" }, "ScenarioUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "intent": { "anyOf": [ { "type": "string", "maxLength": 500, "minLength": 1 }, { "type": "null" } ], "title": "Intent" }, "journey": { "anyOf": [ { "type": "string", "maxLength": 20000 }, { "type": "null" } ], "title": "Journey" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "agent_ids": { "anyOf": [ { "items": { "type": "string", "format": "uuid" }, "type": "array" }, { "type": "null" } ], "title": "Agent Ids" } }, "type": "object", "title": "ScenarioUpdate" }, "SearchAnswerability": { "properties": { "label": { "type": "string", "enum": [ "answerable", "low_confidence", "not_answerable", "unknown" ], "title": "Label", "description": "Retrieval-confidence verdict for the query against the searched KBs." }, "reason_code": { "type": "string", "enum": [ "no_results", "below_low_threshold", "weak_band", "above_high_threshold", "not_actionable_basis", "verdict_failed" ], "title": "Reason Code", "description": "Why the verdict landed where it did." }, "raw_top_score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Raw Top Score", "description": "Top pre-normalization retrieval score; null on an empty or non-raw result set." }, "score_basis": { "type": "string", "enum": [ "raw_dotproduct", "minmax_norm", "cohere_rerank", "grouped" ], "title": "Score Basis", "description": "Retrieval-path regime the score is on: `raw_dotproduct` / `minmax_norm` / `cohere_rerank` / `grouped`. The verdict is only actionable on `raw_dotproduct`." } }, "type": "object", "required": [ "label", "reason_code", "score_basis" ], "title": "SearchAnswerability", "description": "Curated, consumer-facing slice of the retrieval-confidence verdict (ENG-671).\n\nDeliberately a SUBSET of the internal ``AnswerabilityDecision``: the public\nsearch API exposes the verdict + why, NOT internal gate config (``mode`` /\n``caller`` / ``action`` / ``suppressed`` / thresholds). Those are operational\ndetails \u2014 and on this endpoint ``action`` is always ``pass`` anyway, so\nsurfacing them would only be noise + needless coupling for API consumers." }, "SearchRequest": { "properties": { "query": { "type": "string", "title": "Query" }, "kb_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "minItems": 1, "title": "Kb Ids" }, "rerank": { "type": "boolean", "title": "Rerank", "description": "Request semantic reranking of the candidate set. For mixed embedding spaces, the service may still rerank automatically when Cohere is configured because raw vector scores are not comparable across spaces.", "default": false }, "limit": { "type": "integer", "maximum": 100.0, "minimum": 1.0, "title": "Limit", "default": 30 }, "prefer_draft": { "type": "boolean", "title": "Prefer Draft", "default": false }, "version_overrides": { "anyOf": [ { "additionalProperties": { "type": "string", "format": "uuid" }, "propertyNames": { "format": "uuid" }, "type": "object" }, { "type": "null" } ], "title": "Version Overrides" }, "alpha": { "type": "number", "maximum": 1.0, "minimum": 0.1, "title": "Alpha", "description": "Hybrid search weighting between dense and sparse vectors. `alpha=1.0` is dense-only, `alpha=0.5` weights both equally. Minimum is 0.1: sparse-dominant queries on this hybrid index starve dense signal without materially improving recall, and pure sparse (`alpha=0.0`) sends a degenerate all-zero dense vector that Pinecone rejects.", "default": 0.5 } }, "type": "object", "required": [ "query", "kb_ids" ], "title": "SearchRequest" }, "SearchResponse": { "properties": { "results": { "items": { "$ref": "#/components/schemas/SearchResult" }, "type": "array", "title": "Results" }, "total_results": { "type": "integer", "title": "Total Results", "description": "Total candidate count before the flat `results` list is truncated by `limit`." }, "grouped_results": { "anyOf": [ { "items": { "$ref": "#/components/schemas/SearchResultGroup" }, "type": "array" }, { "type": "null" } ], "title": "Grouped Results", "description": "Present only when mixed embedding spaces were searched without reranking. In that case the response is grouped by embedding space instead of pretending there is one globally ranked list." }, "ranking_mode": { "type": "string", "enum": [ "global_score", "reranked", "grouped_unranked" ], "title": "Ranking Mode", "description": "`global_score` means one embedding space ranked by raw vector score; `reranked` means a text reranker determined final ordering; `grouped_unranked` means mixed embedding spaces were returned as separate groups." }, "answerability": { "anyOf": [ { "$ref": "#/components/schemas/SearchAnswerability" }, { "type": "null" } ], "description": "Retrieval-confidence verdict for this search (ENG-671). Present only when the answerability gate is enabled (shadow/enforce) for the org; null when the gate is off. The public search API returns the verdict as DATA only \u2014 chunk suppression is the agent-path behavior and never applies to this endpoint." } }, "type": "object", "required": [ "results", "total_results", "ranking_mode" ], "title": "SearchResponse" }, "SearchResult": { "properties": { "chunk_id": { "type": "string", "title": "Chunk Id" }, "kb_id": { "type": "string", "format": "uuid", "title": "Kb Id" }, "document_id": { "type": "string", "format": "uuid", "title": "Document Id" }, "version_id": { "type": "string", "title": "Version Id", "default": "" }, "document_title": { "type": "string", "title": "Document Title" }, "source_type": { "type": "string", "title": "Source Type" }, "content": { "type": "string", "title": "Content" }, "score": { "type": "number", "title": "Score" }, "chunk_index": { "type": "integer", "title": "Chunk Index" }, "position": { "anyOf": [ { "$ref": "#/components/schemas/TextPosition" }, { "type": "null" } ] }, "sensitivity": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sensitivity" }, "sensitivity_level": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Sensitivity Level" }, "pii_status": { "type": "string", "title": "Pii Status", "default": "" }, "pii_sensitivity": { "type": "string", "title": "Pii Sensitivity", "default": "" }, "pii_coverage_status": { "type": "string", "title": "Pii Coverage Status", "default": "" } }, "type": "object", "required": [ "chunk_id", "kb_id", "document_id", "document_title", "source_type", "content", "score", "chunk_index" ], "title": "SearchResult" }, "SearchResultGroup": { "properties": { "embedding_model": { "type": "string", "title": "Embedding Model" }, "embedding_dimensions": { "type": "integer", "title": "Embedding Dimensions" }, "kb_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Kb Ids" }, "results": { "items": { "$ref": "#/components/schemas/SearchResult" }, "type": "array", "title": "Results" } }, "type": "object", "required": [ "embedding_model", "embedding_dimensions", "kb_ids", "results" ], "title": "SearchResultGroup" }, "SendSmsRequest": { "properties": { "from_number": { "type": "string", "pattern": "^\\+[1-9]\\d{6,14}$", "title": "From Number", "description": "Sender E.164" }, "to": { "type": "string", "pattern": "^\\+[1-9]\\d{6,14}$", "title": "To", "description": "Recipient E.164" }, "body": { "type": "string", "maxLength": 1600, "minLength": 0, "title": "Body" }, "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id", "description": "Authorized agent for outbound sends." }, "context_variables": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Context Variables", "description": "Optional seed values for the agent's typed context variables, applied once at session bootstrap. Each key must be a variable declared on the agent or one of its bound workflows; values are coerced to the variable's type/enum (unknown key or uncoercible value \u2192 422). System vars are frozen on-file; derived seeds satisfy the collection gate." }, "media_urls": { "items": { "type": "string" }, "type": "array", "maxItems": 10, "title": "Media Urls" }, "idempotency_key": { "anyOf": [ { "type": "string", "pattern": "^[A-Za-z0-9_\\-]{1,120}$" }, { "type": "null" } ], "title": "Idempotency Key", "description": "Alphanumeric + dash/underscore, 1-120 chars. Used to claim a durable operation so repeat POSTs with the same key are deduped." } }, "additionalProperties": false, "type": "object", "required": [ "from_number", "to", "body", "agent_id" ], "title": "SendSmsRequest", "description": "Body for ``POST /v1/sms/send``.\n\n``agent_id`` is required \u2014 the outbound-context helper enforces both\nagent-\u2194-number authorization and the org's destination-country allowlist.\nConversation + session are resolved (or created) server-side from the\n``from``/``to`` pair so callers stay stateless.\n\n``idempotency_key`` is optional but strongly recommended: when supplied,\na repeat POST with the same key claims the same durable operation\ninstead of dispatching a second send. Omit only for truly fire-once flows." }, "SendSmsResponse": { "properties": { "operation_id": { "type": "string", "format": "uuid", "title": "Operation Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "end_user_id": { "type": "string", "format": "uuid", "title": "End User Id" }, "idempotency_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Idempotency Key" } }, "type": "object", "required": [ "operation_id", "session_id", "end_user_id", "idempotency_key" ], "title": "SendSmsResponse", "description": "Response from ``POST /v1/sms/send``.\n\nReturns the routing context the caller (typically the shared brain) can\nuse to correlate this send with the broader conversation state. Echoes\nthe ``idempotency_key`` the caller supplied (or null) so clients can\nlog it and retry safely with the same value.\n\n``operation_id`` is the durable ``SmsOutboundOperation.id`` (ENG-846) \u2014\na stable handle for downstream status/observability tooling (ENG-849)\nto poll delivery state without re-deriving it from conversation rows.\nA retried request with the same ``idempotency_key`` gets back the SAME\n``operation_id``." }, "Sensitivity": { "type": "string", "enum": [ "non_pii", "pii", "gated" ], "title": "Sensitivity", "description": "Payload sensitivity tier for retention, docs, and observability." }, "SessionAnalysisDetailResponse": { "properties": { "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "knowledge_gap_analysis_outcome": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Knowledge Gap Analysis Outcome" }, "job": { "anyOf": [ { "$ref": "#/components/schemas/AnalysisJobSummary" }, { "type": "null" } ] }, "result": { "anyOf": [ { "$ref": "#/components/schemas/AnalysisResultSummary" }, { "type": "null" } ] }, "gap_events": { "items": { "$ref": "#/components/schemas/GapEventSummary" }, "type": "array", "title": "Gap Events" }, "linked_clusters": { "items": { "$ref": "#/components/schemas/ClusterStub" }, "type": "array", "title": "Linked Clusters" } }, "type": "object", "required": [ "session_id", "organization_id" ], "title": "SessionAnalysisDetailResponse" }, "SessionAnalysisInput": { "properties": { "analyzer_input_schema_version": { "type": "integer", "title": "Analyzer Input Schema Version", "default": 2 }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "channel": { "type": "string", "title": "Channel" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "ended_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Ended At" }, "completion_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Completion Reason" }, "knowledge_gap_analysis_outcome": { "anyOf": [ { "$ref": "#/components/schemas/KnowledgeGapAnalysisOutcome" }, { "type": "null" } ] }, "messages": { "items": { "$ref": "#/components/schemas/MessageEntry" }, "type": "array", "title": "Messages" }, "rag_traces": { "items": { "$ref": "#/components/schemas/RagTraceEntry" }, "type": "array", "title": "Rag Traces" }, "citations": { "items": { "$ref": "#/components/schemas/CitedChunk" }, "type": "array", "title": "Citations" }, "tool_calls": { "items": { "$ref": "#/components/schemas/ToolCallEntry" }, "type": "array", "title": "Tool Calls" }, "handoff_events": { "items": { "$ref": "#/components/schemas/HandoffEvent" }, "type": "array", "title": "Handoff Events" }, "kb_snapshot": { "anyOf": [ { "$ref": "#/components/schemas/KbSnapshotEntry" }, { "type": "null" } ] }, "user_feedback": { "anyOf": [ { "$ref": "#/components/schemas/FeedbackEntry" }, { "type": "null" } ] }, "csat": { "anyOf": [ { "$ref": "#/components/schemas/CSATEntry" }, { "type": "null" } ] }, "reopen": { "anyOf": [ { "$ref": "#/components/schemas/ReopenEntry" }, { "type": "null" } ] }, "customer_metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Customer Metadata" }, "missing_evidence_reasons": { "items": { "$ref": "#/components/schemas/MissingEvidenceReason" }, "type": "array", "title": "Missing Evidence Reasons" } }, "type": "object", "required": [ "session_id", "organization_id", "agent_id", "channel", "started_at", "ended_at", "completion_reason", "knowledge_gap_analysis_outcome" ], "title": "SessionAnalysisInput", "description": "Canonical analyzer input built from one completed session.\n\nRequired fields are populated for every analysed completed session.\nConditionally-required fields populate when the corresponding capture\nsucceeded (e.g., ``rag_traces`` when retrieval ran). Nullable enrichment\nfields are best-effort.\n\nConsumers should consult ``missing_evidence_reasons`` before attempting\nevidence-backed classifications." }, "SessionClose": { "properties": { "reason": { "anyOf": [ { "anyOf": [ { "$ref": "#/components/schemas/SessionTerminationReason" }, { "type": "string" } ], "maxLength": 64 }, { "type": "null" } ], "title": "Reason" } }, "type": "object", "title": "SessionClose" }, "SessionEvalSummary": { "properties": { "total": { "type": "integer", "title": "Total", "default": 0 }, "succeeded": { "type": "integer", "title": "Succeeded", "default": 0 }, "failed": { "type": "integer", "title": "Failed", "default": 0 }, "pending": { "type": "integer", "title": "Pending", "default": 0 }, "critical_total": { "type": "integer", "title": "Critical Total", "default": 0 }, "critical_succeeded": { "type": "integer", "title": "Critical Succeeded", "default": 0 }, "critical_failed": { "type": "integer", "title": "Critical Failed", "default": 0 }, "critical_pending": { "type": "integer", "title": "Critical Pending", "default": 0 }, "eval_status": { "type": "string", "enum": [ "success", "partial", "failure", "pending", "none" ], "title": "Eval Status", "default": "none" } }, "type": "object", "title": "SessionEvalSummary", "description": "Rollup of eval runs that targeted a session.\n\n`succeeded` = runs where status='completed' AND every score has passed=true.\n`failed` = total - succeeded - pending (failed-status runs + completed-but-not-all-passed).\n`pending` = runs still queued or running.\n\nThe `critical_*` counterparts restrict the same aggregation to runs whose\nbinding was marked `is_critical=True` (snapshotted onto the run). They drive\nthe session headline pill \u2014 non-critical evals still run and display but\ndon't move the verdict. `eval_status` collapses the critical counts to a\nsingle headline label (`none` when no criticals are configured)." }, "SessionMemoriesResponse": { "properties": { "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "state": { "type": "string", "enum": [ "pending", "synced", "skipped", "suppressed" ], "title": "State" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" }, "message_count": { "type": "integer", "title": "Message Count", "default": 0 }, "synced_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Synced At" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" }, "facts": { "items": { "$ref": "#/components/schemas/MemoryFactResponse" }, "type": "array", "title": "Facts" }, "facts_status": { "type": "string", "enum": [ "ready", "unavailable" ], "title": "Facts Status", "default": "ready" } }, "type": "object", "required": [ "session_id", "state" ], "title": "SessionMemoriesResponse", "description": "Per-session memory ingestion outcome and attributed facts (customer-facing).\n\n``state`` = ConvSessionMeta.memory_sync_state (pending/synced/skipped/suppressed).\n``status`` / ``message_count`` / ``synced_at`` come from the latest\n``sync_session`` MemoryAuditLog row for the session (None/0 if never synced).\n``facts`` / ``facts_status`` are populated by a live vendor read when the\nsession is synced." }, "SessionStatus": { "type": "string", "enum": [ "idle", "running_turn", "end_requested", "end_processing", "ended", "error" ], "title": "SessionStatus", "description": "In-memory lifecycle status of a ``Runtime`` instance.\n\nDistinct from ``ConversationSession.status`` (DB column). The DB status\nis the durable end-state of a session row; this enum is the per-instance\nlive signal that channel runtimes consult after each ``run_turn`` to\ndecide whether to call ``end_session``." }, "SessionTerminationReason": { "type": "string", "enum": [ "voicemail_detected", "silence_timeout", "max_call_duration", "participant_left", "pipeline_exit", "user_requested", "agent_initiated", "config_rebound", "resolved", "unresolved", "abandoned", "escalated", "handoff_resolved", "transferred", "error", "unknown", "callee_busy", "callee_no_answer", "callee_unavailable", "callee_declined", "callee_not_found", "sip_failed", "unknown_reason", "client_initiated", "duplicate_identity", "server_shutdown", "participant_removed", "room_deleted", "state_mismatch", "join_failure", "migration", "signal_close", "room_closed", "user_unavailable", "user_rejected", "sip_trunk_failure", "connection_timeout", "media_failure", "agent_error", "dispatch_failed", "dispatch_interrupted", "dispatch_unacknowledged", "dispatch_quarantined", "token_mint_failed", "sip_dial_failed", "dial_unknown_teardown_confirmed", "call_ended", "ambiguous_no_room_aged", "delivery_max_tries_exceeded", "missing_lease", "missing_conversation", "malformed_dispatch_metadata", "participant_join_timeout", "setup_error", "stt_provider_error", "tts_provider_error", "stale_routing", "superseded", "duplicate_dispatch", "orphaned", "agent_absent_orphan", "wedged_pipeline_timeout", "capacity_rejected", "requeued", "org_concurrency_limit", "global_pipeline_limit", "stt_limit", "tts_limit", "carrier_cps_deferred", "call_window_deferred", "queue_ttl_expired", "outbound_cancelled", "inline_dispatch_abandoned", "reservation_expired", "dial_requeue_exhausted" ], "title": "SessionTerminationReason", "description": "Canonical reasons a voice/runtime session ended.\n\nStored on ``ConversationSession.internal_termination_reason`` via the\n:class:`SessionTerminationReasonType` ``TypeDecorator`` \u2014 Python\nsurfaces the enum, the DB column itself is plain VARCHAR(64) with no\nPostgres ENUM type and no CHECK constraint, so extending the enum is\na Python-only change (no migration needed).\n\n``AGENT_INITIATED`` covers every LLM-driven end (the agent decided the\nconversation is over). ``UNKNOWN`` is the defensive fallback any\nstring that fails to coerce lands on \u2014 both at write time (via\n``coerce_termination_reason`` in ``src/runtime/contracts.py``) and at\nread time (via :meth:`SessionTerminationReasonType.process_result_value`\nwhen a legacy / drifted value is loaded from the row)." }, "SessionTraceGroupedResponse": { "properties": { "header": { "anyOf": [ { "$ref": "#/components/schemas/TraceSessionHeader" }, { "type": "null" } ] }, "session": { "items": { "$ref": "#/components/schemas/TraceStep" }, "type": "array", "title": "Session" }, "turns": { "items": { "$ref": "#/components/schemas/TraceTurn" }, "type": "array", "title": "Turns" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "additionalProperties": false, "type": "object", "required": [ "session", "turns" ], "title": "SessionTraceGroupedResponse", "description": "Nested envelope (Phase D): Session \u2192 Turn \u2192 node \u2192 step.\n\n``header`` holds the session-level facts (who / channel / agent / outcome / memory) shown once.\n``session`` holds any remaining session-lane steps not folded into the header. ``turns`` holds\nthe per-turn trees, ordered by turn start. A read alternative to the flat\n:class:`SessionTraceResponse`; the flat shape stays for back-compat." }, "SessionTraceResponse": { "properties": { "steps": { "items": { "$ref": "#/components/schemas/TraceStep" }, "type": "array", "title": "Steps" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "additionalProperties": false, "type": "object", "required": [ "steps" ], "title": "SessionTraceResponse", "description": "Envelope returned by both trace read endpoints." }, "SessionUsage": { "properties": { "input_tokens": { "type": "integer", "title": "Input Tokens" }, "output_tokens": { "type": "integer", "title": "Output Tokens" }, "cost_usd": { "type": "number", "title": "Cost Usd" } }, "type": "object", "required": [ "input_tokens", "output_tokens", "cost_usd" ], "title": "SessionUsage", "description": "Per-chat token + cost totals, summed across the session's messages." }, "SetActivePolicyRevisionRequest": { "properties": { "revision_id": { "type": "string", "format": "uuid", "title": "Revision Id" } }, "type": "object", "required": [ "revision_id" ], "title": "SetActivePolicyRevisionRequest" }, "SetActiveRevisionRequest": { "properties": { "revision_id": { "type": "string", "format": "uuid", "title": "Revision Id" } }, "type": "object", "required": [ "revision_id" ], "title": "SetActiveRevisionRequest" }, "SetComponentOutputsOp": { "properties": { "op": { "type": "string", "const": "set_component_outputs", "title": "Op" }, "component_outputs": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Component Outputs" } }, "type": "object", "required": [ "op" ], "title": "SetComponentOutputsOp" }, "SetEntryNodeOp": { "properties": { "op": { "type": "string", "const": "set_entry_node", "title": "Op" }, "entry_node_id": { "type": "string", "title": "Entry Node Id" } }, "type": "object", "required": [ "op", "entry_node_id" ], "title": "SetEntryNodeOp" }, "SetPersonaOp": { "properties": { "op": { "type": "string", "const": "set_persona", "title": "Op" }, "persona": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Persona" } }, "type": "object", "required": [ "op" ], "title": "SetPersonaOp" }, "SettingsResponse": { "properties": { "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "default_destination_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Default Destination Id" }, "timezone": { "type": "string", "title": "Timezone" }, "quiet_hours_enabled": { "type": "boolean", "title": "Quiet Hours Enabled" }, "quiet_hours_start": { "anyOf": [ { "type": "string", "format": "time" }, { "type": "null" } ], "title": "Quiet Hours Start" }, "quiet_hours_end": { "anyOf": [ { "type": "string", "format": "time" }, { "type": "null" } ], "title": "Quiet Hours End" }, "digest_send_time": { "type": "string", "format": "time", "title": "Digest Send Time" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "organization_id", "default_destination_id", "timezone", "quiet_hours_enabled", "quiet_hours_start", "quiet_hours_end", "digest_send_time", "created_at", "updated_at" ], "title": "SettingsResponse" }, "SettingsUpdate": { "properties": { "default_destination_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Default Destination Id" }, "timezone": { "anyOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "title": "Timezone" }, "quiet_hours_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Quiet Hours Enabled" }, "quiet_hours_start": { "anyOf": [ { "type": "string", "format": "time" }, { "type": "null" } ], "title": "Quiet Hours Start" }, "quiet_hours_end": { "anyOf": [ { "type": "string", "format": "time" }, { "type": "null" } ], "title": "Quiet Hours End" }, "digest_send_time": { "anyOf": [ { "type": "string", "format": "time" }, { "type": "null" } ], "title": "Digest Send Time" } }, "additionalProperties": false, "type": "object", "title": "SettingsUpdate", "description": "Partial update of org notification settings.\n\n``exclude_unset`` distinguishes \"not provided\" from an explicit ``null``\n(clear the default destination), so omit a field to leave it unchanged." }, "ShuttingDownResponse": { "properties": { "status": { "type": "string", "title": "Status", "default": "shutting_down" } }, "type": "object", "title": "ShuttingDownResponse", "description": "503 body for ``/ready`` once SIGTERM starts the graceful drain." }, "SignalCatalogItem": { "properties": { "key": { "type": "string", "title": "Key" }, "label": { "type": "string", "title": "Label" }, "unit": { "type": "string", "title": "Unit" }, "format": { "type": "string", "enum": [ "boolean", "enum", "numeric", "score" ], "title": "Format" }, "aggregations": { "items": { "type": "string" }, "type": "array", "title": "Aggregations" }, "filters": { "items": { "$ref": "#/components/schemas/SignalFilterDimResponse" }, "type": "array", "title": "Filters" }, "channels": { "items": { "type": "string" }, "type": "array", "title": "Channels" }, "description": { "type": "string", "title": "Description", "default": "" } }, "type": "object", "required": [ "key", "label", "unit", "format", "aggregations", "channels" ], "title": "SignalCatalogItem", "description": "One entry in the deterministic signal catalog.\n\nDrives the frontend's signal-picker UI when creating a deterministic\nevaluator. Matches the runtime ``SignalSpec`` shape minus the extractor\ncallable." }, "SignalCatalogResponse": { "properties": { "signals": { "items": { "$ref": "#/components/schemas/SignalCatalogItem" }, "type": "array", "title": "Signals" } }, "type": "object", "required": [ "signals" ], "title": "SignalCatalogResponse", "description": "Closed set of deterministic signals available to evaluators." }, "SignalFilterDimResponse": { "properties": { "key": { "type": "string", "title": "Key" }, "type": { "type": "string", "enum": [ "string", "string_list", "string_to_string_map" ], "title": "Type" }, "required": { "type": "boolean", "title": "Required", "default": false }, "description": { "type": "string", "title": "Description", "default": "" } }, "type": "object", "required": [ "key", "type" ], "title": "SignalFilterDimResponse", "description": "One configurable filter on a deterministic signal." }, "SimulationRunDispatch": { "properties": { "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "persona_id": { "type": "string", "format": "uuid", "title": "Persona Id" }, "scenario_id": { "type": "string", "format": "uuid", "title": "Scenario Id" }, "channel": { "$ref": "#/components/schemas/ScenarioChannel", "default": "voice" }, "tool_overrides": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/CannedToolResponse" }, "type": "object" }, { "type": "null" } ], "title": "Tool Overrides" }, "budget_usd": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,6}|(?=[\\d.]{1,13}0*$)\\d{0,6}\\.\\d{0,6}0*$)" }, { "type": "null" } ], "title": "Budget Usd" }, "idempotency_key": { "anyOf": [ { "type": "string", "maxLength": 128, "minLength": 1 }, { "type": "null" } ], "title": "Idempotency Key" } }, "type": "object", "required": [ "agent_id", "persona_id", "scenario_id" ], "title": "SimulationRunDispatch", "description": "Request body for ``POST /v1/simulation/runs``.\n\nUnlike :class:`SimulationRunCreate` (which describes a row that already\nhas a ``Conversation``), this is the public orchestrator payload:\nthe service creates the session row and the run row in one transaction\nand then dispatches the Celery worker." }, "SimulationRunResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "persona_id": { "type": "string", "format": "uuid", "title": "Persona Id" }, "scenario_id": { "type": "string", "format": "uuid", "title": "Scenario Id" }, "suite_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Suite Id" }, "suite_run_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Suite Run Id" }, "suite_item_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Suite Item Id" }, "suite_attempt": { "type": "integer", "title": "Suite Attempt", "default": 1 }, "channel": { "$ref": "#/components/schemas/ScenarioChannel" }, "tool_overrides": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Tool Overrides" }, "sut_snapshot_sha256": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sut Snapshot Sha256" }, "status": { "type": "string", "title": "Status" }, "idempotency_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Idempotency Key" }, "budget_usd": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Budget Usd" }, "spent_usd": { "anyOf": [ { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" }, { "type": "null" } ], "title": "Spent Usd" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "finished_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Finished At" }, "error_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Text" }, "stop_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Stop Reason" }, "persona_turn_count": { "type": "integer", "title": "Persona Turn Count", "default": 0 }, "agent_turn_count": { "type": "integer", "title": "Agent Turn Count", "default": 0 }, "transcript_chars": { "type": "integer", "title": "Transcript Chars", "default": 0 }, "heartbeat_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Heartbeat At" }, "inputs_snapshot": { "additionalProperties": true, "type": "object", "title": "Inputs Snapshot" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "recording_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Recording Id" }, "recording_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Recording Status" } }, "type": "object", "required": [ "id", "session_id", "organization_id", "agent_id", "agent_revision_id", "persona_id", "scenario_id", "channel", "tool_overrides", "status", "started_at", "finished_at", "error_text", "inputs_snapshot", "created_at" ], "title": "SimulationRunResponse" }, "SimulationRunStatus": { "type": "string", "enum": [ "pending", "running", "completed", "failed", "cancelled", "budget_exceeded" ], "title": "SimulationRunStatus" }, "SimulationSuiteCloneRequest": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Description" } }, "type": "object", "required": [ "name" ], "title": "SimulationSuiteCloneRequest" }, "SimulationSuiteCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "description": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Description" }, "is_active": { "type": "boolean", "title": "Is Active", "default": true }, "items": { "items": { "$ref": "#/components/schemas/SimulationSuiteItemCreate" }, "type": "array", "maxItems": 50, "title": "Items" } }, "type": "object", "required": [ "name" ], "title": "SimulationSuiteCreate" }, "SimulationSuiteItemCreate": { "properties": { "persona_id": { "type": "string", "format": "uuid", "title": "Persona Id" }, "scenario_id": { "type": "string", "format": "uuid", "title": "Scenario Id" } }, "type": "object", "required": [ "persona_id", "scenario_id" ], "title": "SimulationSuiteItemCreate" }, "SimulationSuiteItemResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "suite_id": { "type": "string", "format": "uuid", "title": "Suite Id" }, "persona_id": { "type": "string", "format": "uuid", "title": "Persona Id" }, "scenario_id": { "type": "string", "format": "uuid", "title": "Scenario Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "suite_id", "persona_id", "scenario_id", "created_at" ], "title": "SimulationSuiteItemResponse" }, "SimulationSuiteItemUpdate": { "properties": { "persona_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Persona Id" }, "scenario_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Scenario Id" } }, "type": "object", "title": "SimulationSuiteItemUpdate" }, "SimulationSuiteResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "is_active": { "type": "boolean", "title": "Is Active" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "items": { "items": { "$ref": "#/components/schemas/SimulationSuiteItemResponse" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "id", "organization_id", "name", "is_active", "created_at", "updated_at" ], "title": "SimulationSuiteResponse" }, "SimulationSuiteRunDispatch": { "properties": { "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "channel": { "$ref": "#/components/schemas/ScenarioChannel", "default": "voice" }, "tool_overrides": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/CannedToolResponse" }, "type": "object" }, { "type": "null" } ], "title": "Tool Overrides" }, "budget_usd": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string", "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,6}|(?=[\\d.]{1,13}0*$)\\d{0,6}\\.\\d{0,6}0*$)" }, { "type": "null" } ], "title": "Budget Usd" }, "idempotency_key": { "anyOf": [ { "type": "string", "maxLength": 128, "minLength": 1 }, { "type": "null" } ], "title": "Idempotency Key" } }, "type": "object", "required": [ "agent_id" ], "title": "SimulationSuiteRunDispatch", "description": "Request body for ``POST /v1/sim-suites/{suite_id}/runs``.\n\n``suite_id`` is taken from the path. The orchestrator fans the suite out into\none ``SimulationRun`` per item, all pinned to the same agent/revision." }, "SimulationSuiteRunResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "suite_id": { "type": "string", "format": "uuid", "title": "Suite Id" }, "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "idempotency_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Idempotency Key" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "status": { "type": "string", "title": "Status" }, "runs": { "items": { "$ref": "#/components/schemas/SimulationRunResponse" }, "type": "array", "title": "Runs" }, "release_eval_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Release Eval Status" }, "release_eval_verdict": { "anyOf": [ { "$ref": "#/components/schemas/ReleaseVerdict" }, { "type": "null" } ] }, "release_eval_completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Release Eval Completed At" }, "release_eval_error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Release Eval Error" } }, "type": "object", "required": [ "id", "organization_id", "suite_id", "agent_id", "agent_revision_id", "created_by", "created_at", "status" ], "title": "SimulationSuiteRunResponse" }, "SimulationSuiteRunSummaryResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "suite_id": { "type": "string", "format": "uuid", "title": "Suite Id" }, "suite_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Suite Name" }, "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "status": { "type": "string", "title": "Status" }, "counts": { "$ref": "#/components/schemas/SuiteRunStatusCounts" }, "release_eval_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Release Eval Status" }, "release_eval_completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Release Eval Completed At" } }, "type": "object", "required": [ "id", "organization_id", "suite_id", "agent_id", "created_at", "status" ], "title": "SimulationSuiteRunSummaryResponse", "description": "Slim suite-run row for the org-wide list.\n\nDeliberately *not* :class:`SimulationSuiteRunResponse`: that one embeds every\nchild run, each carrying ``inputs_snapshot`` + ``tool_overrides`` JSONB, so a\n50-row page of 20-item suites serialises 1000 nested runs. This shape swaps\nthe child array for ``counts`` and inlines ``suite_name`` so the client needs\nno second lookup." }, "SimulationSuiteUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Description" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" } }, "type": "object", "title": "SimulationSuiteUpdate" }, "SmartRoutingImpactRow": { "properties": { "smart_routed": { "type": "integer", "title": "Smart Routed" }, "invocations": { "type": "integer", "title": "Invocations" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "avg_cost_per_call": { "type": "number", "title": "Avg Cost Per Call" }, "success_rate": { "type": "number", "title": "Success Rate" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "total_tokens": { "type": "integer", "title": "Total Tokens" } }, "type": "object", "required": [ "smart_routed", "invocations", "total_cost_usd", "avg_cost_per_call", "success_rate", "p95_ms", "total_tokens" ], "title": "SmartRoutingImpactRow" }, "SmartRoutingMetadata": { "properties": { "classifier_model": { "type": "string", "title": "Classifier Model" }, "classifier_tier": { "$ref": "#/components/schemas/ModelTier" }, "classifier_confidence": { "type": "number", "title": "Classifier Confidence" }, "recommended_model": { "type": "string", "title": "Recommended Model" }, "executed_model": { "type": "string", "title": "Executed Model" }, "candidate_chain": { "items": { "type": "string" }, "type": "array", "title": "Candidate Chain" }, "reason": { "type": "string", "title": "Reason" } }, "type": "object", "required": [ "classifier_model", "classifier_tier", "classifier_confidence", "recommended_model", "executed_model", "candidate_chain", "reason" ], "title": "SmartRoutingMetadata" }, "SmsDeliveryAttemptDetail": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "attempt_number": { "type": "integer", "title": "Attempt Number" }, "state": { "type": "string", "title": "State" }, "provider_sid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider Sid" }, "delivery_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Delivery Status" }, "delivery_status_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Delivery Status At" }, "failure_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Failure Code" }, "failure_classification": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Failure Classification" }, "reconciliation_state": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Reconciliation State" }, "submitted_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Submitted At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "provider_events": { "items": { "$ref": "#/components/schemas/SmsProviderEventDetail" }, "type": "array", "title": "Provider Events" } }, "type": "object", "required": [ "id", "attempt_number", "state", "provider_sid", "delivery_status", "delivery_status_at", "failure_code", "failure_classification", "reconciliation_state", "submitted_at", "completed_at", "provider_events" ], "title": "SmsDeliveryAttemptDetail", "description": "One provider submission for a chunk, with its carrier callback\nhistory. ``provider_sid`` is ``None`` unless the caller holds\n``communication:manage`` (see ``_may_see_unmasked`` in ``router.py``)." }, "SmsOutboundChunkDetail": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "ordinal": { "type": "integer", "title": "Ordinal" }, "status": { "type": "string", "title": "Status" }, "outcome": { "type": "string", "title": "Outcome", "default": "" }, "to_e164": { "type": "string", "title": "To E164", "default": "" }, "attempts": { "items": { "$ref": "#/components/schemas/SmsDeliveryAttemptDetail" }, "type": "array", "title": "Attempts" } }, "type": "object", "required": [ "id", "ordinal", "status", "attempts" ], "title": "SmsOutboundChunkDetail", "description": "One immutable wire chunk, its retry/redrive attempt history, and the\nderived per-chunk outcome (see ``derive_chunk_outcome`` in ``service.py``).\n\n``outcome``/``to_e164`` don't exist on the ORM chunk directly (outcome is\nderived; to_e164 lives on the chunk's sibling) \u2014 defaulted here so\n``model_validate`` succeeds, then always overwritten by the router before\nthe response is returned." }, "SmsOutboundOperationDetail": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "status": { "type": "string", "title": "Status" }, "outcome": { "type": "string", "title": "Outcome", "default": "" }, "from_e164": { "type": "string", "title": "From E164" }, "to_e164": { "type": "string", "title": "To E164" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "chunks": { "items": { "$ref": "#/components/schemas/SmsOutboundChunkDetail" }, "type": "array", "title": "Chunks" } }, "type": "object", "required": [ "id", "session_id", "status", "from_e164", "to_e164", "created_at", "updated_at", "chunks" ], "title": "SmsOutboundOperationDetail", "description": "Full operation -> chunks -> attempts -> events tree for\n``GET /sms/operations/{operation_id}``.\n\n``outcome`` doesn't exist on the ORM operation directly (derived) \u2014\ndefaulted here so ``model_validate`` succeeds, then always overwritten\nby the router before the response is returned." }, "SmsOutboundOperationSummary": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "status": { "type": "string", "title": "Status" }, "outcome": { "type": "string", "title": "Outcome", "default": "" }, "from_e164": { "type": "string", "title": "From E164" }, "to_e164": { "type": "string", "title": "To E164" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "session_id", "status", "from_e164", "to_e164", "created_at", "updated_at" ], "title": "SmsOutboundOperationSummary", "description": "Lighter, non-nested shape for ``GET /sms/operations?session_id=``.\n\n``outcome`` doesn't exist on the ORM operation directly (derived) \u2014\ndefaulted here so ``model_validate`` succeeds, then always overwritten\nby the router before the response is returned." }, "SmsProviderEventDetail": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "provider": { "type": "string", "title": "Provider" }, "vendor_status": { "type": "string", "title": "Vendor Status" }, "normalized_status": { "type": "string", "title": "Normalized Status" }, "vendor_error_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Vendor Error Code" }, "failure_classification": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Failure Classification" }, "occurred_at": { "type": "string", "format": "date-time", "title": "Occurred At" }, "received_at": { "type": "string", "format": "date-time", "title": "Received At" }, "reconciliation_state": { "type": "string", "title": "Reconciliation State" } }, "type": "object", "required": [ "id", "provider", "vendor_status", "normalized_status", "vendor_error_code", "failure_classification", "occurred_at", "received_at", "reconciliation_state" ], "title": "SmsProviderEventDetail", "description": "One durable callback/reconciliation record." }, "SmsSettingsResponse": { "properties": { "allowed_countries": { "items": { "type": "string" }, "type": "array", "title": "Allowed Countries" }, "max_message_length": { "type": "integer", "title": "Max Message Length" } }, "type": "object", "required": [ "allowed_countries", "max_message_length" ], "title": "SmsSettingsResponse", "description": "Combined per-org SMS config.\n\n``allowed_countries`` is the country allowlist (ISO-3166 alpha-2 codes;\nempty list = no restriction). ``max_message_length`` caps each\nassistant turn's character count; brain replies above this are split\ninto multiple messages, API sends above this are rejected." }, "SmsSettingsUpdateRequest": { "properties": { "allowed_countries": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "maxItems": 300 }, { "type": "null" } ], "title": "Allowed Countries" }, "max_message_length": { "anyOf": [ { "type": "integer", "maximum": 1600.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Max Message Length" } }, "additionalProperties": false, "type": "object", "title": "SmsSettingsUpdateRequest", "description": "Partial update \u2014 only fields explicitly supplied are touched." }, "SourceDiff": { "properties": { "instructions": { "$ref": "#/components/schemas/TextDiff" }, "config": { "$ref": "#/components/schemas/FieldChangeCollection" }, "policies": { "$ref": "#/components/schemas/PolicyNamesDiff" }, "tool_input_defaults": { "$ref": "#/components/schemas/FieldChangeCollection" }, "model_settings": { "$ref": "#/components/schemas/ModelSettingsDiff" } }, "type": "object", "required": [ "instructions" ], "title": "SourceDiff", "description": "Source-layer diff \u2014 exactly what the author edited (authored config columns).\n\nAlways present and always deterministic regardless of graph provenance." }, "SourceResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "knowledge_base_id": { "type": "string", "format": "uuid", "title": "Knowledge Base Id" }, "provider": { "type": "string", "title": "Provider", "default": "notion" }, "integration_connection_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Integration Connection Id" }, "config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Config" }, "status": { "type": "string", "title": "Status" }, "last_sync_job_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Last Sync Job Id" }, "integration_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Integration Key" }, "connection_nickname": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Connection Nickname" }, "connection_metadata": { "additionalProperties": true, "type": "object", "title": "Connection Metadata" }, "auto_sync_enabled": { "type": "boolean", "title": "Auto Sync Enabled", "default": false }, "sync_interval_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Sync Interval Seconds" }, "next_sync_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Next Sync At" }, "last_auto_sync_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Auto Sync At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "knowledge_base_id", "status", "created_at", "updated_at" ], "title": "SourceResponse" }, "SourceSpan": { "properties": { "start_line": { "type": "integer", "title": "Start Line" }, "start_col": { "type": "integer", "title": "Start Col" }, "end_line": { "type": "integer", "title": "End Line" }, "end_col": { "type": "integer", "title": "End Col" }, "raw_text_excerpt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Raw Text Excerpt" } }, "type": "object", "required": [ "start_line", "start_col", "end_line", "end_col" ], "title": "SourceSpan", "description": "Byte/character span into the original instruction markdown.\n\n``start_line``/``end_line`` are 1-indexed; columns are 0-indexed. The\noptional ``raw_text_excerpt`` carries a small slice for human-readable\nerror messages without forcing readers to re-open the source." }, "StaleDocumentRow": { "properties": { "document_id": { "type": "string", "title": "Document Id" }, "knowledge_base_id": { "type": "string", "title": "Knowledge Base Id" }, "last_completed_at": { "type": "string", "format": "date-time", "title": "Last Completed At" }, "last_retrieved_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Retrieved At" }, "days_since_last_hit": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Days Since Last Hit" } }, "type": "object", "required": [ "document_id", "knowledge_base_id", "last_completed_at" ], "title": "StaleDocumentRow" }, "StatusBreakdownRow": { "properties": { "status": { "type": "string", "title": "Status" }, "session_count": { "type": "integer", "title": "Session Count" }, "percentage": { "type": "number", "title": "Percentage" } }, "type": "object", "required": [ "status", "session_count", "percentage" ], "title": "StatusBreakdownRow" }, "SubjectKind": { "type": "string", "enum": [ "workflow_node", "tool_call" ], "title": "SubjectKind", "description": "What a suspended approval is gating \u2014 the caller-agnostic dispatch key.\n\nThe :class:`ResumeDispatcher` (HITL-03 \u00a71) routes a recorded decision back to\nthe right continuation by this value: a workflow ``ApprovalNode`` resumes an\nedge (``WORKFLOW_NODE``); a Policy/tool-level gate resumes a partial turn\n(``TOOL_CALL``). Persisted to a ``VARCHAR(20)`` \u2014 a StrEnum serializes to its\nstring value, so it needs no migration." }, "SuiteRunStatusCounts": { "properties": { "total_items": { "type": "integer", "title": "Total Items", "default": 0 }, "pending": { "type": "integer", "title": "Pending", "default": 0 }, "running": { "type": "integer", "title": "Running", "default": 0 }, "completed": { "type": "integer", "title": "Completed", "default": 0 }, "failed": { "type": "integer", "title": "Failed", "default": 0 }, "cancelled": { "type": "integer", "title": "Cancelled", "default": 0 }, "budget_exceeded": { "type": "integer", "title": "Budget Exceeded", "default": 0 } }, "type": "object", "title": "SuiteRunStatusCounts", "description": "Per-status child-run counts for one suite-run batch.\n\nCounted over the *latest attempt per suite item* (the same dedupe\n:func:`aggregate_suite_run_status` uses), so a retried-away FAILED original\nnever shows up as a failure next to a ``status=\"completed\"`` rollup." }, "SummaryResponse": { "properties": { "total_sessions_analyzed": { "type": "integer", "title": "Total Sessions Analyzed" }, "knowledge_gap_rate": { "type": "number", "title": "Knowledge Gap Rate" }, "total_gap_events": { "type": "integer", "title": "Total Gap Events" }, "active_gap_clusters": { "type": "integer", "title": "Active Gap Clusters" }, "critical_gap_clusters": { "type": "integer", "title": "Critical Gap Clusters" }, "top_gap_types": { "items": { "$ref": "#/components/schemas/BucketCount" }, "type": "array", "title": "Top Gap Types" }, "top_product_areas": { "items": { "$ref": "#/components/schemas/BucketCount" }, "type": "array", "title": "Top Product Areas" }, "average_impact_score": { "type": "number", "title": "Average Impact Score" }, "fixed_clusters_count": { "type": "integer", "title": "Fixed Clusters Count" }, "reopened_clusters_count": { "type": "integer", "title": "Reopened Clusters Count" } }, "type": "object", "required": [ "total_sessions_analyzed", "knowledge_gap_rate", "total_gap_events", "active_gap_clusters", "critical_gap_clusters", "top_gap_types", "top_product_areas", "average_impact_score", "fixed_clusters_count", "reopened_clusters_count" ], "title": "SummaryResponse" }, "SweepCreatedResponse": { "properties": { "sweep_id": { "type": "string", "format": "uuid", "title": "Sweep Id" }, "status": { "type": "string", "enum": [ "queued", "running", "completed", "failed" ], "title": "Status" } }, "type": "object", "required": [ "sweep_id", "status" ], "title": "SweepCreatedResponse", "description": "202 response from POST /sweeps." }, "SweepDetailResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "status": { "type": "string", "enum": [ "queued", "running", "completed", "failed" ], "title": "Status" }, "mode": { "type": "string", "enum": [ "curated", "discover" ], "title": "Mode" }, "model_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Model Count" }, "ok_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Ok Count" }, "triggered_by_email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Triggered By Email" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" }, "request_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Request Config" }, "results": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Results" }, "summary": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Summary" }, "celery_task_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Celery Task Id" } }, "type": "object", "required": [ "id", "status", "mode", "created_at" ], "title": "SweepDetailResponse", "description": "Detail-view row \u2014 includes config, results, and summary." }, "SweepRequest": { "properties": { "mode": { "type": "string", "enum": [ "curated", "discover" ], "title": "Mode", "default": "curated" }, "models": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Models", "description": "Explicit subset of model ids; overrides mode discovery." }, "efforts": { "items": { "type": "string", "enum": [ "minimal", "low", "medium", "high" ] }, "type": "array", "minItems": 1, "title": "Efforts" }, "max_tokens": { "type": "integer", "maximum": 4096.0, "minimum": 1.0, "title": "Max Tokens", "default": 64 }, "prompt": { "type": "string", "title": "Prompt", "default": "In one sentence, what makes a good API?" }, "thinking_variants": { "type": "boolean", "title": "Thinking Variants", "default": true }, "concurrency": { "type": "integer", "maximum": 16.0, "minimum": 1.0, "title": "Concurrency", "default": 4 }, "region": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Region", "description": "Discover mode AWS region override." }, "skip_bedrock": { "type": "boolean", "title": "Skip Bedrock", "default": false }, "skip_openai": { "type": "boolean", "title": "Skip Openai", "default": false } }, "type": "object", "title": "SweepRequest", "description": "Body for POST /sweeps. All fields optional; defaults run a curated sweep." }, "SweepSummaryResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "status": { "type": "string", "enum": [ "queued", "running", "completed", "failed" ], "title": "Status" }, "mode": { "type": "string", "enum": [ "curated", "discover" ], "title": "Mode" }, "model_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Model Count" }, "ok_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Ok Count" }, "triggered_by_email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Triggered By Email" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Completed At" } }, "type": "object", "required": [ "id", "status", "mode", "created_at" ], "title": "SweepSummaryResponse", "description": "List-view row \u2014 omits the large per-model results blob." }, "SyncStatusResponse": { "properties": { "source_id": { "type": "string", "format": "uuid", "title": "Source Id" }, "source_status": { "type": "string", "title": "Source Status" }, "last_sync_job_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Last Sync Job Id" }, "last_sync_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Sync Status" }, "last_sync_started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Sync Started At" }, "last_sync_completed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Sync Completed At" }, "total_items": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Total Items" }, "processed_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Processed Count" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message" } }, "type": "object", "required": [ "source_id", "source_status" ], "title": "SyncStatusResponse" }, "SyncTriggerResponse": { "properties": { "job_id": { "type": "string", "format": "uuid", "title": "Job Id" }, "status": { "type": "string", "title": "Status" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "job_id", "status", "message" ], "title": "SyncTriggerResponse" }, "SynthesizeEvalFailureRequest": { "properties": { "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "n_failures": { "type": "integer", "maximum": 10.0, "minimum": 1.0, "title": "N Failures", "default": 1 }, "failure_kind": { "type": "string", "enum": [ "quality", "error" ], "title": "Failure Kind", "default": "quality" }, "score": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Score", "default": 0.62 }, "threshold": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Threshold", "default": 0.8 } }, "additionalProperties": false, "type": "object", "required": [ "agent_id" ], "title": "SynthesizeEvalFailureRequest", "description": "Fabricate failing eval runs for one agent and fire the REAL ``eval.failed`` emitter.\n\nDev-only (the route 404s in production). ``n_failures==1`` produces the single\npayload shape; ``>1`` produces the digest shape. ``failure_kind='quality'`` writes\n``COMPLETED`` runs with a failing score (these feed the sustained-failure window\nthat escalates to ``critical``); ``'error'`` writes ``ERRORED`` runs with no score\n(these never increment the sustained window)." }, "SynthesizeEvalFailureResponse": { "properties": { "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "eval_run_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Eval Run Ids" }, "payload": { "additionalProperties": true, "type": "object", "title": "Payload" }, "severity": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Severity" }, "sustained_count": { "type": "integer", "title": "Sustained Count" }, "dispatched": { "type": "boolean", "title": "Dispatched" }, "task_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Task Id" } }, "type": "object", "required": [ "session_id", "eval_run_ids", "payload", "severity", "sustained_count", "dispatched", "task_id" ], "title": "SynthesizeEvalFailureResponse", "description": "The fabricated session/runs plus the exact payload handed to ``dispatch``.\n\n``payload`` is ``{}`` and ``dispatched`` is ``False`` only if the emitter found\nnothing notifiable (should not happen for the shapes this endpoint fabricates)." }, "SystemContextVariableSpec": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "enum": [ "string", "int", "float", "bool", "enum" ], "title": "Type" }, "enum_values": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Enum Values" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" } }, "additionalProperties": false, "type": "object", "required": [ "name", "type" ], "title": "SystemContextVariableSpec", "description": "An immutable assistant input available to prompts, policies, and tools.\n\nAssistant scope intentionally has no ``source`` or ``reask_cap`` knobs. The source is\nstructurally ``system`` and the value is seeded once; extraction/re-ask semantics belong to\nworkflow-derived variables." }, "TTSDeliveryModeCapability": { "properties": { "values": { "items": { "type": "string", "enum": [ "STABLE", "BALANCED", "CREATIVE" ] }, "type": "array", "title": "Values" }, "default": { "type": "string", "enum": [ "STABLE", "BALANCED", "CREATIVE" ], "title": "Default" } }, "additionalProperties": false, "type": "object", "required": [ "values", "default" ], "title": "TTSDeliveryModeCapability" }, "TTSModelCapabilities": { "properties": { "multilingual": { "type": "boolean", "title": "Multilingual" }, "latency_tier": { "type": "string", "enum": [ "lowest", "low", "standard" ], "title": "Latency Tier" }, "max_sample_rate": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Max Sample Rate" }, "delivery_mode": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Delivery Mode" }, "expressive_speech": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Expressive Speech" }, "stability_presets": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Stability Presets" }, "tuning": { "$ref": "#/components/schemas/TTSTuningCapabilities" } }, "additionalProperties": false, "type": "object", "required": [ "multilingual", "latency_tier", "max_sample_rate", "tuning" ], "title": "TTSModelCapabilities", "description": "Stable, OpenAPI-visible capability contract for a catalog model.\n\n``tuning`` is deliberately required. The catalog is validated at import\ntime so an incomplete entry fails fast instead of exposing a model that\nclients cannot configure safely." }, "TTSModelListResponse": { "properties": { "models": { "items": { "$ref": "#/components/schemas/TTSModelOut" }, "type": "array", "title": "Models" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "total" ], "title": "TTSModelListResponse" }, "TTSModelOut": { "properties": { "provider": { "type": "string", "enum": [ "elevenlabs", "inworld" ], "title": "Provider" }, "external_id": { "type": "string", "title": "External Id" }, "display_name": { "type": "string", "title": "Display Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "is_default": { "type": "boolean", "title": "Is Default", "default": false }, "capabilities": { "$ref": "#/components/schemas/TTSModelCapabilities" } }, "type": "object", "required": [ "provider", "external_id", "display_name", "capabilities" ], "title": "TTSModelOut" }, "TTSSpeedCapability": { "properties": { "min": { "type": "number", "title": "Min" }, "max": { "type": "number", "title": "Max" }, "default": { "type": "number", "title": "Default" } }, "additionalProperties": false, "type": "object", "required": [ "min", "max", "default" ], "title": "TTSSpeedCapability" }, "TTSTemperatureCapability": { "properties": { "min_exclusive": { "type": "number", "title": "Min Exclusive" }, "max": { "type": "number", "title": "Max" }, "default": { "type": "number", "title": "Default" } }, "additionalProperties": false, "type": "object", "required": [ "min_exclusive", "max", "default" ], "title": "TTSTemperatureCapability" }, "TTSTuningCapabilities": { "properties": { "speed": { "$ref": "#/components/schemas/TTSSpeedCapability" }, "delivery_mode": { "anyOf": [ { "$ref": "#/components/schemas/TTSDeliveryModeCapability" }, { "type": "null" } ] }, "temperature": { "anyOf": [ { "$ref": "#/components/schemas/TTSTemperatureCapability" }, { "type": "null" } ] } }, "additionalProperties": false, "type": "object", "required": [ "speed" ], "title": "TTSTuningCapabilities", "description": "Controls a client may expose for one TTS model." }, "TeamCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "purpose": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Purpose" }, "mode": { "type": "string", "enum": [ "supervisor", "swarm" ], "title": "Mode", "default": "supervisor" }, "fallback_member_id": { "type": "string", "format": "uuid", "title": "Fallback Member Id" }, "initial_member_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Initial Member Id" }, "swarm_domain_hint": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Swarm Domain Hint" }, "swarm_max_hops": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Swarm Max Hops" }, "router_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Router Config Id" }, "router_model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "members": { "anyOf": [ { "items": { "$ref": "#/components/schemas/TeamMemberCreate" }, "type": "array" }, { "type": "null" } ], "title": "Members" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "memory_enabled": { "type": "boolean", "title": "Memory Enabled", "default": true } }, "type": "object", "required": [ "name", "fallback_member_id" ], "title": "TeamCreate" }, "TeamListResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "active_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Active Revision Id" }, "memory_enabled": { "type": "boolean", "title": "Memory Enabled", "default": true }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "created_at", "updated_at" ], "title": "TeamListResponse" }, "TeamMemberCreate": { "properties": { "assistant_id": { "type": "string", "format": "uuid", "title": "Assistant Id" }, "assistant_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assistant Revision Id" }, "router_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Router Name" }, "router_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Router Description" }, "examples": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Examples" }, "model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "position": { "type": "integer", "title": "Position", "default": 0 }, "enabled": { "type": "boolean", "title": "Enabled", "default": true } }, "type": "object", "required": [ "assistant_id" ], "title": "TeamMemberCreate" }, "TeamMemberResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "assistant_id": { "type": "string", "format": "uuid", "title": "Assistant Id" }, "assistant_name": { "type": "string", "title": "Assistant Name" }, "assistant_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assistant Revision Id" }, "router_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Router Name" }, "router_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Router Description" }, "examples": { "items": { "type": "string" }, "type": "array", "title": "Examples" }, "model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "position": { "type": "integer", "title": "Position" }, "enabled": { "type": "boolean", "title": "Enabled" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "assistant_id", "assistant_name", "position", "enabled", "created_at" ], "title": "TeamMemberResponse" }, "TeamMemberUpdate": { "properties": { "assistant_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assistant Revision Id" }, "router_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Router Name" }, "router_description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Router Description" }, "examples": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Examples" }, "model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "position": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Position" }, "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" } }, "type": "object", "title": "TeamMemberUpdate" }, "TeamResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "active_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Active Revision Id" }, "active_revision": { "anyOf": [ { "$ref": "#/components/schemas/TeamRevisionResponse" }, { "type": "null" } ] }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "memory_enabled": { "type": "boolean", "title": "Memory Enabled", "default": true }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "created_at", "updated_at" ], "title": "TeamResponse" }, "TeamRevisionCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "based_on_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Based On Revision Id" }, "purpose": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Purpose" }, "mode": { "type": "string", "enum": [ "supervisor", "swarm" ], "title": "Mode", "default": "supervisor" }, "fallback_member_id": { "type": "string", "format": "uuid", "title": "Fallback Member Id" }, "initial_member_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Initial Member Id" }, "swarm_domain_hint": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Swarm Domain Hint" }, "swarm_max_hops": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Swarm Max Hops" }, "router_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Router Config Id" }, "router_model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "members": { "anyOf": [ { "items": { "$ref": "#/components/schemas/TeamMemberCreate" }, "type": "array" }, { "type": "null" } ], "title": "Members" } }, "type": "object", "required": [ "name", "fallback_member_id" ], "title": "TeamRevisionCreate" }, "TeamRevisionResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "team_id": { "type": "string", "format": "uuid", "title": "Team Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "purpose": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Purpose" }, "mode": { "type": "string", "title": "Mode" }, "fallback_member_id": { "type": "string", "format": "uuid", "title": "Fallback Member Id" }, "initial_member_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Initial Member Id" }, "swarm_domain_hint": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Swarm Domain Hint" }, "swarm_max_hops": { "type": "integer", "title": "Swarm Max Hops" }, "router_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Router Config Id" }, "router_model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "members": { "items": { "$ref": "#/components/schemas/TeamMemberResponse" }, "type": "array", "title": "Members" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "team_id", "name", "mode", "fallback_member_id", "swarm_max_hops", "created_at", "updated_at" ], "title": "TeamRevisionResponse" }, "TeamUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "memory_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Memory Enabled" } }, "type": "object", "title": "TeamUpdate" }, "TeamVoiceConfigResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Organization Id" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "persona_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Persona Id" }, "voice_id": { "type": "string", "format": "uuid", "title": "Voice Id" }, "voice": { "$ref": "#/components/schemas/VoiceOut" }, "voice_tuning": { "additionalProperties": true, "type": "object", "title": "Voice Tuning" }, "stt_provider": { "type": "string", "title": "Stt Provider" }, "stt_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Stt Model" }, "stt_language": { "type": "string", "title": "Stt Language" }, "stt_provider_data": { "additionalProperties": true, "type": "object", "title": "Stt Provider Data" }, "tts_speed": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Tts Speed" }, "tts_provider_data": { "additionalProperties": true, "type": "object", "title": "Tts Provider Data" }, "vad_provider": { "type": "string", "title": "Vad Provider" }, "vad_provider_data": { "additionalProperties": true, "type": "object", "title": "Vad Provider Data" }, "local_vad_params": { "additionalProperties": true, "type": "object", "title": "Local Vad Params" }, "turn_analyzer_params": { "additionalProperties": true, "type": "object", "title": "Turn Analyzer Params" }, "interruption_sensitivity": { "type": "number", "title": "Interruption Sensitivity" }, "hard_turn_timeout_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Hard Turn Timeout Ms" }, "min_endpoint_delay_ms": { "type": "integer", "title": "Min Endpoint Delay Ms" }, "max_endpoint_delay_ms": { "type": "integer", "title": "Max Endpoint Delay Ms" }, "preemptive_generation_enabled": { "type": "boolean", "title": "Preemptive Generation Enabled" }, "end_call_phrases": { "items": { "type": "string" }, "type": "array", "title": "End Call Phrases" }, "pronunciation_overrides": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Pronunciation Overrides" }, "noise_cancellation_enabled": { "type": "boolean", "title": "Noise Cancellation Enabled" }, "noise_cancellation_provider": { "$ref": "#/components/schemas/NoiseCancellationProvider" }, "normalize_for_speech": { "type": "boolean", "title": "Normalize For Speech" }, "audio_in_sample_rate": { "type": "integer", "title": "Audio In Sample Rate" }, "audio_out_sample_rate": { "type": "integer", "title": "Audio Out Sample Rate" }, "metrics_enabled": { "type": "boolean", "title": "Metrics Enabled" }, "usage_metrics_enabled": { "type": "boolean", "title": "Usage Metrics Enabled" }, "heartbeats_period_secs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Heartbeats Period Secs" }, "idle_pipeline_timeout_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Idle Pipeline Timeout Ms" }, "language": { "type": "string", "title": "Language" }, "locale": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Locale" }, "multilingual_enabled": { "type": "boolean", "title": "Multilingual Enabled" }, "multilingual_languages": { "items": { "type": "string" }, "type": "array", "title": "Multilingual Languages" }, "linked_agent_count": { "type": "integer", "title": "Linked Agent Count", "default": 0 }, "linked_agent_names": { "items": { "type": "string" }, "type": "array", "title": "Linked Agent Names" }, "linked_team_count": { "type": "integer", "title": "Linked Team Count", "default": 0 }, "linked_team_names": { "items": { "type": "string" }, "type": "array", "title": "Linked Team Names" }, "metadata_": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "first_speaking_config": { "anyOf": [ { "$ref": "#/components/schemas/FirstSpeakingConfig" }, { "type": "null" } ] }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings" }, "effective_stt_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Effective Stt Model" }, "effective_stt_provider_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Effective Stt Provider Data" }, "effective_tts_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Effective Tts Model" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "source": { "type": "string", "enum": [ "inline", "saved" ], "title": "Source" }, "saved_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Saved Config Id" }, "has_inline_fallback": { "type": "boolean", "title": "Has Inline Fallback" } }, "additionalProperties": false, "type": "object", "required": [ "id", "voice_id", "voice", "stt_provider", "stt_language", "vad_provider", "interruption_sensitivity", "min_endpoint_delay_ms", "max_endpoint_delay_ms", "preemptive_generation_enabled", "noise_cancellation_enabled", "noise_cancellation_provider", "normalize_for_speech", "audio_in_sample_rate", "audio_out_sample_rate", "metrics_enabled", "usage_metrics_enabled", "language", "multilingual_enabled", "created_at", "updated_at", "source", "has_inline_fallback" ], "title": "TeamVoiceConfigResponse", "description": "Config response for a team, augmented with source metadata.\n\nMirrors ``AgentVoiceConfigResponse``. ``source`` is ``\"saved\"`` when the\nteam references a saved config via ``Team.voice_config_id``, or\n``\"inline\"`` when using its own 1:1 row. Teams carry no first-speaking\nconfig (the greeting comes from the team's default member), so\n``first_speaking_config`` is always ``None`` here. ``has_inline_fallback``\nreports whether a team-owned inline row exists; the UI uses it to know\nwhether unlinking is safe (the team falls back to its preserved inline\nconfig) or would leave the team with no voice config." }, "TemplateError": { "properties": { "slot": { "type": "string", "title": "Slot" }, "line": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Line" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "slot", "message" ], "title": "TemplateError", "description": "One per-slot validation error (strict-env render against the sample payload)." }, "TemplateField": { "properties": { "label": { "type": "string", "maxLength": 4000, "minLength": 1, "title": "Label" }, "value": { "type": "string", "maxLength": 4000, "title": "Value" } }, "additionalProperties": false, "type": "object", "required": [ "label", "value" ], "title": "TemplateField", "description": "One label/value fact line. Both sides are mrkdwn Jinja strings." }, "TemplatePreviewRequest": { "properties": { "slots": { "anyOf": [ { "$ref": "#/components/schemas/TemplateSlots" }, { "type": "null" } ] }, "payload": { "anyOf": [ { "$ref": "#/components/schemas/Payload" }, { "type": "null" } ] } }, "additionalProperties": false, "type": "object", "title": "TemplatePreviewRequest" }, "TemplatePreviewResponse": { "properties": { "text": { "type": "string", "title": "Text" }, "blocks": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Blocks" }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings" } }, "type": "object", "required": [ "text", "blocks", "warnings" ], "title": "TemplatePreviewResponse", "description": "Rendered preview. ``blocks`` ARE returned even though v1 delivery is text-only." }, "TemplateSlots": { "properties": { "title": { "type": "string", "maxLength": 4000, "minLength": 1, "title": "Title" }, "body": { "type": "string", "maxLength": 4000, "title": "Body", "default": "" }, "fields": { "items": { "$ref": "#/components/schemas/TemplateField" }, "type": "array", "maxItems": 10, "title": "Fields" }, "link_text": { "anyOf": [ { "type": "string", "maxLength": 4000 }, { "type": "null" } ], "title": "Link Text" }, "link_url": { "anyOf": [ { "type": "string", "maxLength": 4000 }, { "type": "null" } ], "title": "Link Url" } }, "additionalProperties": false, "type": "object", "required": [ "title" ], "title": "TemplateSlots", "description": "The four authorable slots. ``extra=\"forbid\"`` so an operator can't smuggle\nunknown keys past validation (mirrors the catalog's threshold configs)." }, "TemplateValidateRequest": { "properties": { "slots": { "$ref": "#/components/schemas/TemplateSlots" }, "payload": { "anyOf": [ { "$ref": "#/components/schemas/Payload" }, { "type": "null" } ] } }, "additionalProperties": false, "type": "object", "required": [ "slots" ], "title": "TemplateValidateRequest" }, "TemplateValidateResponse": { "properties": { "valid": { "type": "boolean", "title": "Valid" }, "errors": { "items": { "$ref": "#/components/schemas/TemplateError" }, "type": "array", "title": "Errors" } }, "type": "object", "required": [ "valid", "errors" ], "title": "TemplateValidateResponse", "description": "Template errors are a 200 with ``valid=false`` \u2014 never a 5xx." }, "TestChatStartRequest": { "properties": { "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "assistant_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assistant Revision Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "team_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Revision Id" }, "tool_input_overrides": { "anyOf": [ { "additionalProperties": { "additionalProperties": { "$ref": "#/components/schemas/InputArgConfig" }, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Tool Input Overrides" }, "context_variables": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Context Variables" }, "test_features": { "anyOf": [ { "$ref": "#/components/schemas/TestSessionFeatureInput" }, { "type": "null" } ], "description": "Test-session feature toggles. Omitted means all off. The resolved snapshot is echoed back as test_features on TestChatStartResponse." } }, "type": "object", "title": "TestChatStartRequest", "description": "Mint a fresh ``session_type=\"test\"`` chat session for the dashboard.\n\nThe agent-detail Test chat panel uses this. Identity is controlled by\n``test_features.identity_resolution`` (default off): off mints a throwaway\nrandom ``end_user_id`` with NO identity-graph call, so dev-side Neo4j churn\n(wipes, merges, deletes) can never strand the panel with a stale uid; on,\nthe session binds to the authenticated dashboard member's resolved\n``internal:`` EndUser, and every \"Reset\" / \"End session\"\nstill mints a fresh ``Conversation`` row but reuses that same identity.\nMirrors ``POST /v1/voice/web-call`` for text/API.\n\nBind to exactly one of a single Assistant (``agent_id``) or a Team\n(``team_id`` + optional ``team_revision_id``) \u2014 the same single-XOR-team\ninvariant the runtime ``conversations`` table enforces. When ``team_id`` is\ngiven without ``team_revision_id``, the handler resolves the team's active\nrevision." }, "TestChatStartResponse": { "properties": { "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "end_user_id": { "type": "string", "format": "uuid", "title": "End User Id" }, "test_features": { "$ref": "#/components/schemas/TestSessionFeatures" } }, "type": "object", "required": [ "session_id", "end_user_id", "test_features" ], "title": "TestChatStartResponse" }, "TestSendDestinationResult": { "properties": { "ok": { "type": "boolean", "title": "Ok" }, "provider_message_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider Message Id" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "transport": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Transport" } }, "type": "object", "required": [ "ok" ], "title": "TestSendDestinationResult" }, "TestSendRequest": { "properties": { "payload": { "additionalProperties": true, "type": "object", "title": "Payload" } }, "additionalProperties": false, "type": "object", "title": "TestSendRequest", "description": "Fire a notification type through the real ``notify()`` path (ENG-660)." }, "TestSendResponse": { "properties": { "outcome": { "type": "string", "title": "Outcome" }, "event_type": { "type": "string", "title": "Event Type" }, "delivered": { "type": "boolean", "title": "Delivered" }, "send_results": { "items": { "$ref": "#/components/schemas/TestSendDestinationResult" }, "type": "array", "title": "Send Results" } }, "type": "object", "required": [ "outcome", "event_type", "delivered", "send_results" ], "title": "TestSendResponse" }, "TestSessionFeatureInput": { "properties": { "identity_resolution": { "type": "boolean", "title": "Identity Resolution", "default": false }, "memory": { "type": "boolean", "title": "Memory", "default": false }, "summarization": { "type": "boolean", "title": "Summarization", "default": false }, "extraction": { "type": "boolean", "title": "Extraction", "default": false }, "evaluations": { "type": "boolean", "title": "Evaluations", "default": false }, "knowledge_gap_analysis": { "type": "boolean", "title": "Knowledge Gap Analysis", "default": false } }, "additionalProperties": false, "type": "object", "title": "TestSessionFeatureInput", "description": "Caller-supplied toggles. Unknown fields are rejected." }, "TestSessionFeatures": { "properties": { "version": { "type": "integer", "const": 1, "title": "Version", "default": 1 }, "identity_resolution": { "type": "boolean", "title": "Identity Resolution" }, "memory": { "type": "boolean", "title": "Memory" }, "summarization": { "type": "boolean", "title": "Summarization" }, "extraction": { "type": "boolean", "title": "Extraction" }, "evaluations": { "type": "boolean", "title": "Evaluations" }, "knowledge_gap_analysis": { "type": "boolean", "title": "Knowledge Gap Analysis" } }, "additionalProperties": false, "type": "object", "required": [ "identity_resolution", "memory", "summarization", "extraction", "evaluations", "knowledge_gap_analysis" ], "title": "TestSessionFeatures", "description": "Resolved, immutable snapshot persisted on a test conversation." }, "TextBurstConfig": { "properties": { "enabled": { "type": "boolean", "title": "Enabled", "default": false }, "policy": { "type": "string", "enum": [ "live", "debounced" ], "title": "Policy", "default": "live" } }, "type": "object", "title": "TextBurstConfig", "description": "Text-channel multi-message (\"burst\") behavior.\n\n``enabled=False`` (default) \u21d2 the persona sends one message per turn.\nWhen enabled, the persona is instructed to fragment a turn into several\nshort bubbles (one per line). ``policy`` decides how the agent-under-test\nsees them:\n\n- ``live`` \u2014 each bubble is fed as its own turn; the agent replies to\n each (mirrors the production HTTP chat channel: no debounce).\n- ``debounced``\u2014 bubbles are newline-joined into ONE turn; the agent replies\n once (models a typing-debounce frontend)." }, "TextDiff": { "properties": { "segments": { "items": { "$ref": "#/components/schemas/TextDiffSegment" }, "type": "array", "title": "Segments" } }, "type": "object", "required": [ "segments" ], "title": "TextDiff", "description": "Line-level prose diff built from difflib.SequenceMatcher opcodes." }, "TextDiffSegment": { "properties": { "op": { "type": "string", "enum": [ "equal", "insert", "delete" ], "title": "Op" }, "text": { "type": "string", "title": "Text" } }, "type": "object", "required": [ "op", "text" ], "title": "TextDiffSegment", "description": "One segment from a prose diff (equal / insert / delete)." }, "TextPosition": { "properties": { "type": { "type": "string", "const": "text", "title": "Type", "default": "text" }, "start_char": { "type": "integer", "minimum": 0.0, "title": "Start Char" }, "end_char": { "type": "integer", "minimum": 0.0, "title": "End Char" } }, "type": "object", "required": [ "start_char", "end_char" ], "title": "TextPosition", "description": "Character-offset position for text and markdown chunks.\n\n`start_char` and `end_char` are **Unicode code-point** offsets into the\ndecoded UTF-8 source text. In Python: ``text[start_char:end_char]``.\n\nJavaScript's ``String.prototype.slice()`` counts UTF-16 code units, which\ndiffer from code-point offsets for non-BMP characters (emoji, some CJK).\nJS consumers should convert with ``Array.from(str)`` before slicing \u2014 see\nthe API docs for a helper." }, "ThreadResponse": { "properties": { "provider_thread_id": { "type": "string", "title": "Provider Thread Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "subject": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Subject" }, "participants": { "items": { "type": "string" }, "type": "array", "title": "Participants" }, "message_count": { "type": "integer", "title": "Message Count" }, "last_message_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Message At" }, "messages": { "items": { "$ref": "#/components/schemas/src__communication__email__threads__schemas__MessageResponse" }, "type": "array", "title": "Messages" } }, "additionalProperties": false, "type": "object", "required": [ "provider_thread_id", "session_id", "subject", "message_count", "last_message_at", "messages" ], "title": "ThreadResponse", "description": "Thread snapshot.\n\n``participants`` is derived from the union of senders / recipients\nacross the thread's messages (lowercased addresses, dedup, order =\nfirst-seen)." }, "TimeoutAnalysisRow": { "properties": { "tool_id": { "type": "string", "title": "Tool Id" }, "tool_name": { "type": "string", "title": "Tool Name" }, "tool_type": { "type": "string", "title": "Tool Type" }, "invocation_count": { "type": "integer", "title": "Invocation Count" }, "timeout_count": { "type": "integer", "title": "Timeout Count" }, "timeout_rate": { "type": "number", "title": "Timeout Rate" }, "p95_latency_ms": { "type": "number", "title": "P95 Latency Ms" }, "max_latency_ms": { "type": "number", "title": "Max Latency Ms" } }, "type": "object", "required": [ "tool_id", "tool_name", "tool_type", "invocation_count", "timeout_count", "timeout_rate", "p95_latency_ms", "max_latency_ms" ], "title": "TimeoutAnalysisRow" }, "TokenBreakdownRow": { "properties": { "served_model": { "type": "string", "title": "Served Model" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" }, "input_tokens": { "type": "integer", "title": "Input Tokens" }, "output_tokens": { "type": "integer", "title": "Output Tokens" }, "cache_read_tokens": { "type": "integer", "title": "Cache Read Tokens" }, "cache_write_tokens": { "type": "integer", "title": "Cache Write Tokens" }, "total_tokens": { "type": "integer", "title": "Total Tokens" }, "billed_tokens": { "type": "integer", "title": "Billed Tokens" }, "invocations": { "type": "integer", "title": "Invocations" } }, "type": "object", "required": [ "served_model", "input_tokens", "output_tokens", "cache_read_tokens", "cache_write_tokens", "total_tokens", "billed_tokens", "invocations" ], "title": "TokenBreakdownRow" }, "TokenCount": { "properties": { "input_tokens": { "type": "integer", "title": "Input Tokens" }, "output_tokens": { "type": "integer", "title": "Output Tokens" }, "total_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Total Tokens" } }, "type": "object", "required": [ "input_tokens", "output_tokens" ], "title": "TokenCount" }, "TokenEfficiencyRow": { "properties": { "served_model": { "type": "string", "title": "Served Model" }, "input_tokens": { "type": "integer", "title": "Input Tokens" }, "output_tokens": { "type": "integer", "title": "Output Tokens" }, "cache_read_tokens": { "type": "integer", "title": "Cache Read Tokens" }, "invocations": { "type": "integer", "title": "Invocations" }, "output_per_input_ratio": { "type": "number", "title": "Output Per Input Ratio" }, "cache_read_ratio": { "type": "number", "title": "Cache Read Ratio" }, "avg_output_tokens": { "type": "number", "title": "Avg Output Tokens" } }, "type": "object", "required": [ "served_model", "input_tokens", "output_tokens", "cache_read_tokens", "invocations", "output_per_input_ratio", "cache_read_ratio", "avg_output_tokens" ], "title": "TokenEfficiencyRow" }, "ToolCall": { "properties": { "id": { "type": "string", "title": "Id" }, "type": { "type": "string", "title": "Type", "default": "function" }, "function": { "$ref": "#/components/schemas/ToolCallFunction" } }, "type": "object", "required": [ "id", "function" ], "title": "ToolCall" }, "ToolCallEntry": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id" }, "assistant_turn_id": { "type": "string", "format": "uuid", "title": "Assistant Turn Id" }, "name": { "type": "string", "title": "Name" }, "arguments": { "type": "string", "title": "Arguments" }, "arguments_parsed": { "anyOf": [ {}, { "type": "null" } ], "title": "Arguments Parsed" }, "result": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Result" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "latency_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Latency Ms" } }, "type": "object", "required": [ "tool_call_id", "assistant_turn_id", "name", "arguments" ], "title": "ToolCallEntry", "description": "One tool invocation in the session." }, "ToolCallFunction": { "properties": { "name": { "type": "string", "title": "Name" }, "arguments": { "type": "string", "title": "Arguments" } }, "type": "object", "required": [ "name", "arguments" ], "title": "ToolCallFunction" }, "ToolCompatibilityFindingResponse": { "properties": { "severity": { "type": "string", "enum": [ "blocking", "advisory" ], "title": "Severity" }, "assistant_id": { "type": "string", "format": "uuid", "title": "Assistant Id" }, "assistant_revision_id": { "type": "string", "format": "uuid", "title": "Assistant Revision Id" }, "revision_state": { "type": "string", "enum": [ "active", "candidate", "historical" ], "title": "Revision State" }, "finding_type": { "type": "string", "title": "Finding Type" }, "field_path": { "type": "string", "title": "Field Path" }, "detail": { "type": "string", "title": "Detail" }, "configuration_scope": { "type": "string", "enum": [ "assistant_tool_default", "agent_node_tool", "action_step_tool" ], "title": "Configuration Scope" }, "workflow_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Workflow Id" }, "workflow_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Workflow Revision Id" }, "component_node_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Component Node Id" }, "graph_node_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Graph Node Id" }, "graph_node_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Graph Node Name" }, "step_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Step Id" }, "tool_ref_index": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Tool Ref Index" } }, "type": "object", "required": [ "severity", "assistant_id", "assistant_revision_id", "revision_state", "finding_type", "field_path", "detail", "configuration_scope" ], "title": "ToolCompatibilityFindingResponse", "description": "One frontend-navigable tool-revision compatibility finding." }, "ToolCompatibilityReportResponse": { "properties": { "tool_id": { "type": "string", "format": "uuid", "title": "Tool Id" }, "old_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Old Revision Id" }, "new_revision_id": { "type": "string", "format": "uuid", "title": "New Revision Id" }, "findings": { "items": { "$ref": "#/components/schemas/ToolCompatibilityFindingResponse" }, "type": "array", "title": "Findings" }, "has_blocking": { "type": "boolean", "title": "Has Blocking" }, "active_blocking_count": { "type": "integer", "title": "Active Blocking Count" }, "active_blocking_finding_count": { "type": "integer", "title": "Active Blocking Finding Count" }, "active_finding_count": { "type": "integer", "title": "Active Finding Count" }, "affected_assistant_count": { "type": "integer", "title": "Affected Assistant Count" } }, "type": "object", "required": [ "tool_id", "old_revision_id", "new_revision_id", "has_blocking", "active_blocking_count", "active_blocking_finding_count", "active_finding_count", "affected_assistant_count" ], "title": "ToolCompatibilityReportResponse", "description": "Impact report shared by preflight analysis and successful promotion.\n\nPre-prod: findings are advisory warnings \u2014 promotion always succeeds. The\n``has_blocking`` / ``active_blocking_*`` fields retain their literal\nblocking semantics (and therefore remain false/zero today)." }, "ToolCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "tool_type": { "$ref": "#/components/schemas/ToolType", "default": "api_call" }, "configuration": { "anyOf": [ { "$ref": "#/components/schemas/APICallConfiguration" }, { "type": "null" } ] }, "transfer_target": { "anyOf": [ { "$ref": "#/components/schemas/TransferTargetInput" }, { "type": "null" } ] }, "response_schema": { "anyOf": [ { "$ref": "#/components/schemas/ResponseFieldSelector" }, { "type": "null" } ] }, "input_defaults": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/InputArgConfig" }, "type": "object" }, { "type": "null" } ], "title": "Input Defaults" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "type": "object", "required": [ "name" ], "title": "ToolCreate" }, "ToolExecuteRequest": { "properties": { "input": { "additionalProperties": true, "type": "object", "title": "Input" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" } }, "type": "object", "title": "ToolExecuteRequest" }, "ToolExecuteResponse": { "properties": { "status_code": { "type": "integer", "title": "Status Code" }, "headers": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Headers" }, "body": { "title": "Body" }, "success": { "type": "boolean", "title": "Success", "default": true }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "execution_time_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Execution Time Ms" }, "request_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Request Url" }, "request_method": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Request Method" } }, "type": "object", "required": [ "status_code" ], "title": "ToolExecuteResponse" }, "ToolInfo": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" }, "input_schema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Input Schema" } }, "type": "object", "required": [ "name", "description" ], "title": "ToolInfo", "description": "One discovered MCP tool, as shown in the UI dropdown." }, "ToolInputDefaultsEntry": { "properties": { "input_defaults": { "additionalProperties": { "$ref": "#/components/schemas/InputArgConfig" }, "type": "object", "title": "Input Defaults" }, "resolved": { "type": "boolean", "title": "Resolved" }, "default_count": { "type": "integer", "title": "Default Count" }, "pinned_count": { "type": "integer", "title": "Pinned Count" }, "stale_input_fields": { "items": { "type": "string" }, "type": "array", "title": "Stale Input Fields" }, "merged_input_preview": { "additionalProperties": { "$ref": "#/components/schemas/JsonValue" }, "type": "object", "title": "Merged Input Preview" } }, "type": "object", "required": [ "input_defaults", "resolved", "default_count", "pinned_count", "stale_input_fields", "merged_input_preview" ], "title": "ToolInputDefaultsEntry", "description": "The enriched per-tool-key view of stored keyed operator config (GET surface).\n\nMirrors the org-level ``ConnectionToolResponse`` computed fields, but one\nentry per tool key. ``resolved`` is ``False`` when the key no longer maps to\nan enabled org-owned tool \u2014 in that case ``stale_input_fields`` lists every\nconfigured field and ``merged_input_preview`` is ``{}`` (the config is\nretained, never auto-deleted; drift is surfaced, not corrected)." }, "ToolInputDefaultsPutRequest": { "properties": { "tools": { "anyOf": [ { "additionalProperties": { "additionalProperties": { "$ref": "#/components/schemas/InputArgConfig" }, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Tools" } }, "additionalProperties": false, "type": "object", "title": "ToolInputDefaultsPutRequest", "description": "Full-replace write body for a revision's keyed tool-input defaults.\n\n``tools`` is the whole keyed map ``{tool_key: {field: {value, type}}}``;\n``null`` or ``{}`` clears all configured defaults for the revision (the\nsetter writes SQL NULL). ``extra=\"forbid\"`` rejects stray top-level keys; the\ninner ``InputArgConfig`` tolerates the legacy flat ``{field: value}`` shape." }, "ToolInputDefaultsViewResponse": { "properties": { "tools": { "additionalProperties": { "$ref": "#/components/schemas/ToolInputDefaultsEntry" }, "type": "object", "title": "Tools" } }, "type": "object", "required": [ "tools" ], "title": "ToolInputDefaultsViewResponse", "description": "GET response for an agent/workflow revision's keyed tool-input defaults." }, "ToolListResponse": { "properties": { "tools": { "items": { "$ref": "#/components/schemas/ToolInfo" }, "type": "array", "title": "Tools" } }, "type": "object", "required": [ "tools" ], "title": "ToolListResponse", "description": "Response body for ``GET /v1/mcp-chat/tools``." }, "ToolRef": { "properties": { "kind": { "type": "string", "enum": [ "api", "integration", "util", "kb" ], "title": "Kind" }, "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Id" }, "slug": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Slug" }, "output_bindings": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Output Bindings" }, "input_defaults": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/InputArgConfig" }, "type": "object" }, { "type": "null" } ], "title": "Input Defaults" } }, "type": "object", "required": [ "kind" ], "title": "ToolRef", "description": "Canonical tool reference \u2014 API tool, integration tool, built-in util, or KB retrieval.\n\n``util`` lets a graph author explicitly opt a built-in utility (``util:*``)\ninto a node's user-declared tool surface.\n\n``kb`` is the runtime-synthesized retrieval reference for an attached knowledge\nbase (``id`` = the KB's UUID). Graphs author KB attachment via\n``KnowledgeBaseRef`` (node- or step-level), never by storing a ``kb`` ToolRef;\nthe runtime builds these when surfacing a KB as a model-callable tool or when\nexecuting a ``knowledge_retrieval`` action step.\n\n``output_bindings`` maps a declared context-variable name to a dot-path into\nthis tool's result payload (``record_zip: \"investmentProperty.address.zip\"``).\nWhen the tool returns successfully on an agent node, the runtime binds the\nselected fields into ``context_vars`` MECHANICALLY \u2014 no LLM transcription \u2014\nso downstream expressions (``eq_normalized(property_zip, record_zip, \"zip\")``)\ncompare against ground truth. A missing field or a null value leaves the\nvariable unset, which expressions observe via ``missing()`` \u2014 that IS\nthe mechanical lookup-failure signal; nothing extra is recorded.\n\n``input_defaults`` is the operator-set tool-input config (ENG-637/674) folded\ninline onto the attachment: ``{field: {\"value\": ..., \"type\": \"default\"|\"pinned\"}}``.\nThe ref's own ``canonical_key()`` is the implied tool key, so the attachment\nand its arg defaults/pins live as one entry (no parallel keyed column). Used by\nthe agent attachment path; the workflow compiler never sets it (workflow\ntool-input config lives on ``WorkflowRevision.tool_input_defaults``), and it\ndoes not feed the compile cache hash \u2014 so leaving it ``None`` on compiled graph\nrefs is a no-op. ``None`` = no operator config on this attachment." }, "ToolResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "tool_type": { "$ref": "#/components/schemas/ToolType" }, "active_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Active Revision Id" }, "active_revision": { "anyOf": [ { "$ref": "#/components/schemas/ToolRevisionResponse" }, { "type": "null" } ] }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "description", "tool_type", "active_revision_id", "created_at", "updated_at" ], "title": "ToolResponse" }, "ToolResult": { "properties": { "tool_call_id": { "type": "string", "title": "Tool Call Id" }, "output": { "type": "string", "title": "Output" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" } }, "type": "object", "required": [ "tool_call_id", "output" ], "title": "ToolResult" }, "ToolRevisionCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "based_on_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Based On Revision Id" }, "configuration": { "anyOf": [ { "$ref": "#/components/schemas/APICallConfiguration" }, { "type": "null" } ] }, "transfer_target": { "anyOf": [ { "$ref": "#/components/schemas/TransferTargetInput" }, { "type": "null" } ] }, "response_schema": { "anyOf": [ { "$ref": "#/components/schemas/ResponseFieldSelector" }, { "type": "null" } ] }, "input_defaults": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/InputArgConfig" }, "type": "object" }, { "type": "null" } ], "title": "Input Defaults" } }, "type": "object", "required": [ "name" ], "title": "ToolRevisionCreate" }, "ToolRevisionResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "tool_id": { "type": "string", "format": "uuid", "title": "Tool Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "configuration": { "anyOf": [ { "$ref": "#/components/schemas/APICallConfiguration" }, { "type": "null" } ] }, "transfer_target": { "anyOf": [ { "$ref": "#/components/schemas/TransferTargetView" }, { "type": "null" } ] }, "response_schema": { "anyOf": [ { "$ref": "#/components/schemas/ResponseFieldSelector" }, { "type": "null" } ] }, "status": { "type": "string", "title": "Status" }, "has_secrets": { "type": "boolean", "title": "Has Secrets", "default": false }, "input_defaults": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/InputArgConfig" }, "type": "object" }, { "type": "null" } ], "title": "Input Defaults" }, "compatibility": { "anyOf": [ { "$ref": "#/components/schemas/ToolCompatibilityReportResponse" }, { "type": "null" } ] }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "default_count": { "type": "integer", "title": "Default Count", "description": "How many input variables carry an operator *default* (ENG-590).", "readOnly": true }, "pinned_count": { "type": "integer", "title": "Pinned Count", "description": "How many input variables are operator-*pinned* (ENG-590).", "readOnly": true }, "stale_input_fields": { "items": { "type": "string" }, "type": "array", "title": "Stale Input Fields", "description": "Configured variables removed/renamed/retyped by an operator edit.", "readOnly": true }, "merged_input_preview": { "additionalProperties": true, "type": "object", "title": "Merged Input Preview", "description": "The input schema with each operator value injected as ``default``.", "readOnly": true } }, "type": "object", "required": [ "id", "tool_id", "name", "description", "status", "created_by", "created_at", "updated_at", "default_count", "pinned_count", "stale_input_fields", "merged_input_preview" ], "title": "ToolRevisionResponse" }, "ToolRevisionTestRequest": { "properties": { "input": { "additionalProperties": true, "type": "object", "title": "Input" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "response_field_map": { "anyOf": [ { "$ref": "#/components/schemas/ResponseFieldSelector" }, { "type": "null" } ] } }, "additionalProperties": false, "type": "object", "title": "ToolRevisionTestRequest", "description": "Preview a revision's response + narrowing without persisting (ENG-631).\n\nRuns the revision's HTTP config and returns the RAW body plus a ``narrowed``\npreview. ``response_field_map`` is an optional unsaved selection to preview;\nwhen omitted the router falls back to the revision's saved\n``response_schema``. Mirrors the integrations ``test-invoke`` surface." }, "ToolRevisionTestResponse": { "properties": { "status_code": { "type": "integer", "title": "Status Code" }, "headers": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Headers" }, "body": { "title": "Body" }, "narrowed": { "anyOf": [ {}, { "type": "null" } ], "title": "Narrowed" }, "success": { "type": "boolean", "title": "Success", "default": true }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "execution_time_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Execution Time Ms" }, "request_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Request Url" }, "request_method": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Request Method" } }, "type": "object", "required": [ "status_code" ], "title": "ToolRevisionTestResponse", "description": "Raw response body + narrowed preview for the dashboard field-map editor.\n\n``body`` is always the RAW upstream response (never narrowed). ``narrowed``\nis what the agent would receive after applying the effective field map\n(request override \u2192 saved ``response_schema``); ``None`` when no map applies." }, "ToolRevisionUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "configuration": { "anyOf": [ { "$ref": "#/components/schemas/APICallConfiguration" }, { "type": "null" } ] }, "transfer_target": { "anyOf": [ { "$ref": "#/components/schemas/TransferTargetInput" }, { "type": "null" } ] }, "response_schema": { "anyOf": [ { "$ref": "#/components/schemas/ResponseFieldSelector" }, { "type": "null" } ] }, "status": { "anyOf": [ { "$ref": "#/components/schemas/ToolStatus" }, { "type": "null" } ] }, "input_defaults": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/InputArgConfig" }, "type": "object" }, { "type": "null" } ], "title": "Input Defaults" } }, "type": "object", "title": "ToolRevisionUpdate", "description": "Mutable fields on a single ``ToolRevision``.\n\n``input_defaults`` is the operator-set input-arg config for input variables\n(``{variable_name: {\"value\": ..., \"type\": \"default\"|\"pinned\"}}`` \u2014 ENG-590): a\n``default`` the agent may override, or a ``pinned`` value it cannot; neither is\ninjected at runtime in this scope. It is validated at the service layer against\nthe revision's *effective* ``variables`` (the row + any ``configuration`` in the\nsame request), so a wrong-type value or unknown variable is rejected there with\na 422.\n\nUnlike the sibling fields (which use ``is not None`` gating), ``input_defaults``\nis written via ``model_fields_set`` so an explicit ``null`` clears all config\nwhile omitting the field is a no-op." }, "ToolStatus": { "type": "string", "enum": [ "active", "deprecated", "disabled" ], "title": "ToolStatus" }, "ToolType": { "type": "string", "enum": [ "api_call", "call_transfer" ], "title": "ToolType" }, "ToolUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "tool_type": { "anyOf": [ { "$ref": "#/components/schemas/ToolType" }, { "type": "null" } ] }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "type": "object", "title": "ToolUpdate" }, "TopRetrievedDocumentRow": { "properties": { "document_id": { "type": "string", "title": "Document Id" }, "kb_id": { "type": "string", "title": "Kb Id" }, "hit_count": { "type": "integer", "title": "Hit Count" }, "sum_score": { "type": "number", "title": "Sum Score" }, "avg_score": { "type": "number", "title": "Avg Score" }, "max_score": { "type": "number", "title": "Max Score" }, "best_rank": { "type": "integer", "title": "Best Rank" } }, "type": "object", "required": [ "document_id", "kb_id", "hit_count", "sum_score", "avg_score", "max_score", "best_rank" ], "title": "TopRetrievedDocumentRow" }, "TraceNodeGroup": { "properties": { "node": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Node" }, "steps": { "items": { "$ref": "#/components/schemas/TraceStep" }, "type": "array", "title": "Steps" } }, "additionalProperties": false, "type": "object", "required": [ "steps" ], "title": "TraceNodeGroup", "description": "A node-level sub-group within a turn (Phase D): a run of consecutive steps that share the\nsame enclosing workflow node, so a multi-node turn reads as a tree instead of a flat list.\n\n``node`` is the resolved node label (from the step's ``customer.step`` detail) or ``None`` for\nturn-level steps with no enclosing node (a plain agent turn, a routing decision). The reply and\nthe \"asked for more information\" step ARE attributed to the node whose responder produced them,\nso a workflow trace answers \"which node said this?\".\nThe leaf stays a flat :class:`TraceStep` \u2014 grouping only adds structure, never rewrites a row." }, "TraceSessionHeader": { "properties": { "channel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel" }, "customer": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Customer" }, "agent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Agent" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "ended_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Ended At" }, "outcome": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Outcome" }, "memory": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Memory" } }, "additionalProperties": false, "type": "object", "title": "TraceSessionHeader", "description": "Session-level facts shown ONCE at the top of the trace (never repeated per turn).\n\nDerived from the conversation row + the session-lane steps, so the timeline opens with a single\n'who / what / outcome' block instead of burying identity / memory / start / end events inside\nthe turn stream." }, "TraceStep": { "properties": { "kind": { "type": "string", "title": "Kind" }, "actor": { "type": "string", "enum": [ "Customer", "Agent", "System" ], "title": "Actor" }, "title": { "type": "string", "title": "Title" }, "summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Summary" }, "status": { "type": "string", "enum": [ "Succeeded", "Failed", "Skipped", "In Progress" ], "title": "Status" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "ended_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Ended At" }, "duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Ms" }, "turn_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Turn Id" }, "details": { "additionalProperties": true, "type": "object", "title": "Details" } }, "additionalProperties": false, "type": "object", "required": [ "kind", "actor", "title", "status", "started_at" ], "title": "TraceStep", "description": "One row in the customer-readable session trace." }, "TraceTurn": { "properties": { "turn_id": { "type": "string", "title": "Turn Id" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "customer_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Customer Message" }, "ttft_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Ttft Ms" }, "duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Ms" }, "groups": { "items": { "$ref": "#/components/schemas/TraceNodeGroup" }, "type": "array", "title": "Groups" } }, "additionalProperties": false, "type": "object", "required": [ "turn_id", "started_at", "groups" ], "title": "TraceTurn", "description": "One turn's steps, ordered chronologically and clustered into node sub-groups (Phase D).\n\n``customer_message`` is the inbound message that opened the turn (surfaced in the turn HEADER\nrather than as a step). ``ttft_ms`` (time to the model's first token) and ``duration_ms`` (the\nturn's total end-to-end duration) are the two per-turn latencies \u2014 both surfaced in the header\nrather than as a standalone Turn Latency step \u2014 so the timeline reads\n``Turn N \u00b7 Customer: \"\u2026\" \u00b7 first token 0.4s \u00b7 1.2s`` above the work the agent did. Both are\nreported on EVERY channel (text via the product projector, voice via the live latency observer),\nso the frontend renders one shape regardless of channel." }, "TranscriptPtr": { "properties": { "conversation_id": { "type": "string", "format": "uuid", "title": "Conversation Id" }, "up_to_seq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Up To Seq" } }, "additionalProperties": false, "type": "object", "required": [ "conversation_id" ], "title": "TranscriptPtr", "description": "A pointer into the conversation's append-only ``conv_messages`` transcript.\n\n``up_to_seq`` is the highest ``conv_messages.seq`` written for the\nconversation at handoff time (``None`` when the thread has no messages yet) \u2014\nso a human can replay everything the brain saw before it stepped aside.\n\nStored on the seam packet as the compact string ``conv:{id}@{seq}`` (or\n``conv:{id}`` when ``up_to_seq`` is None); this model is the parsed,\nAPI-facing form. :meth:`to_wire` / :meth:`parse` bridge the two." }, "TransferDestinationLookup": { "properties": { "tool_id": { "type": "string", "title": "Tool Id" }, "response_path": { "type": "string", "title": "Response Path" }, "rendered_args": { "additionalProperties": true, "type": "object", "title": "Rendered Args" }, "missing_inputs": { "items": { "type": "string" }, "type": "array", "title": "Missing Inputs" } }, "additionalProperties": false, "type": "object", "required": [ "tool_id", "response_path" ], "title": "TransferDestinationLookup", "description": "The frozen descriptor a dynamic transfer target carries into the voice host.\n\nBuilt at target-SELECTION time (assistant ``transfer_call`` or workflow\n``HandoffNode``): ``rendered_args`` is rendered against the selection-time\nconversation context so a context change between selection and transfer\nexecution cannot change the request. A non-empty ``missing_inputs``\nshort-circuits the resolver (``missing_input`` subcode) before any DB or\nnetwork work. At transfer time the voice host loads the referenced tool's\nactive revision and executes it with the frozen ``rendered_args``." }, "TransferDestinationPreviewProblem": { "properties": { "kind": { "type": "string", "title": "Kind" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "kind", "message" ], "title": "TransferDestinationPreviewProblem", "description": "One structured problem from a preview run (pure authoring finding)." }, "TransferDestinationPreviewRequest": { "properties": { "input_mapping": { "additionalProperties": true, "type": "object", "title": "Input Mapping" }, "response_path": { "type": "string", "title": "Response Path" }, "context_vars": { "additionalProperties": true, "type": "object", "title": "Context Vars" } }, "additionalProperties": false, "type": "object", "required": [ "response_path" ], "title": "TransferDestinationPreviewRequest", "description": "Authoring dry-run of a dynamic transfer-destination lookup.\n\nRenders ``input_mapping`` against sample ``context_vars`` and drives the\nreferenced api_call revision through the SAME shared lookup core the voice\nhost uses at transfer time \u2014 so the preview and a live transfer cannot\ndrift. Nothing is persisted; API inputs, response bodies, and the resolved\ndestination are never logged." }, "TransferDestinationPreviewResponse": { "properties": { "resolved": { "type": "boolean", "title": "Resolved" }, "destination": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Destination" }, "subcode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Subcode" }, "missing_inputs": { "items": { "type": "string" }, "type": "array", "title": "Missing Inputs" }, "problems": { "items": { "$ref": "#/components/schemas/TransferDestinationPreviewProblem" }, "type": "array", "title": "Problems" } }, "type": "object", "required": [ "resolved" ], "title": "TransferDestinationPreviewResponse", "description": "Result of a dynamic transfer-destination preview.\n\n``resolved`` is ``True`` iff a dialable destination was extracted from the\nlookup response. Otherwise ``subcode`` carries the runtime failure reason;\n``missing_inputs`` and ``problems`` surface pre-execution (render / shape)\nfailures independently." }, "TransferDetailResponse": { "properties": { "supervisor_phone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Supervisor Phone" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" }, "failure_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Failure Reason" }, "fallback_mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Fallback Mode" }, "consult_recording": { "$ref": "#/components/schemas/RecordingPlaybackResponse" }, "consult_transcript": { "items": { "$ref": "#/components/schemas/ConsultTurnOut" }, "type": "array", "title": "Consult Transcript" } }, "type": "object", "required": [ "consult_recording" ], "title": "TransferDetailResponse", "description": "Everything the session-detail page surfaces for a warm transfer.\n\nRecordings are PII-redacted per the org's audio policy; the transcript is\nPII-redacted per the org's text policy (both at session close) \u2014 same\nhandling as a normal conversation. ``supervisor_phone`` is the\noperator-configured business destination that was consulted (the latest\nattempt's), NOT customer PII, so it is surfaced raw to ``communication:read``." }, "TransferTargetInput": { "properties": { "destination": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Destination", "description": "Dial target \u2014 E.164 (e.g. +15105550100) or a sip: URI" }, "destination_source": { "anyOf": [ { "$ref": "#/components/schemas/DestinationSourceConfig" }, { "type": "null" } ], "description": "Dynamic destination via an api_tool lookup at transfer time" }, "mode": { "type": "string", "enum": [ "cold", "warm" ], "title": "Mode", "default": "cold" } }, "additionalProperties": false, "type": "object", "title": "TransferTargetInput", "description": "Operator-supplied config for a call_transfer target (ENG, voice).\n\nA transfer target carries either a static ``destination`` (E.164 or sip: URI)\nor a dynamic ``destination_source`` (api_tool reference that resolves the\ndestination at transfer time). The two are mutually exclusive. ``mode`` is\nalways ``\"cold\"``.\n\n``destination`` validity (E.164 or ``sip:`` URI) is enforced at the service\nlayer via\n:func:`~src.custom_tools.api._shared.transfer_target.validate_transfer_target_config`\nso a bad destination surfaces as a clean 422. The label / when-to-use are\ncarried on the Tool's ``name`` / ``description``, not here." }, "TransferTargetView": { "properties": { "destination": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Destination" }, "destination_source": { "anyOf": [ { "$ref": "#/components/schemas/DestinationSourceConfig" }, { "type": "null" } ] }, "mode": { "type": "string", "enum": [ "cold", "warm" ], "title": "Mode", "default": "cold" } }, "type": "object", "title": "TransferTargetView", "description": "A call_transfer revision's stored target, surfaced on reads.\n\n``ToolRevisionResponse.configuration`` is api_call-typed and parses to\n``None`` for a transfer config (it has no ``url``), so this field carries the\ndestination/mode back for the transfer-target picker. ``label`` /\n``when_to_use`` come from the parent Tool's ``name`` / ``description``.\n\nEither ``destination`` (static) or ``destination_source`` (api_tool dynamic)\nis present, never both. The unused variant is omitted from serialization." }, "TriggerType": { "type": "string", "enum": [ "auto", "keyword", "event", "manual", "always_on" ], "title": "TriggerType" }, "TtftByModelRow": { "properties": { "served_model": { "type": "string", "title": "Served Model" }, "provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider" }, "p50_ms": { "type": "number", "title": "P50 Ms" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "p99_ms": { "type": "number", "title": "P99 Ms" }, "avg_ms": { "type": "number", "title": "Avg Ms" }, "max_ms": { "type": "number", "title": "Max Ms" }, "invocations": { "type": "integer", "title": "Invocations" } }, "type": "object", "required": [ "served_model", "p50_ms", "p95_ms", "p99_ms", "avg_ms", "max_ms", "invocations" ], "title": "TtftByModelRow" }, "TtftTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "p50_ms": { "type": "number", "title": "P50 Ms" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "p99_ms": { "type": "number", "title": "P99 Ms" }, "avg_ms": { "type": "number", "title": "Avg Ms" }, "max_ms": { "type": "number", "title": "Max Ms" }, "invocations": { "type": "integer", "title": "Invocations" } }, "type": "object", "required": [ "time_bucket", "p50_ms", "p95_ms", "p99_ms", "avg_ms", "max_ms", "invocations" ], "title": "TtftTimeseriesRow" }, "TurnAcceptedResponse": { "properties": { "turn_id": { "type": "string", "format": "uuid", "title": "Turn Id" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "turn_id", "status" ], "title": "TurnAcceptedResponse", "description": "Phase 3 split contract: POST enqueues a turn and returns its id + status;\nthe client then opens a separate ``\u2026/turns/{turn_id}/stream`` SSE request to\nwatch it. ``status`` is ``queued`` immediately after enqueue." }, "TurnAnalyzerParams": { "properties": { "stop_secs": { "type": "number", "maximum": 8.0, "minimum": 0.5, "title": "Stop Secs", "default": 2.0 }, "pre_speech_ms": { "type": "number", "maximum": 2000.0, "minimum": 0.0, "title": "Pre Speech Ms", "default": 500.0 }, "max_duration_secs": { "type": "number", "maximum": 30.0, "minimum": 2.0, "title": "Max Duration Secs", "default": 8.0 } }, "additionalProperties": false, "type": "object", "title": "TurnAnalyzerParams", "description": "Smart-turn-v3 tuning. Always applied for Deepgram Nova; ignored otherwise." }, "TurnDepthRow": { "properties": { "total_sessions": { "type": "integer", "title": "Total Sessions" }, "avg_turns_per_session": { "type": "number", "title": "Avg Turns Per Session" }, "single_turn_rate_pct": { "type": "number", "title": "Single Turn Rate Pct" }, "p50_turns": { "type": "number", "title": "P50 Turns" }, "p90_turns": { "type": "number", "title": "P90 Turns" }, "p95_turns": { "type": "number", "title": "P95 Turns" } }, "type": "object", "required": [ "total_sessions", "avg_turns_per_session", "single_turn_rate_pct", "p50_turns", "p90_turns", "p95_turns" ], "title": "TurnDepthRow" }, "TurnListResponse": { "properties": { "turns": { "items": { "$ref": "#/components/schemas/src__conversation__schemas__TurnResponse" }, "type": "array", "title": "Turns" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "turns", "has_more" ], "title": "TurnListResponse" }, "TurnRequest": { "properties": { "user_message": { "type": "string", "title": "User Message" }, "for_update": { "type": "boolean", "title": "For Update", "description": "Deprecated compatibility field; all turns use optimistic guarded finalization and this value has no effect.", "default": false, "deprecated": true }, "include_evidence": { "type": "boolean", "title": "Include Evidence", "default": false }, "evidence_view": { "type": "string", "enum": [ "display", "full" ], "title": "Evidence View", "default": "display" } }, "type": "object", "required": [ "user_message" ], "title": "TurnRequest", "description": "Drive one turn of a v2 conversation (Phase F1)." }, "TurnResult": { "properties": { "session_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Session Id" }, "messages": { "items": { "$ref": "#/components/schemas/AssistantMessage" }, "type": "array", "title": "Messages" }, "status": { "$ref": "#/components/schemas/SessionStatus" }, "handoff": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Handoff" }, "call_transfer": { "anyOf": [ { "$ref": "#/components/schemas/CallTransferIntent" }, { "type": "null" } ] }, "dtmf_input": { "anyOf": [ { "$ref": "#/components/schemas/DtmfInputSpec" }, { "type": "null" } ] }, "session_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Session Status" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "model_used": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Used" }, "token_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Token Count" }, "latency_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Latency Ms" } }, "type": "object", "required": [ "status" ], "title": "TurnResult", "description": "Universal post-turn snapshot returned by ``Runtime.run_turn``.\n\nEvery channel sees the same fields:\n\n- ``session_id``: the session this turn ran against. Always populated\n when a real ``Runtime`` produced the result (the caller may have\n passed ``session_id=None`` and asked the runtime to resolve / create\n the active session \u2014 this is how it learns which one was used).\n Optional in the type for the benefit of test fixtures that mint\n ``TurnResult``s by hand without a Runtime.\n- ``messages``: 1 message for API/voice; *N* (Plan 5) for SMS chunked.\n- ``status``: snapshot of ``Runtime._status`` at end-of-turn. The caller\n uses this to decide whether to call ``end_session``.\n- ``handoff``: populated when AOP reached a HandoffNode. The dict shape\n mirrors the existing ``AOPExecutionResult.handoff_config`` for\n forward-compat \u2014 Plan 3 does not re-type it.\n- ``error``: when AOP execution fails, this is the\n ``AOPExecutionResult.execution_error`` string the pipeline stamped\n (e.g. ``\"node_execution_failed: ValidationError: ...\"``,\n ``\"routing_error: \"``, ``\"unknown_node_type\"``); falls\n back to the legacy ``\"max_steps_exceeded\"`` label only when the\n pipeline didn't attach a reason. ``repr(exc)`` for an uncaught\n exception in ``_execute``. ``None`` on success / handoff /\n policy-violation.\n- ``model_used`` / ``token_count`` / ``latency_ms``: aggregate metrics\n surfaced for telemetry; ``None`` when the turn made no LLM call." }, "TurnSource": { "properties": { "title": { "type": "string", "title": "Title" }, "url": { "type": "string", "title": "Url" } }, "type": "object", "required": [ "title", "url" ], "title": "TurnSource", "description": "One KB source link surfaced alongside a white-label assistant reply.\n\n``url`` is VERBATIM as the KB document wrote it and MAY BE RELATIVE\n(``uploads/.pdf``) \u2014 the consumer joins its own base. Deliberately not\nscheme-validated the way ``EvidenceProvenance.external_uri`` is; a scoped\nexception recorded as **DD-010** in ``docs/design-decisions.md`` (not DD-007,\nwhich governs ``external_uri`` and still requires a scheme). Executable\nschemes are stripped upstream, at extraction.\n\n``title`` is heuristic (markdown link text \u25b8 ``Link for X:`` label \u25b8 last path\nsegment). Never invented: every value was literally present in the document or\nthe answer." }, "TurnView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "seq": { "type": "integer", "title": "Seq" }, "role": { "type": "string", "title": "Role" }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content" }, "tool_calls": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Tool Calls" }, "tool_call_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Call Id" }, "authored_by": { "type": "string", "title": "Authored By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "seq", "role", "content", "tool_calls", "tool_call_id", "authored_by", "created_at" ], "title": "TurnView", "description": "Projection of one ``ConvMessage`` transcript row.\n\nOmits the TOASTed ``citations`` / ``rag_traces`` columns (deferred by\n``SessionService.get_turns``) so no lazy-load fires. ``tool_calls`` is the\npersisted OpenAI-style array (a ``list``) \u2014 see ``ConvMessage.tool_calls``\nand ``conversation.message_adapter``; the column's ``Mapped[dict]`` hint is\nmisleading, the value on the wire is a list. The type also admits ``dict``\ndefensively so a single malformed legacy row can't 500 the whole detail\nresponse on validation." }, "TurnWaterfallResponse": { "properties": { "turn_id": { "type": "string", "format": "uuid", "title": "Turn Id" }, "conversation_id": { "type": "string", "format": "uuid", "title": "Conversation Id" }, "trace": { "additionalProperties": true, "type": "object", "title": "Trace" } }, "additionalProperties": false, "type": "object", "required": [ "turn_id", "conversation_id", "trace" ], "title": "TurnWaterfallResponse", "description": "Full per-turn engineering waterfall, reconstructed from Langfuse (ENG-689 T3).\n\n``trace`` is the ``TurnState.to_telemetry_dict()`` artifact the rich waterfall UI already\nrenders (the live playground SSE stream emits the same shape). It is metadata-only at the\nproduction tier and carries the debug-tier fields when debug capture was on for the turn,\nmirroring the old self-hosted ``debug_log``." }, "UniqueConversationsRow": { "properties": { "tool_id": { "type": "string", "title": "Tool Id" }, "tool_name": { "type": "string", "title": "Tool Name" }, "tool_type": { "type": "string", "title": "Tool Type" }, "unique_conversations": { "type": "integer", "title": "Unique Conversations" }, "invocations": { "type": "integer", "title": "Invocations" } }, "type": "object", "required": [ "tool_id", "tool_name", "tool_type", "unique_conversations", "invocations" ], "title": "UniqueConversationsRow" }, "UpdateDraftRequest": { "properties": { "subject": { "anyOf": [ { "type": "string", "maxLength": 998, "minLength": 1 }, { "type": "null" } ], "title": "Subject" }, "body_html": { "anyOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "title": "Body Html" }, "body_text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Body Text" }, "to": { "anyOf": [ { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array" }, { "type": "null" } ], "title": "To" }, "cc": { "anyOf": [ { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array" }, { "type": "null" } ], "title": "Cc" }, "bcc": { "anyOf": [ { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array" }, { "type": "null" } ], "title": "Bcc" }, "reply_to": { "anyOf": [ { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array" }, { "type": "null" } ], "title": "Reply To" } }, "additionalProperties": false, "type": "object", "title": "UpdateDraftRequest", "description": "Partial update \u2014 only fields explicitly set are touched. ``None``\non an optional list is \"no change\"; passing an empty list clears that\nrecipient list." }, "UpdateMailboxAccountRequest": { "properties": { "default_signature_html": { "anyOf": [ { "type": "string", "maxLength": 20000 }, { "type": "null" } ], "title": "Default Signature Html" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "team_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Revision Id" } }, "additionalProperties": false, "type": "object", "title": "UpdateMailboxAccountRequest", "description": "Partial update for a connected mailbox.\n\nMutable today: the per-account default signature (ENG-417) and the\nagent/team binding (rebind without re-running OAuth). Future fields\n(e.g., display name overrides) slot in here without a new endpoint.\n\nThe binding is updated only when ``agent_id`` or ``team_id`` is present\nin the request body (``model_fields_set`` sentinel). At most one may be\nset per request \u2014 a mailbox binds to either a single agent or a team.\nExplicit ``None`` on a present key clears that side of the binding." }, "UpdateNodeFieldsOp": { "properties": { "op": { "type": "string", "const": "update_node_fields", "title": "Op" }, "id": { "type": "string", "title": "Id" }, "fields": { "additionalProperties": true, "type": "object", "title": "Fields" } }, "type": "object", "required": [ "op", "id", "fields" ], "title": "UpdateNodeFieldsOp" }, "UpdateSourceScheduleRequest": { "properties": { "auto_sync_enabled": { "type": "boolean", "title": "Auto Sync Enabled" }, "sync_interval_seconds": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Sync Interval Seconds" } }, "type": "object", "required": [ "auto_sync_enabled" ], "title": "UpdateSourceScheduleRequest", "description": "Configure a source's automatic (cron) re-sync schedule \u2014 ENG-196.\n\n``sync_interval_seconds`` is required when enabling; the server-authoritative\nminimum (``kb_scheduled_sync_min_interval_seconds``) is enforced in the\nservice layer (this only floors at 1s). Disabling ignores the interval." }, "UpsertContextVariableOp": { "properties": { "op": { "type": "string", "const": "upsert_context_variable", "title": "Op" }, "context_variable": { "additionalProperties": true, "type": "object", "title": "Context Variable" } }, "type": "object", "required": [ "op", "context_variable" ], "title": "UpsertContextVariableOp" }, "UpsertNodeOp": { "properties": { "op": { "type": "string", "const": "upsert_node", "title": "Op" }, "node": { "additionalProperties": true, "type": "object", "title": "Node" } }, "type": "object", "required": [ "op", "node" ], "title": "UpsertNodeOp" }, "UserDistributionRow": { "properties": { "users": { "type": "integer", "title": "Users" }, "episodes_p50": { "type": "integer", "title": "Episodes P50" }, "episodes_p90": { "type": "integer", "title": "Episodes P90" }, "messages_p50": { "type": "integer", "title": "Messages P50" }, "messages_p90": { "type": "integer", "title": "Messages P90" }, "recalls_p50": { "type": "integer", "title": "Recalls P50" }, "recalls_p90": { "type": "integer", "title": "Recalls P90" }, "days_since_last_recall_p50": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Days Since Last Recall P50" }, "days_since_last_recall_p90": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Days Since Last Recall P90" } }, "type": "object", "required": [ "users", "episodes_p50", "episodes_p90", "messages_p50", "messages_p90", "recalls_p50", "recalls_p90" ], "title": "UserDistributionRow" }, "UserMemoriesResponse": { "properties": { "facts": { "items": { "$ref": "#/components/schemas/MemoryFactResponse" }, "type": "array", "title": "Facts" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "facts" ], "title": "UserMemoriesResponse" }, "UtilityCatalogEntry": { "properties": { "name": { "type": "string", "title": "Name" }, "canonical_key": { "type": "string", "title": "Canonical Key" }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "description": { "type": "string", "title": "Description", "default": "" }, "parameters": { "additionalProperties": true, "type": "object", "title": "Parameters" } }, "type": "object", "required": [ "name", "canonical_key" ], "title": "UtilityCatalogEntry", "description": "One selectable utility definition, independent of any effective surface.\n\nCatalog entries describe what may be selected. They deliberately carry no provenance,\nlock state, dynamic state, or selection sources because those concepts exist only after\na capability has been selected into an assistant or node surface." }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" }, "input": { "title": "Input" }, "ctx": { "type": "object", "title": "Context" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "ValidationFinding": { "properties": { "severity": { "type": "string", "enum": [ "error", "warning", "suggestion" ], "title": "Severity" }, "rule_id": { "type": "string", "title": "Rule Id" }, "category": { "type": "string", "title": "Category" }, "message": { "type": "string", "title": "Message" }, "node_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Node Id" }, "edge_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Edge Id" }, "related_node_ids": { "items": { "type": "string" }, "type": "array", "title": "Related Node Ids" }, "related_edge_ids": { "items": { "type": "string" }, "type": "array", "title": "Related Edge Ids" }, "source_span": { "anyOf": [ { "$ref": "#/components/schemas/SourceSpan" }, { "type": "null" } ] }, "suggested_fix": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Suggested Fix" }, "related_spans": { "items": { "$ref": "#/components/schemas/SourceSpan" }, "type": "array", "title": "Related Spans" } }, "type": "object", "required": [ "severity", "rule_id", "category", "message" ], "title": "ValidationFinding", "description": "Graph-validator finding (Stage 7 \u2014 over the assembled graph).\n\nFor cross-cutting issues (variable drift, gate-consistency) the validator\npopulates ``related_node_ids`` so the healer can regen multiple nodes in\ncoordination instead of one at a time." }, "VariableDefinition": { "properties": { "name": { "type": "string", "title": "Name" }, "type": { "type": "string", "enum": [ "str", "int", "float", "bool" ], "title": "Type", "default": "str" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "required": { "type": "boolean", "title": "Required", "default": false } }, "type": "object", "required": [ "name" ], "title": "VariableDefinition", "description": "Input parameter definition for an API tool." }, "VendorMode": { "type": "string", "enum": [ "platform", "byo" ], "title": "VendorMode" }, "ViolationRateRow": { "properties": { "policy_id": { "type": "string", "title": "Policy Id" }, "policy_name": { "type": "string", "title": "Policy Name" }, "strictness": { "type": "string", "title": "Strictness" }, "evaluations": { "type": "integer", "title": "Evaluations" }, "violations": { "type": "integer", "title": "Violations" }, "violation_rate_pct": { "type": "number", "title": "Violation Rate Pct" }, "enforced": { "type": "integer", "title": "Enforced" }, "would_be": { "type": "integer", "title": "Would Be" }, "errors": { "type": "integer", "title": "Errors" }, "avg_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Avg Latency Ms" } }, "type": "object", "required": [ "policy_id", "policy_name", "strictness", "evaluations", "violations", "violation_rate_pct", "enforced", "would_be", "errors" ], "title": "ViolationRateRow" }, "ViolationsTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "evaluations": { "type": "integer", "title": "Evaluations" }, "violations": { "type": "integer", "title": "Violations" }, "enforced_violations": { "type": "integer", "title": "Enforced Violations" }, "shadow_violations": { "type": "integer", "title": "Shadow Violations" } }, "type": "object", "required": [ "time_bucket", "evaluations", "violations", "enforced_violations", "shadow_violations" ], "title": "ViolationsTimeseriesRow" }, "VoiceCallSettings": { "properties": { "interruptions_enabled": { "type": "boolean", "title": "Interruptions Enabled", "default": true }, "interruption_min_words": { "type": "integer", "maximum": 20.0, "minimum": 0.0, "title": "Interruption Min Words", "default": 2 }, "interruption_min_duration_ms": { "type": "integer", "maximum": 10000.0, "minimum": 0.0, "title": "Interruption Min Duration Ms", "default": 0 }, "interruption_backoff_ms": { "type": "integer", "maximum": 10000.0, "minimum": 0.0, "title": "Interruption Backoff Ms", "default": 1000 }, "interruption_trigger_phrases": { "items": { "type": "string" }, "type": "array", "maxItems": 50, "title": "Interruption Trigger Phrases" }, "interruption_hard_phrases": { "items": { "type": "string" }, "type": "array", "maxItems": 20, "title": "Interruption Hard Phrases" }, "interruption_final_transcript_grace_ms": { "type": "integer", "maximum": 2000.0, "minimum": 0.0, "title": "Interruption Final Transcript Grace Ms", "default": 250 }, "dtmf_enabled": { "type": "boolean", "title": "Dtmf Enabled", "default": false }, "dtmf_termination_digit": { "type": "string", "maxLength": 1, "title": "Dtmf Termination Digit", "default": "#" }, "dtmf_inter_digit_timeout_ms": { "type": "integer", "maximum": 60000.0, "minimum": 250.0, "title": "Dtmf Inter Digit Timeout Ms", "default": 3000 }, "dtmf_max_digits": { "type": "integer", "maximum": 64.0, "minimum": 1.0, "title": "Dtmf Max Digits", "default": 32 }, "dtmf_prefix": { "type": "string", "maxLength": 32, "title": "Dtmf Prefix", "default": "DTMF: " }, "max_call_duration_ms": { "type": "integer", "maximum": 1800000.0, "minimum": 1000.0, "title": "Max Call Duration Ms", "default": 600000 }, "silence_timeout_ms": { "type": "integer", "maximum": 600000.0, "minimum": 0.0, "title": "Silence Timeout Ms", "default": 30000 }, "silence_reminder_count": { "type": "integer", "maximum": 10.0, "minimum": 0.0, "title": "Silence Reminder Count", "default": 0 }, "silence_reminder_mode": { "type": "string", "enum": [ "static", "auto" ], "title": "Silence Reminder Mode", "default": "static" }, "silence_reminder_message": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Silence Reminder Message" }, "silence_end_action": { "type": "string", "enum": [ "hangup_immediate", "speak_then_hangup" ], "title": "Silence End Action", "default": "hangup_immediate" }, "silence_end_message": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Silence End Message" }, "voicemail_detection_mode": { "type": "string", "enum": [ "off", "leave_message" ], "title": "Voicemail Detection Mode", "default": "off" }, "voicemail_detection_timeout_ms": { "type": "integer", "maximum": 60000.0, "minimum": 0.0, "title": "Voicemail Detection Timeout Ms", "default": 2000 }, "voicemail_detection_model": { "anyOf": [ { "type": "string", "maxLength": 64 }, { "type": "null" } ], "title": "Voicemail Detection Model" }, "voicemail_message": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Voicemail Message" }, "background_audio_enabled": { "type": "boolean", "title": "Background Audio Enabled", "default": false }, "background_audio_preset": { "anyOf": [ { "type": "string", "enum": [ "office", "cafe", "city", "keyboard_typing", "keyboard_typing2" ] }, { "type": "null" } ], "title": "Background Audio Preset" }, "background_audio_volume": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Background Audio Volume", "default": 0.4 }, "background_audio_loop": { "type": "boolean", "title": "Background Audio Loop", "default": true }, "recording_enabled": { "type": "boolean", "title": "Recording Enabled", "default": true }, "transcription_storage_enabled": { "type": "boolean", "title": "Transcription Storage Enabled", "default": true } }, "additionalProperties": false, "type": "object", "title": "VoiceCallSettings", "description": "Complete voice call behavior settings with all defaults populated.\n\nStored as a JSON column on ``AgentRevision``, ``Team``, and ``Persona``.\nEvery field has a default so ``NULL``/``{}`` stored JSON resolves to the\nschema defaults \u2014 the legacy ``VoicePipelineConfig`` scalar columns these\ndefaults once mirrored were dropped by migration 0219." }, "VoiceCallSettingsUpdate": { "properties": { "interruptions_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Interruptions Enabled" }, "interruption_min_words": { "anyOf": [ { "type": "integer", "maximum": 20.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Interruption Min Words" }, "interruption_min_duration_ms": { "anyOf": [ { "type": "integer", "maximum": 10000.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Interruption Min Duration Ms" }, "interruption_backoff_ms": { "anyOf": [ { "type": "integer", "maximum": 10000.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Interruption Backoff Ms" }, "interruption_trigger_phrases": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "maxItems": 50 }, { "type": "null" } ], "title": "Interruption Trigger Phrases" }, "interruption_hard_phrases": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "maxItems": 20 }, { "type": "null" } ], "title": "Interruption Hard Phrases" }, "interruption_final_transcript_grace_ms": { "anyOf": [ { "type": "integer", "maximum": 2000.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Interruption Final Transcript Grace Ms" }, "dtmf_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Dtmf Enabled" }, "dtmf_termination_digit": { "anyOf": [ { "type": "string", "maxLength": 1 }, { "type": "null" } ], "title": "Dtmf Termination Digit" }, "dtmf_inter_digit_timeout_ms": { "anyOf": [ { "type": "integer", "maximum": 60000.0, "minimum": 250.0 }, { "type": "null" } ], "title": "Dtmf Inter Digit Timeout Ms" }, "dtmf_max_digits": { "anyOf": [ { "type": "integer", "maximum": 64.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Dtmf Max Digits" }, "dtmf_prefix": { "anyOf": [ { "type": "string", "maxLength": 32 }, { "type": "null" } ], "title": "Dtmf Prefix" }, "max_call_duration_ms": { "anyOf": [ { "type": "integer", "maximum": 1800000.0, "minimum": 1000.0 }, { "type": "null" } ], "title": "Max Call Duration Ms" }, "silence_timeout_ms": { "anyOf": [ { "type": "integer", "maximum": 600000.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Silence Timeout Ms" }, "silence_reminder_count": { "anyOf": [ { "type": "integer", "maximum": 10.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Silence Reminder Count" }, "silence_reminder_mode": { "anyOf": [ { "type": "string", "enum": [ "static", "auto" ] }, { "type": "null" } ], "title": "Silence Reminder Mode" }, "silence_reminder_message": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Silence Reminder Message" }, "silence_end_action": { "anyOf": [ { "type": "string", "enum": [ "hangup_immediate", "speak_then_hangup" ] }, { "type": "null" } ], "title": "Silence End Action" }, "silence_end_message": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Silence End Message" }, "voicemail_detection_mode": { "anyOf": [ { "type": "string", "enum": [ "off", "leave_message" ] }, { "type": "null" } ], "title": "Voicemail Detection Mode" }, "voicemail_detection_timeout_ms": { "anyOf": [ { "type": "integer", "maximum": 60000.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Voicemail Detection Timeout Ms" }, "voicemail_detection_model": { "anyOf": [ { "type": "string", "maxLength": 64 }, { "type": "null" } ], "title": "Voicemail Detection Model" }, "voicemail_message": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Voicemail Message" }, "background_audio_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Background Audio Enabled" }, "background_audio_preset": { "anyOf": [ { "type": "string", "enum": [ "office", "cafe", "city", "keyboard_typing", "keyboard_typing2" ] }, { "type": "null" } ], "title": "Background Audio Preset" }, "background_audio_volume": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Background Audio Volume" }, "background_audio_loop": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Background Audio Loop" }, "recording_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Recording Enabled" }, "transcription_storage_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Transcription Storage Enabled" } }, "additionalProperties": false, "type": "object", "title": "VoiceCallSettingsUpdate", "description": "All-optional PATCH input for voice call settings.\n\nUnset fields (``None``) mean \"don't change\". Only explicitly provided\nfields are applied by ``merge_patch``." }, "VoiceEntitlementSettings": { "properties": { "max_active_calls": { "anyOf": [ { "type": "integer", "maximum": 10000.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Max Active Calls" }, "outbound_cps": { "anyOf": [ { "type": "number", "maximum": 10000.0, "exclusiveMinimum": 0.0 }, { "type": "null" } ], "title": "Outbound Cps" }, "queue_weight": { "anyOf": [ { "type": "number", "maximum": 1000.0, "exclusiveMinimum": 0.0 }, { "type": "null" } ], "title": "Queue Weight" }, "priority_class": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Priority Class" }, "priority_aging_max_wait_seconds": { "anyOf": [ { "type": "integer", "maximum": 86400.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Priority Aging Max Wait Seconds" }, "inbound_reserved_calls": { "anyOf": [ { "type": "integer", "maximum": 10000.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Inbound Reserved Calls" } }, "type": "object", "title": "VoiceEntitlementSettings", "description": "Per-org standing voice entitlements, stored in ``Organization.settings``.\n\nConsolidates all four per-org voice knobs (previously the dedicated\n``org_voice_entitlements`` table) into the settings JSON alongside\n``call_window`` / ``holiday_calendar``:\n\n* ``max_active_calls`` \u2014 Layer-2 per-org active-call cap (self-service).\n* ``outbound_cps`` \u2014 Layer-0b per-org calls/sec pacer (Feather staff only).\n* ``queue_weight`` \u2014 Layer-0c drain-share weight (Feather staff only).\n* ``priority_class`` \u2014 scheduler tie-break class (Feather staff only).\n* ``priority_aging_max_wait_seconds`` \u2014 per-org scheduler aging override\n (Feather staff only): seconds the org's oldest queued outbound call must\n wait before aging takes over priority ordering. Resolved by the\n scheduler per tick, so a change applies on the next ~5s sweep, including\n to already-queued calls.\n* ``inbound_reserved_calls`` \u2014 reserve-for-inbound headroom (self-service).\n When set (``I``), outbound calls are capped at ``max(0, max_active_calls -\n I)``, while inbound keeps drawing from the full org total\n ``C = max_active_calls`` and may burst above ``I`` into idle outbound\n capacity. ``None`` \u21d2 no reservation (outbound cap = ``C``). At admit time\n the outbound cap is clamped with ``max(0, C \u2212 I)`` so a later drop in ``C``\n degrades gracefully.\n\n``None`` on any field means \"inherit the config default\" for that dimension.\n``le``/``allow_inf_nan`` on the float fields are load-bearing: ``1e999`` is\nvalid JSON that parses to ``inf`` and would pass a bare ``gt=0``, silently\nproducing an unbounded CPS bucket." }, "VoiceListResponse": { "properties": { "voices": { "items": { "$ref": "#/components/schemas/VoiceOut" }, "type": "array", "title": "Voices" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "total" ], "title": "VoiceListResponse" }, "VoiceOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "provider": { "type": "string", "enum": [ "elevenlabs", "inworld" ], "title": "Provider" }, "external_id": { "type": "string", "title": "External Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "preview_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Preview Url" }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language" }, "accent": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Accent" }, "category": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Category" }, "labels": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Labels" }, "supported_models": { "items": { "type": "string" }, "type": "array", "title": "Supported Models" }, "is_active": { "type": "boolean", "title": "Is Active", "default": true }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "provider", "external_id", "name", "created_at", "updated_at" ], "title": "VoiceOut" }, "VoicePipelineConfigCreate": { "properties": { "voice_tuning": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Voice Tuning" }, "stt_provider": { "anyOf": [ { "type": "string", "maxLength": 32 }, { "type": "null" } ], "title": "Stt Provider" }, "stt_model": { "anyOf": [ { "type": "string", "maxLength": 64 }, { "type": "null" } ], "title": "Stt Model" }, "stt_provider_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Stt Provider Data" }, "tts_speed": { "anyOf": [ { "type": "number", "exclusiveMaximum": 10.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Tts Speed" }, "tts_provider_data": { "anyOf": [ { "$ref": "#/components/schemas/VoiceTTSProviderDataInput" }, { "type": "null" } ] }, "vad_provider_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Vad Provider Data" }, "local_vad_params": { "anyOf": [ { "$ref": "#/components/schemas/LocalVADParams" }, { "type": "null" } ] }, "turn_analyzer_params": { "anyOf": [ { "$ref": "#/components/schemas/TurnAnalyzerParams" }, { "type": "null" } ] }, "pronunciation_overrides": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Pronunciation Overrides" }, "noise_cancellation_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Noise Cancellation Enabled" }, "noise_cancellation_provider": { "anyOf": [ { "$ref": "#/components/schemas/NoiseCancellationProvider" }, { "type": "null" } ] }, "language": { "anyOf": [ { "type": "string", "maxLength": 16 }, { "type": "null" } ], "title": "Language" }, "locale": { "anyOf": [ { "type": "string", "maxLength": 16 }, { "type": "null" } ], "title": "Locale" }, "multilingual_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Multilingual Enabled" }, "multilingual_languages": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "maxItems": 50 }, { "type": "null" } ], "title": "Multilingual Languages" }, "first_speaker": { "anyOf": [ { "type": "string", "enum": [ "agent", "user" ] }, { "type": "null" } ], "title": "First Speaker" }, "mode": { "anyOf": [ { "type": "string", "enum": [ "static", "dynamic" ] }, { "type": "null" } ], "title": "Mode" }, "text": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Text" }, "instructions": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Instructions" }, "interruptible": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Interruptible" }, "ai_disclosure_text": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Ai Disclosure Text" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "persona_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Persona Id" }, "voice_id": { "type": "string", "format": "uuid", "title": "Voice Id" } }, "additionalProperties": false, "type": "object", "required": [ "voice_id" ], "title": "VoicePipelineConfigCreate" }, "VoicePipelineConfigResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Organization Id" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "persona_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Persona Id" }, "voice_id": { "type": "string", "format": "uuid", "title": "Voice Id" }, "voice": { "$ref": "#/components/schemas/VoiceOut" }, "voice_tuning": { "additionalProperties": true, "type": "object", "title": "Voice Tuning" }, "stt_provider": { "type": "string", "title": "Stt Provider" }, "stt_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Stt Model" }, "stt_language": { "type": "string", "title": "Stt Language" }, "stt_provider_data": { "additionalProperties": true, "type": "object", "title": "Stt Provider Data" }, "tts_speed": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Tts Speed" }, "tts_provider_data": { "additionalProperties": true, "type": "object", "title": "Tts Provider Data" }, "vad_provider": { "type": "string", "title": "Vad Provider" }, "vad_provider_data": { "additionalProperties": true, "type": "object", "title": "Vad Provider Data" }, "local_vad_params": { "additionalProperties": true, "type": "object", "title": "Local Vad Params" }, "turn_analyzer_params": { "additionalProperties": true, "type": "object", "title": "Turn Analyzer Params" }, "interruption_sensitivity": { "type": "number", "title": "Interruption Sensitivity" }, "hard_turn_timeout_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Hard Turn Timeout Ms" }, "min_endpoint_delay_ms": { "type": "integer", "title": "Min Endpoint Delay Ms" }, "max_endpoint_delay_ms": { "type": "integer", "title": "Max Endpoint Delay Ms" }, "preemptive_generation_enabled": { "type": "boolean", "title": "Preemptive Generation Enabled" }, "end_call_phrases": { "items": { "type": "string" }, "type": "array", "title": "End Call Phrases" }, "pronunciation_overrides": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Pronunciation Overrides" }, "noise_cancellation_enabled": { "type": "boolean", "title": "Noise Cancellation Enabled" }, "noise_cancellation_provider": { "$ref": "#/components/schemas/NoiseCancellationProvider" }, "normalize_for_speech": { "type": "boolean", "title": "Normalize For Speech" }, "audio_in_sample_rate": { "type": "integer", "title": "Audio In Sample Rate" }, "audio_out_sample_rate": { "type": "integer", "title": "Audio Out Sample Rate" }, "metrics_enabled": { "type": "boolean", "title": "Metrics Enabled" }, "usage_metrics_enabled": { "type": "boolean", "title": "Usage Metrics Enabled" }, "heartbeats_period_secs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Heartbeats Period Secs" }, "idle_pipeline_timeout_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Idle Pipeline Timeout Ms" }, "language": { "type": "string", "title": "Language" }, "locale": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Locale" }, "multilingual_enabled": { "type": "boolean", "title": "Multilingual Enabled" }, "multilingual_languages": { "items": { "type": "string" }, "type": "array", "title": "Multilingual Languages" }, "linked_agent_count": { "type": "integer", "title": "Linked Agent Count", "default": 0 }, "linked_agent_names": { "items": { "type": "string" }, "type": "array", "title": "Linked Agent Names" }, "linked_team_count": { "type": "integer", "title": "Linked Team Count", "default": 0 }, "linked_team_names": { "items": { "type": "string" }, "type": "array", "title": "Linked Team Names" }, "metadata_": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "first_speaking_config": { "anyOf": [ { "$ref": "#/components/schemas/FirstSpeakingConfig" }, { "type": "null" } ] }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings" }, "effective_stt_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Effective Stt Model" }, "effective_stt_provider_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Effective Stt Provider Data" }, "effective_tts_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Effective Tts Model" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "additionalProperties": false, "type": "object", "required": [ "id", "voice_id", "voice", "stt_provider", "stt_language", "vad_provider", "interruption_sensitivity", "min_endpoint_delay_ms", "max_endpoint_delay_ms", "preemptive_generation_enabled", "noise_cancellation_enabled", "noise_cancellation_provider", "normalize_for_speech", "audio_in_sample_rate", "audio_out_sample_rate", "metrics_enabled", "usage_metrics_enabled", "language", "multilingual_enabled", "created_at", "updated_at" ], "title": "VoicePipelineConfigResponse" }, "VoicePipelineConfigUpdate": { "properties": { "voice_tuning": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Voice Tuning" }, "stt_provider": { "anyOf": [ { "type": "string", "maxLength": 32 }, { "type": "null" } ], "title": "Stt Provider" }, "stt_model": { "anyOf": [ { "type": "string", "maxLength": 64 }, { "type": "null" } ], "title": "Stt Model" }, "stt_provider_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Stt Provider Data" }, "tts_speed": { "anyOf": [ { "type": "number", "exclusiveMaximum": 10.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Tts Speed" }, "tts_provider_data": { "anyOf": [ { "$ref": "#/components/schemas/VoiceTTSProviderDataInput" }, { "type": "null" } ] }, "vad_provider_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Vad Provider Data" }, "local_vad_params": { "anyOf": [ { "$ref": "#/components/schemas/LocalVADParams" }, { "type": "null" } ] }, "turn_analyzer_params": { "anyOf": [ { "$ref": "#/components/schemas/TurnAnalyzerParams" }, { "type": "null" } ] }, "pronunciation_overrides": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Pronunciation Overrides" }, "noise_cancellation_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Noise Cancellation Enabled" }, "noise_cancellation_provider": { "anyOf": [ { "$ref": "#/components/schemas/NoiseCancellationProvider" }, { "type": "null" } ] }, "language": { "anyOf": [ { "type": "string", "maxLength": 16 }, { "type": "null" } ], "title": "Language" }, "locale": { "anyOf": [ { "type": "string", "maxLength": 16 }, { "type": "null" } ], "title": "Locale" }, "multilingual_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Multilingual Enabled" }, "multilingual_languages": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "maxItems": 50 }, { "type": "null" } ], "title": "Multilingual Languages" }, "first_speaker": { "anyOf": [ { "type": "string", "enum": [ "agent", "user" ] }, { "type": "null" } ], "title": "First Speaker" }, "mode": { "anyOf": [ { "type": "string", "enum": [ "static", "dynamic" ] }, { "type": "null" } ], "title": "Mode" }, "text": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Text" }, "instructions": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Instructions" }, "interruptible": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Interruptible" }, "ai_disclosure_text": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Ai Disclosure Text" }, "voice_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Voice Id" } }, "additionalProperties": false, "type": "object", "title": "VoicePipelineConfigUpdate" }, "VoiceTTSProviderDataInput": { "properties": { "provider": { "anyOf": [ { "type": "string", "enum": [ "elevenlabs", "inworld" ] }, { "type": "null" } ], "title": "Provider" }, "model": { "anyOf": [ { "type": "string", "maxLength": 64 }, { "type": "null" } ], "title": "Model" }, "expressive_speech": { "type": "boolean", "title": "Expressive Speech", "description": "Enable managed expressive steering. Valid only for an Inworld voice using the effective inworld-tts-2 model.", "default": false }, "expressive_style": { "anyOf": [ { "$ref": "#/components/schemas/ExpressiveStyle" }, { "type": "null" } ], "description": "Delivery style for expressive steering (e.g. warm, professional, upbeat). Requires expressive_speech enabled; defaults to 'warm'. Also sets Inworld's default delivery_mode unless one is pinned." } }, "additionalProperties": false, "type": "object", "title": "VoiceTTSProviderDataInput", "description": "OpenAPI-visible TTS overrides accepted by voice-config CRUD.\n\nThe linked ``voice_id`` remains the authority for which provider member is\nvalid. The service resolves that row and validates this payload again\nagainst the provider-specific discriminated union, including model support\nand the Inworld TTS-2-only expressive-speech constraint." }, "VoiceUpsertRequest": { "properties": { "provider": { "type": "string", "enum": [ "elevenlabs", "inworld" ], "title": "Provider" }, "external_id": { "type": "string", "maxLength": 128, "minLength": 1, "title": "External Id" } }, "type": "object", "required": [ "provider", "external_id" ], "title": "VoiceUpsertRequest" }, "WarmTransferChannelConfig": { "properties": { "briefing_template": { "anyOf": [ { "type": "string", "maxLength": 4000 }, { "type": "null" } ], "title": "Briefing Template" } }, "type": "object", "title": "WarmTransferChannelConfig", "description": "Per-revision warm-transfer copy that versions with the agent revision.\n\nHolds the ``briefing_template`` the SupervisorAgent renders to brief the human\nsupervisor on the customer's situation (templated via the shared ``{{var}}`` engine,\n``src.shared.templating.render``, against the customer transcript/context). Lives under\n``channel_specific_config[\"voice\"][\"warm_transfer\"]`` so it clones forward with the\nrevision like the system prompt. The platform-tool ``WarmTransferConfig`` (enabled,\ntimeouts, fallback) is the agent-stable infra knob; this is the per-revision script." }, "WarmTransferConfig": { "properties": { "message_mode": { "type": "string", "enum": [ "ai_summary", "static", "prompt" ], "title": "Message Mode", "default": "ai_summary" }, "briefing_template": { "anyOf": [ { "type": "string", "maxLength": 4000 }, { "type": "null" } ], "title": "Briefing Template" }, "max_dial_seconds": { "type": "integer", "maximum": 120.0, "minimum": 5.0, "title": "Max Dial Seconds", "default": 30 }, "max_briefing_seconds": { "type": "integer", "maximum": 600.0, "minimum": 15.0, "title": "Max Briefing Seconds", "default": 60 }, "bridge_confirm_seconds": { "type": "integer", "maximum": 60.0, "minimum": 5.0, "title": "Bridge Confirm Seconds", "default": 20 }, "max_hold_seconds": { "type": "integer", "maximum": 300.0, "minimum": 15.0, "title": "Max Hold Seconds", "default": 110 }, "hold_announcement_text": { "type": "string", "maxLength": 500, "title": "Hold Announcement Text", "default": "One moment \u2014 I'll place you on a brief hold while I connect you." }, "reassurance_interval_seconds": { "type": "integer", "maximum": 60.0, "minimum": 0.0, "title": "Reassurance Interval Seconds", "default": 20 }, "reassurance_text": { "type": "string", "maxLength": 500, "title": "Reassurance Text", "default": "Thanks for your patience \u2014 I'm still working on connecting you." }, "detect_supervisor_voicemail": { "type": "boolean", "title": "Detect Supervisor Voicemail", "default": false }, "detect_supervisor_silence": { "type": "boolean", "title": "Detect Supervisor Silence", "default": false }, "silence_reminder_text": { "type": "string", "maxLength": 500, "title": "Silence Reminder Text", "default": "Hello \u2014 are you available to take this call?" }, "silence_timeout_seconds": { "type": "integer", "maximum": 60.0, "minimum": 5.0, "title": "Silence Timeout Seconds", "default": 15 }, "retry_announcement_text": { "type": "string", "maxLength": 500, "title": "Retry Announcement Text", "default": "I couldn't reach them that way \u2014 let me try connecting you directly." }, "failure_text": { "type": "string", "maxLength": 500, "title": "Failure Text", "default": "I'm sorry, I wasn't able to connect you right now. I can keep helping you here." } }, "additionalProperties": false, "type": "object", "title": "WarmTransferConfig", "description": "Tuning for *warm* call transfer on the assistant ``transfer_call`` platform tool.\n\nLives under ``platform_tools[\"transfer_call\"][\"warm\"]`` alongside ``targets``. Warm is\nselected by authoring a target ``mode=\"warm\"`` (its ``destination`` is the supervisor) \u2014\nthis block only carries the timeouts / message-mode knobs. Durations are bounded\nso a bad config can never strand a caller on hold indefinitely." }, "WarmTransferDashboardEnvelope": { "properties": { "summary": { "items": { "$ref": "#/components/schemas/WarmTransferSummaryRow" }, "type": "array", "title": "Summary" }, "failure_reasons": { "items": { "$ref": "#/components/schemas/WarmTransferFailureReasonRow" }, "type": "array", "title": "Failure Reasons" }, "setup_latency": { "items": { "$ref": "#/components/schemas/WarmTransferSetupLatencyRow" }, "type": "array", "title": "Setup Latency" } }, "type": "object", "required": [ "summary", "failure_reasons", "setup_latency" ], "title": "WarmTransferDashboardEnvelope" }, "WarmTransferFailureReasonRow": { "properties": { "failure_reason": { "type": "string", "title": "Failure Reason" }, "failed_attempts": { "type": "integer", "title": "Failed Attempts" }, "share_pct": { "type": "number", "title": "Share Pct" } }, "type": "object", "required": [ "failure_reason", "failed_attempts", "share_pct" ], "title": "WarmTransferFailureReasonRow" }, "WarmTransferSettingsResponse": { "properties": { "bridge_webhook_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Bridge Webhook Url" } }, "type": "object", "title": "WarmTransferSettingsResponse", "description": "GET response: the server-computed bridge webhook URL only.\n\n``bridge_webhook_url`` is the public ``/twilio/{org_id}/bridge`` endpoint each bridge\nnumber's Twilio Voice webhook points at (set programmatically at import time). Derived\nfrom ``settings.twilio_webhook_base_url`` + the org ID; ``None`` when the base is unset." }, "WarmTransferSetupLatencyRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "successful_attempts": { "type": "integer", "title": "Successful Attempts" }, "avg_setup_duration_ms": { "type": "number", "title": "Avg Setup Duration Ms" }, "p50_setup_duration_ms": { "type": "number", "title": "P50 Setup Duration Ms" }, "p95_setup_duration_ms": { "type": "number", "title": "P95 Setup Duration Ms" } }, "type": "object", "required": [ "time_bucket", "successful_attempts", "avg_setup_duration_ms", "p50_setup_duration_ms", "p95_setup_duration_ms" ], "title": "WarmTransferSetupLatencyRow" }, "WarmTransferSummaryRow": { "properties": { "attempts": { "type": "integer", "title": "Attempts" }, "successful_attempts": { "type": "integer", "title": "Successful Attempts" }, "failed_attempts": { "type": "integer", "title": "Failed Attempts" }, "success_rate_pct": { "type": "number", "title": "Success Rate Pct" }, "avg_success_setup_duration_ms": { "type": "number", "title": "Avg Success Setup Duration Ms" }, "p95_success_setup_duration_ms": { "type": "number", "title": "P95 Success Setup Duration Ms" } }, "type": "object", "required": [ "attempts", "successful_attempts", "failed_attempts", "success_rate_pct", "avg_success_setup_duration_ms", "p95_success_setup_duration_ms" ], "title": "WarmTransferSummaryRow" }, "WarmTransferTargetOverride": { "properties": { "briefing_template": { "anyOf": [ { "type": "string", "maxLength": 4000 }, { "type": "null" } ], "title": "Briefing Template" }, "message_mode": { "anyOf": [ { "type": "string", "enum": [ "ai_summary", "static", "prompt" ] }, { "type": "null" } ], "title": "Message Mode" } }, "additionalProperties": false, "type": "object", "title": "WarmTransferTargetOverride", "description": "Per-destination override of the destination-specific subset of WarmTransferConfig.\n\nLives on a ``TransferTargetConfig`` (assistant ``transfer_call`` tool target OR workflow\n``HandoffNode.channels.voice`` target). ``None`` fields inherit the tool/node-level\n``WarmTransferConfig`` baseline. Only the genuinely destination-specific fields are\noverridable here \u2014 the customer-experience + Twilio-mechanics timeouts (max_hold,\nreassurance, bridge_confirm, dial/briefing windows) stay tool/node-wide." }, "WebCallRequest": { "properties": { "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id", "description": "Agent whose VoicePipelineConfig drives the call. Provide this XOR `team_id`." }, "assistant_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assistant Revision Id", "description": "Optional: pin a specific revision for this test call (draft testing) instead of following the agent's active revision. Only valid alongside `agent_id`; must belong to that agent. Mirrors `TestChatStartRequest.assistant_revision_id` so a draft can be exercised over voice and chat without promoting it." }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id", "description": "Team to test against \u2014 the team-level VoicePipelineConfig drives the call and the team's default active agent (initial member) answers/greets. Provide this XOR `agent_id`." }, "context_variables": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Context Variables", "description": "Optional seed values for the bound agent's typed context variables, applied once at session bootstrap (same contract as the outbound-call door). Unknown key / uncoercible value \u2192 422. Single-agent bindings only in v1 (ignored for team-bound test calls)." }, "test_features": { "anyOf": [ { "$ref": "#/components/schemas/TestSessionFeatureInput" }, { "type": "null" } ], "description": "Optional test-session feature toggles (identity resolution, memory, summarization, extraction, evaluations, knowledge-gap analysis). Omitted / null resolves to all-off. Mirrors `TestChatStartRequest.test_features`." } }, "type": "object", "title": "WebCallRequest", "description": "Browser-initiated test call against an agent or team.\n\nMints a short-lived LiveKit access token whose ``RoomConfiguration``\nembeds an ``agent_dispatch`` directive \u2014 when the browser connects, the\nvoice-worker is auto-dispatched into the freshly-created room. The\nserver signs the selected principal into token metadata so the browser\ncannot tamper with what it is testing. Single-agent calls resolve the\nselected revision's bound workflow or open AgentNode fallback. Team calls\npin the current active team revision and roster; an unpinned member's\nassistant revision resolves through the normal active-revision rule." }, "WebCallResponse": { "properties": { "livekit_url": { "type": "string", "title": "Livekit Url", "description": "wss:// URL the browser passes to livekit-client.connect()." }, "access_token": { "type": "string", "title": "Access Token", "description": "Short-lived (5 min) LiveKit JWT. Embeds RoomAgentDispatch so the voice-worker auto-joins when the browser connects." }, "room_name": { "type": "string", "title": "Room Name" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "end_user_id": { "type": "string", "format": "uuid", "title": "End User Id", "description": "The EndUser this call's conversation is bound to. A throwaway random id when `test_features.identity_resolution` is false; the caller's resolved `internal:` EndUser when true. Parity with `TestChatStartResponse.end_user_id`." }, "test_features": { "$ref": "#/components/schemas/TestSessionFeatures", "description": "The resolved test-session feature snapshot for this call." } }, "type": "object", "required": [ "livekit_url", "access_token", "room_name", "session_id", "end_user_id", "test_features" ], "title": "WebCallResponse" }, "WebhookEventResponse": { "properties": { "event_id": { "type": "string", "title": "Event Id" }, "event_kind": { "type": "string", "title": "Event Kind" }, "event_type": { "type": "string", "title": "Event Type" }, "received_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Received At" }, "vendor": { "type": "string", "title": "Vendor" }, "integration_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Integration Key" }, "vendor_connection_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Vendor Connection Id" }, "connection_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Connection Id" }, "nickname": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Nickname" }, "nickname_slug": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Nickname Slug" }, "payload": { "additionalProperties": true, "type": "object", "title": "Payload" } }, "type": "object", "required": [ "event_id", "event_kind", "event_type", "vendor" ], "title": "WebhookEventResponse", "description": "One received webhook event for the org-scoped viewer (Step 13).\n\nRead-only projection of a Redis audit-log entry written by\n``WebhookService.ingest``, annotated with the resolved connection's\nlocal id + nickname when the event maps to one of the caller-org's\nconnections. Forward events (e.g. Slack ``app_mention``) are\naudit-only in v1 \u2014 this is a testing/observability surface, not a\nruntime trigger." }, "WhoAmIResponse": { "properties": { "user_id": { "type": "string", "format": "uuid", "title": "User Id" }, "clerk_user_id": { "type": "string", "title": "Clerk User Id" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email" }, "display_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Name" }, "role": { "type": "string", "title": "Role" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "organization_name": { "type": "string", "title": "Organization Name" }, "kb_clearance_level": { "type": "integer", "title": "Kb Clearance Level" }, "kb_acl_enabled": { "type": "boolean", "title": "Kb Acl Enabled" }, "is_internal": { "type": "boolean", "title": "Is Internal", "default": false } }, "type": "object", "required": [ "user_id", "clerk_user_id", "role", "organization_id", "organization_name", "kb_clearance_level", "kb_acl_enabled" ], "title": "WhoAmIResponse", "description": "The authenticated caller's own identity + resolved role and KB clearance.\n\nReturned by ``GET /identity/whoami`` so the dashboard can learn the caller's\nrole (Clerk ``org:*``) and effective KB clearance for client-side gating\nwithout an org-scoped or admin-only call. Backend RBAC remains the source of\ntruth for every mutation; this only drives UI affordances." }, "WidgetCreate": { "properties": { "name": { "type": "string", "maxLength": 255, "minLength": 1, "title": "Name" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "theme": { "additionalProperties": true, "type": "object", "title": "Theme" }, "copy": { "additionalProperties": true, "type": "object", "title": "Copy" }, "behavior": { "additionalProperties": true, "type": "object", "title": "Behavior" }, "limits": { "additionalProperties": true, "type": "object", "title": "Limits" } }, "type": "object", "required": [ "name" ], "title": "WidgetCreate" }, "WidgetResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "is_enabled": { "type": "boolean", "title": "Is Enabled" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "public_key": { "type": "string", "title": "Public Key" }, "kill_epoch": { "type": "integer", "title": "Kill Epoch" }, "theme": { "additionalProperties": true, "type": "object", "title": "Theme" }, "copy": { "additionalProperties": true, "type": "object", "title": "Copy" }, "behavior": { "additionalProperties": true, "type": "object", "title": "Behavior" }, "limits": { "additionalProperties": true, "type": "object", "title": "Limits" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "domains": { "items": { "$ref": "#/components/schemas/DomainResponse" }, "type": "array", "title": "Domains" } }, "type": "object", "required": [ "id", "organization_id", "name", "is_enabled", "agent_id", "team_id", "agent_revision_id", "public_key", "kill_epoch", "theme", "copy", "behavior", "limits", "created_at", "updated_at" ], "title": "WidgetResponse" }, "WidgetUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 255, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "is_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Enabled" }, "agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Id" }, "team_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Id" }, "agent_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Agent Revision Id" }, "theme": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Theme" }, "copy": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Copy" }, "behavior": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Behavior" }, "limits": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Limits" } }, "type": "object", "title": "WidgetUpdate" }, "WireAttachment": { "properties": { "storage_object_id": { "type": "string", "format": "uuid", "title": "Storage Object Id" }, "filename": { "type": "string", "maxLength": 255, "title": "Filename" }, "content_type": { "type": "string", "maxLength": 255, "title": "Content Type" }, "size_bytes": { "type": "integer", "minimum": 0.0, "title": "Size Bytes" }, "disposition": { "type": "string", "enum": [ "inline", "attachment" ], "title": "Disposition", "default": "attachment" }, "content_id": { "anyOf": [ { "type": "string", "maxLength": 255 }, { "type": "null" } ], "title": "Content Id" } }, "additionalProperties": false, "type": "object", "required": [ "storage_object_id", "filename", "content_type", "size_bytes" ], "title": "WireAttachment", "description": "An attachment reference. Envelopes never carry bytes \u2014 the blob must\nalready be staged in ``StorageObject`` and is referenced by id." }, "WorkflowAttachmentResponse": { "properties": { "agent_id": { "type": "string", "format": "uuid", "title": "Agent Id" }, "agent_name": { "type": "string", "title": "Agent Name" }, "agent_revision_id": { "type": "string", "format": "uuid", "title": "Agent Revision Id" }, "priority": { "type": "integer", "title": "Priority" }, "enabled": { "type": "boolean", "title": "Enabled" }, "is_active_revision": { "type": "boolean", "title": "Is Active Revision" } }, "type": "object", "required": [ "agent_id", "agent_name", "agent_revision_id", "priority", "enabled", "is_active_revision" ], "title": "WorkflowAttachmentResponse", "description": "One agent-revision that has this workflow attached (reverse projection).\n\nBuilt by joining agent_revisions.root_workflow_revision_id \u2192 workflow_revisions\n\u2192 AgentRevision \u2192 Agent, scoped through the workflow's org.\n``is_active_revision`` is True when the linking agent-revision is the agent's\nCURRENT active (published) revision \u2014 i.e. the workflow is live for that\nagent, not merely attached to a draft revision." }, "WorkflowCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "kind": { "$ref": "#/components/schemas/WorkflowKind", "default": "component" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "type": "object", "required": [ "name" ], "title": "WorkflowCreate" }, "WorkflowDetailResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "kind": { "type": "string", "title": "Kind", "default": "assistant" }, "active_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Active Revision Id" }, "active_revision": { "anyOf": [ { "$ref": "#/components/schemas/WorkflowRevisionResponse" }, { "type": "null" } ] }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "attachments": { "items": { "$ref": "#/components/schemas/WorkflowAttachmentResponse" }, "type": "array", "title": "Attachments" } }, "type": "object", "required": [ "id", "organization_id", "name", "created_at", "updated_at" ], "title": "WorkflowDetailResponse", "description": "Full workflow detail \u2014 identity + active revision + reverse attachments\n(\"which agent revisions use this workflow\")." }, "WorkflowGenerateRequest": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "brief": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Brief" }, "template_id": { "anyOf": [ { "type": "string", "pattern": "^[a-z0-9_-]+$" }, { "type": "null" } ], "title": "Template Id" }, "blank": { "type": "boolean", "title": "Blank", "default": false }, "kind": { "$ref": "#/components/schemas/WorkflowKind", "default": "component" } }, "type": "object", "required": [ "name" ], "title": "WorkflowGenerateRequest", "description": "Body for ``POST /workflows/generate``.\n\nExactly one of ``brief`` / ``template_id`` / ``blank`` must be supplied\n(enforced below; else 422). ``brief`` runs the async compile pipeline;\n``template_id`` / ``blank`` seed a graph synchronously (LLM-free)." }, "WorkflowGenerateResponse": { "properties": { "workflow_id": { "type": "string", "format": "uuid", "title": "Workflow Id" }, "revision_id": { "type": "string", "format": "uuid", "title": "Revision Id" }, "generation_status": { "type": "string", "title": "Generation Status" }, "mode": { "type": "string", "enum": [ "brief", "template", "blank" ], "title": "Mode" } }, "type": "object", "required": [ "workflow_id", "revision_id", "generation_status", "mode" ], "title": "WorkflowGenerateResponse", "description": "Result of ``generate``. ``generation_status`` is the new revision's\n``compilation_status`` (``pending`` for a fresh brief, ``succeeded`` for\ntemplate/blank/cache-hit). ``mode`` echoes which seed ran." }, "WorkflowGraphOpsRequest": { "properties": { "base_version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Base Version" }, "ops": { "items": { "oneOf": [ { "$ref": "#/components/schemas/UpsertNodeOp" }, { "$ref": "#/components/schemas/RemoveNodeOp" }, { "$ref": "#/components/schemas/UpdateNodeFieldsOp" }, { "$ref": "#/components/schemas/AddEdgeOp" }, { "$ref": "#/components/schemas/RemoveEdgeOp" }, { "$ref": "#/components/schemas/SetEntryNodeOp" }, { "$ref": "#/components/schemas/UpsertContextVariableOp" }, { "$ref": "#/components/schemas/RemoveContextVariableOp" }, { "$ref": "#/components/schemas/SetPersonaOp" }, { "$ref": "#/components/schemas/SetComponentOutputsOp" } ], "discriminator": { "propertyName": "op", "mapping": { "add_edge": "#/components/schemas/AddEdgeOp", "remove_context_variable": "#/components/schemas/RemoveContextVariableOp", "remove_edge": "#/components/schemas/RemoveEdgeOp", "remove_node": "#/components/schemas/RemoveNodeOp", "set_component_outputs": "#/components/schemas/SetComponentOutputsOp", "set_entry_node": "#/components/schemas/SetEntryNodeOp", "set_persona": "#/components/schemas/SetPersonaOp", "update_node_fields": "#/components/schemas/UpdateNodeFieldsOp", "upsert_context_variable": "#/components/schemas/UpsertContextVariableOp", "upsert_node": "#/components/schemas/UpsertNodeOp" } } }, "type": "array", "maxItems": 200, "title": "Ops" } }, "type": "object", "required": [ "ops" ], "title": "WorkflowGraphOpsRequest", "description": "Body for ``POST /revisions/{id}/graph/ops`` \u2014 an ordered PATCH batch." }, "WorkflowGraphRequest": { "properties": { "compiled_graph": { "additionalProperties": true, "type": "object", "title": "Compiled Graph" }, "base_version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Base Version" } }, "type": "object", "required": [ "compiled_graph" ], "title": "WorkflowGraphRequest", "description": "Body for validating or manually replacing a revision's compiled graph." }, "WorkflowGraphResponse": { "properties": { "revision_id": { "type": "string", "format": "uuid", "title": "Revision Id" }, "workflow_id": { "type": "string", "format": "uuid", "title": "Workflow Id" }, "compiled_graph": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Compiled Graph" }, "graph_version": { "type": "integer", "title": "Graph Version" }, "compilation_status": { "type": "string", "title": "Compilation Status" }, "compilation_errors": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Compilation Errors" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "revision_id", "workflow_id", "graph_version", "compilation_status", "updated_at" ], "title": "WorkflowGraphResponse", "description": "Graph-only projection for editor clients." }, "WorkflowGraphUpdateResponse": { "properties": { "updated": { "type": "boolean", "title": "Updated" }, "validation": { "$ref": "#/components/schemas/WorkflowGraphValidationResponse" }, "revision": { "anyOf": [ { "$ref": "#/components/schemas/WorkflowRevisionResponse" }, { "type": "null" } ] }, "graph_version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Graph Version" }, "blocking_error_count": { "type": "integer", "title": "Blocking Error Count", "default": 0 } }, "type": "object", "required": [ "updated", "validation" ], "title": "WorkflowGraphUpdateResponse", "description": "Result of a manual graph update (PUT /graph or PATCH /graph/ops).\n\n``updated=False`` means the graph won't parse or carries a *blocking* error at\nthe write gate and the revision was left unchanged; the response status is 422\nand ``validation.findings`` explains why. ``updated=True`` with ``valid=False``\n(in ``validation``) and ``blocking_error_count == 0`` is the permissive-draft\ncase: the graph saved but is not yet activation-ready (completeness gaps\nremain). ``graph_version`` is the revision's counter after a successful write." }, "WorkflowGraphValidationResponse": { "properties": { "valid": { "type": "boolean", "title": "Valid" }, "error_count": { "type": "integer", "title": "Error Count" }, "warning_count": { "type": "integer", "title": "Warning Count" }, "suggestion_count": { "type": "integer", "title": "Suggestion Count" }, "findings": { "items": { "$ref": "#/components/schemas/ValidationFinding" }, "type": "array", "title": "Findings" }, "normalized_graph": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Normalized Graph" }, "blocking_error_count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Blocking Error Count" } }, "type": "object", "required": [ "valid", "error_count", "warning_count", "suggestion_count" ], "title": "WorkflowGraphValidationResponse", "description": "Validation result for a submitted ``CompiledWorkflowGraph`` payload." }, "WorkflowInfo": { "properties": { "name": { "type": "string", "title": "Name" }, "title": { "type": "string", "title": "Title" }, "description": { "type": "string", "title": "Description" } }, "type": "object", "required": [ "name", "title", "description" ], "title": "WorkflowInfo" }, "WorkflowKind": { "type": "string", "enum": [ "assistant", "component" ], "title": "WorkflowKind" }, "WorkflowResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "kind": { "type": "string", "title": "Kind", "default": "assistant" }, "active_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Active Revision Id" }, "active_revision": { "anyOf": [ { "$ref": "#/components/schemas/WorkflowRevisionResponse" }, { "type": "null" } ] }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "created_at", "updated_at" ], "title": "WorkflowResponse" }, "WorkflowRevisionCreate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name", "description": "Optional; when omitted an auto-generated Conductor-style name is minted ({city}-{epoch}, e.g. 'nairobi-1752170893')." }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "based_on_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Based On Revision Id" }, "instructions": { "type": "string", "title": "Instructions" }, "compilation_strategy": { "anyOf": [ { "$ref": "#/components/schemas/CompilationStrategy" }, { "type": "null" } ] }, "trigger_type": { "anyOf": [ { "$ref": "#/components/schemas/TriggerType" }, { "type": "null" } ] }, "trigger_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Trigger Config" }, "router_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Router Config Id" }, "analyzer_model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "router_model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "policy_ids": { "anyOf": [ { "items": { "type": "string", "format": "uuid" }, "type": "array" }, { "type": "null" } ], "title": "Policy Ids" } }, "type": "object", "required": [ "instructions" ], "title": "WorkflowRevisionCreate" }, "WorkflowRevisionDiffResponse": { "properties": { "workflow_id": { "type": "string", "format": "uuid", "title": "Workflow Id" }, "base": { "$ref": "#/components/schemas/RevisionDiffSide" }, "target": { "$ref": "#/components/schemas/RevisionDiffSide" }, "fidelity": { "type": "string", "enum": [ "exact", "approximate", "source_only" ], "title": "Fidelity" }, "source_diff": { "$ref": "#/components/schemas/SourceDiff" }, "graph_diff": { "anyOf": [ { "$ref": "#/components/schemas/GraphDiff" }, { "type": "null" } ] }, "component_update_only": { "type": "boolean", "title": "Component Update Only", "default": false } }, "type": "object", "required": [ "workflow_id", "base", "target", "fidelity", "source_diff" ], "title": "WorkflowRevisionDiffResponse", "description": "Top-level response returned by GET /workflows/{id}/revisions/diff." }, "WorkflowRevisionResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "workflow_id": { "type": "string", "format": "uuid", "title": "Workflow Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "instructions": { "type": "string", "title": "Instructions" }, "compiled_graph": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Compiled Graph" }, "executable_graph": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Executable Graph" }, "quality_report": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Quality Report" }, "compilation_errors": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Compilation Errors" }, "compilation_strategy": { "type": "string", "title": "Compilation Strategy" }, "compilation_status": { "type": "string", "title": "Compilation Status" }, "compilation_task_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Compilation Task Id" }, "compilation_input_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Compilation Input Hash" }, "trigger_type": { "type": "string", "title": "Trigger Type" }, "trigger_config": { "additionalProperties": true, "type": "object", "title": "Trigger Config" }, "router_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Router Config Id" }, "analyzer_model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "router_model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "policy_ids": { "items": {}, "type": "array", "title": "Policy Ids" }, "tool_input_defaults": { "anyOf": [ { "additionalProperties": { "additionalProperties": { "$ref": "#/components/schemas/InputArgConfig" }, "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Tool Input Defaults" }, "tools": { "items": { "$ref": "#/components/schemas/WorkflowToolResponse" }, "type": "array", "title": "Tools" }, "knowledge_base_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Knowledge Base Ids" }, "created_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Created By" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "graph_version": { "type": "integer", "title": "Graph Version", "default": 0 }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings" } }, "type": "object", "required": [ "id", "workflow_id", "name", "instructions", "compilation_strategy", "compilation_status", "trigger_type", "trigger_config", "created_at", "updated_at" ], "title": "WorkflowRevisionResponse", "description": "Full revision response \u2014 the compile-poll target (WF-08).\n\nClients poll GET /workflows/revisions/{id} and read ``compilation_status``\n+ ``compilation_errors`` + ``compiled_graph`` to determine whether an\nasync compile job is done. ``compilation_task_id`` is the Celery task\nhandle the conductor uses to cancel an in-flight compile." }, "WorkflowRevisionUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions", "description": "Read-only after creation; supplying a value returns 422. Edit the graph instead." }, "compilation_strategy": { "anyOf": [ { "$ref": "#/components/schemas/CompilationStrategy" }, { "type": "null" } ] }, "trigger_type": { "anyOf": [ { "$ref": "#/components/schemas/TriggerType" }, { "type": "null" } ] }, "trigger_config": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Trigger Config" }, "router_config_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Router Config Id" }, "analyzer_model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "router_model_settings": { "anyOf": [ { "$ref": "#/components/schemas/ModelChainEntry" }, { "type": "null" } ] }, "policy_ids": { "anyOf": [ { "items": { "type": "string", "format": "uuid" }, "type": "array" }, { "type": "null" } ], "title": "Policy Ids" } }, "type": "object", "title": "WorkflowRevisionUpdate" }, "WorkflowTemplateSummary": { "properties": { "id": { "type": "string", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" } }, "type": "object", "required": [ "id", "name", "description" ], "title": "WorkflowTemplateSummary" }, "WorkflowToolResponse": { "properties": { "tool": { "$ref": "#/components/schemas/ToolResponse" } }, "type": "object", "required": [ "tool" ], "title": "WorkflowToolResponse", "description": "Tool attached to a workflow revision." }, "WorkflowUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" } }, "type": "object", "title": "WorkflowUpdate" }, "src__analytics__integrations__schemas__DashboardEnvelope": { "properties": { "summary": { "items": { "$ref": "#/components/schemas/src__analytics__integrations__schemas__DashboardSummaryRow" }, "type": "array", "title": "Summary" }, "usage": { "items": { "$ref": "#/components/schemas/src__analytics__integrations__schemas__InvocationsTimeseriesRow" }, "type": "array", "title": "Usage" }, "success_rate": { "items": { "$ref": "#/components/schemas/src__analytics__integrations__schemas__SuccessRateTimeseriesRow" }, "type": "array", "title": "Success Rate" }, "latency": { "items": { "$ref": "#/components/schemas/src__analytics__integrations__schemas__LatencyTimeseriesRow" }, "type": "array", "title": "Latency" }, "by_integration": { "items": { "$ref": "#/components/schemas/InvocationsByIntegrationRow" }, "type": "array", "title": "By Integration" }, "by_mode": { "items": { "$ref": "#/components/schemas/InvocationsByModeRow" }, "type": "array", "title": "By Mode" }, "error_breakdown": { "items": { "$ref": "#/components/schemas/src__analytics__integrations__schemas__ErrorBreakdownRow" }, "type": "array", "title": "Error Breakdown" } }, "type": "object", "required": [ "summary", "usage", "success_rate", "latency", "by_integration", "by_mode", "error_breakdown" ], "title": "DashboardEnvelope", "description": "Combined dashboard payload \u2014 one envelope, every integration panel.\n\n`summary` is at most one row but the underlying pipe returns a list, so we\nkeep it as a (possibly empty) list rather than special-casing it on the\nclient." }, "src__analytics__integrations__schemas__DashboardSummaryRow": { "properties": { "current_invocations": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Current Invocations" }, "previous_invocations": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Previous Invocations" }, "pct_change_invocations": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Pct Change Invocations" }, "current_failures": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Current Failures" }, "previous_failures": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Previous Failures" }, "pct_change_failures": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Pct Change Failures" }, "current_success_rate_pct": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Current Success Rate Pct" }, "previous_success_rate_pct": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Previous Success Rate Pct" }, "pct_change_success_rate_pct": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Pct Change Success Rate Pct" }, "current_avg_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Current Avg Latency Ms" }, "previous_avg_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Previous Avg Latency Ms" }, "pct_change_avg_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Pct Change Avg Latency Ms" }, "current_p95_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Current P95 Latency Ms" }, "previous_p95_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Previous P95 Latency Ms" }, "pct_change_p95_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Pct Change P95 Latency Ms" } }, "type": "object", "title": "DashboardSummaryRow" }, "src__analytics__integrations__schemas__ErrorBreakdownRow": { "properties": { "error_category": { "type": "string", "title": "Error Category" }, "count": { "type": "integer", "title": "Count" }, "share_pct": { "type": "number", "title": "Share Pct" } }, "type": "object", "required": [ "error_category", "count", "share_pct" ], "title": "ErrorBreakdownRow" }, "src__analytics__integrations__schemas__InvocationsTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "invocations": { "type": "integer", "title": "Invocations" }, "successful": { "type": "integer", "title": "Successful" }, "vendor_errors": { "type": "integer", "title": "Vendor Errors" }, "exceptions": { "type": "integer", "title": "Exceptions" } }, "type": "object", "required": [ "time_bucket", "invocations", "successful", "vendor_errors", "exceptions" ], "title": "InvocationsTimeseriesRow" }, "src__analytics__integrations__schemas__LatencyTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "invocations": { "type": "integer", "title": "Invocations" }, "p50_ms": { "type": "number", "title": "P50 Ms" }, "p90_ms": { "type": "number", "title": "P90 Ms" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "p99_ms": { "type": "number", "title": "P99 Ms" }, "avg_ms": { "type": "number", "title": "Avg Ms" }, "max_ms": { "type": "number", "title": "Max Ms" } }, "type": "object", "required": [ "time_bucket", "invocations", "p50_ms", "p90_ms", "p95_ms", "p99_ms", "avg_ms", "max_ms" ], "title": "LatencyTimeseriesRow" }, "src__analytics__integrations__schemas__SuccessRateTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "invocations": { "type": "integer", "title": "Invocations" }, "successful": { "type": "integer", "title": "Successful" }, "success_rate_pct": { "type": "number", "title": "Success Rate Pct" } }, "type": "object", "required": [ "time_bucket", "invocations", "successful", "success_rate_pct" ], "title": "SuccessRateTimeseriesRow" }, "src__analytics__model_router__schemas__ErrorBreakdownRow": { "properties": { "error_category": { "type": "string", "title": "Error Category" }, "occurrences": { "type": "integer", "title": "Occurrences" } }, "type": "object", "required": [ "error_category", "occurrences" ], "title": "ErrorBreakdownRow" }, "src__analytics__model_router__schemas__ErrorTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "terminal_total": { "type": "integer", "title": "Terminal Total" }, "terminal_errors": { "type": "integer", "title": "Terminal Errors" }, "error_rate": { "type": "number", "title": "Error Rate" } }, "type": "object", "required": [ "time_bucket", "terminal_total", "terminal_errors", "error_rate" ], "title": "ErrorTimeseriesRow" }, "src__analytics__model_router__schemas__LatencyTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "p50_ms": { "type": "number", "title": "P50 Ms" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "p99_ms": { "type": "number", "title": "P99 Ms" }, "avg_ms": { "type": "number", "title": "Avg Ms" }, "invocations": { "type": "integer", "title": "Invocations" } }, "type": "object", "required": [ "time_bucket", "p50_ms", "p95_ms", "p99_ms", "avg_ms", "invocations" ], "title": "LatencyTimeseriesRow" }, "src__analytics__policy__schemas__DashboardEnvelope": { "properties": { "violation_rate": { "items": { "$ref": "#/components/schemas/ViolationRateRow" }, "type": "array", "title": "Violation Rate" }, "action_breakdown": { "items": { "$ref": "#/components/schemas/ActionBreakdownRow" }, "type": "array", "title": "Action Breakdown" }, "violations_timeseries": { "items": { "$ref": "#/components/schemas/ViolationsTimeseriesRow" }, "type": "array", "title": "Violations Timeseries" }, "monitor_rollout": { "items": { "$ref": "#/components/schemas/MonitorRolloutRow" }, "type": "array", "title": "Monitor Rollout" } }, "type": "object", "required": [ "violation_rate", "action_breakdown", "violations_timeseries", "monitor_rollout" ], "title": "DashboardEnvelope" }, "src__analytics__sessions__schemas__VolumeTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "channel": { "type": "string", "title": "Channel" }, "sessions_created": { "type": "integer", "title": "Sessions Created" } }, "type": "object", "required": [ "time_bucket", "channel", "sessions_created" ], "title": "VolumeTimeseriesRow" }, "src__analytics__tools__schemas__DashboardEnvelope": { "properties": { "summary": { "items": { "$ref": "#/components/schemas/src__analytics__tools__schemas__DashboardSummaryRow" }, "type": "array", "title": "Summary" }, "top_tools": { "items": { "$ref": "#/components/schemas/DashboardTopToolsRow" }, "type": "array", "title": "Top Tools" }, "health_matrix": { "items": { "$ref": "#/components/schemas/DashboardHealthMatrixRow" }, "type": "array", "title": "Health Matrix" }, "recent_errors": { "items": { "$ref": "#/components/schemas/DashboardRecentErrorRow" }, "type": "array", "title": "Recent Errors" } }, "type": "object", "required": [ "summary", "top_tools", "health_matrix", "recent_errors" ], "title": "DashboardEnvelope", "description": "Combined dashboard payload \u2014 one envelope, four pre-aggregated panels.\n\n`summary` is at most one row but the underlying pipe returns a list, so\nwe keep it as a (possibly empty) list rather than special-casing it on\nthe client." }, "src__analytics__tools__schemas__DashboardSummaryRow": { "properties": { "current_invocations": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Current Invocations" }, "previous_invocations": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Previous Invocations" }, "pct_change_invocations": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Pct Change Invocations" }, "current_errors": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Current Errors" }, "previous_errors": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Previous Errors" }, "pct_change_errors": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Pct Change Errors" }, "current_success_rate": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Current Success Rate" }, "previous_success_rate": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Previous Success Rate" }, "pct_change_success_rate": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Pct Change Success Rate" }, "current_avg_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Current Avg Latency Ms" }, "previous_avg_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Previous Avg Latency Ms" }, "pct_change_avg_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Pct Change Avg Latency Ms" }, "current_p95_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Current P95 Latency Ms" }, "previous_p95_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Previous P95 Latency Ms" }, "pct_change_p95_latency_ms": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Pct Change P95 Latency Ms" }, "current_active_tools": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Current Active Tools" }, "previous_active_tools": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Previous Active Tools" }, "pct_change_active_tools": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Pct Change Active Tools" } }, "type": "object", "title": "DashboardSummaryRow" }, "src__analytics__tools__schemas__ErrorBreakdownRow": { "properties": { "error_category": { "type": "string", "title": "Error Category" }, "count": { "type": "integer", "title": "Count" }, "percentage_of_total_errors": { "type": "number", "title": "Percentage Of Total Errors" } }, "type": "object", "required": [ "error_category", "count", "percentage_of_total_errors" ], "title": "ErrorBreakdownRow" }, "src__analytics__tools__schemas__ErrorTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "error_category": { "type": "string", "title": "Error Category" }, "count": { "type": "integer", "title": "Count" } }, "type": "object", "required": [ "time_bucket", "error_category", "count" ], "title": "ErrorTimeseriesRow" }, "src__analytics__tools__schemas__InvocationsTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "invocations": { "type": "integer", "title": "Invocations" }, "successful": { "type": "integer", "title": "Successful" }, "failed": { "type": "integer", "title": "Failed" } }, "type": "object", "required": [ "time_bucket", "invocations", "successful", "failed" ], "title": "InvocationsTimeseriesRow" }, "src__analytics__tools__schemas__LatencyTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "invocations": { "type": "integer", "title": "Invocations" }, "p50_ms": { "type": "number", "title": "P50 Ms" }, "p90_ms": { "type": "number", "title": "P90 Ms" }, "p95_ms": { "type": "number", "title": "P95 Ms" }, "p99_ms": { "type": "number", "title": "P99 Ms" }, "avg_ms": { "type": "number", "title": "Avg Ms" }, "max_ms": { "type": "number", "title": "Max Ms" } }, "type": "object", "required": [ "time_bucket", "invocations", "p50_ms", "p90_ms", "p95_ms", "p99_ms", "avg_ms", "max_ms" ], "title": "LatencyTimeseriesRow" }, "src__analytics__tools__schemas__SuccessRateTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "total_invocations": { "type": "integer", "title": "Total Invocations" }, "successful": { "type": "integer", "title": "Successful" }, "failed": { "type": "integer", "title": "Failed" }, "success_rate_pct": { "type": "number", "title": "Success Rate Pct" } }, "type": "object", "required": [ "time_bucket", "total_invocations", "successful", "failed", "success_rate_pct" ], "title": "SuccessRateTimeseriesRow" }, "src__analytics__voice__schemas__VolumeTimeseriesRow": { "properties": { "time_bucket": { "type": "string", "format": "date-time", "title": "Time Bucket" }, "calls_total": { "type": "integer", "title": "Calls Total" }, "completed": { "type": "integer", "title": "Completed" }, "failed": { "type": "integer", "title": "Failed" }, "no_answer": { "type": "integer", "title": "No Answer" } }, "type": "object", "required": [ "time_bucket", "calls_total", "completed", "failed", "no_answer" ], "title": "VolumeTimeseriesRow" }, "src__ask_feather__schemas__MessageResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "seq": { "type": "integer", "title": "Seq" }, "role": { "type": "string", "title": "Role" }, "content": { "anyOf": [ { "items": {}, "type": "array" }, { "additionalProperties": true, "type": "object" }, { "type": "string" } ], "title": "Content" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "turn_id": { "type": "string", "format": "uuid", "title": "Turn Id" } }, "type": "object", "required": [ "id", "seq", "role", "content", "created_at", "turn_id" ], "title": "MessageResponse" }, "src__ask_feather__schemas__SendMessageRequest": { "properties": { "content": { "type": "string", "maxLength": 20000, "minLength": 1, "title": "Content" }, "workflow": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Workflow" } }, "type": "object", "required": [ "content" ], "title": "SendMessageRequest" }, "src__ask_feather__schemas__SessionDetailResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "usage": { "$ref": "#/components/schemas/SessionUsage" }, "messages": { "items": { "$ref": "#/components/schemas/src__ask_feather__schemas__MessageResponse" }, "type": "array", "title": "Messages" }, "messages_next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Messages Next Cursor" }, "has_more_messages": { "type": "boolean", "title": "Has More Messages", "default": false }, "pending_approvals": { "items": { "$ref": "#/components/schemas/PendingApproval" }, "type": "array", "title": "Pending Approvals", "default": [] }, "budget": { "anyOf": [ { "$ref": "#/components/schemas/BudgetStatus" }, { "type": "null" } ] }, "active_turn": { "anyOf": [ { "$ref": "#/components/schemas/ActiveTurn" }, { "type": "null" } ] } }, "type": "object", "required": [ "id", "title", "created_at", "updated_at", "usage", "messages" ], "title": "SessionDetailResponse" }, "src__ask_feather__schemas__SessionResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "title", "created_at", "updated_at" ], "title": "SessionResponse" }, "src__ask_feather__schemas__WorkflowListResponse": { "properties": { "workflows": { "items": { "$ref": "#/components/schemas/WorkflowInfo" }, "type": "array", "title": "Workflows" } }, "type": "object", "required": [ "workflows" ], "title": "WorkflowListResponse" }, "src__communication__email__threads__schemas__MessageResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "direction": { "type": "string", "enum": [ "inbound", "outbound" ], "title": "Direction" }, "provider_message_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider Message Id" }, "provider_thread_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider Thread Id" }, "rfc822_message_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Rfc822 Message Id" }, "in_reply_to_header": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "In Reply To Header" }, "from_address": { "type": "string", "title": "From Address" }, "to_addresses": { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array", "title": "To Addresses" }, "cc_addresses": { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array", "title": "Cc Addresses" }, "bcc_addresses": { "items": { "$ref": "#/components/schemas/EmailAddress" }, "type": "array", "title": "Bcc Addresses" }, "subject": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Subject" }, "content": { "type": "string", "title": "Content" }, "triage_decision": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Triage Decision" }, "triage_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Triage Reason" }, "delivery_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Delivery Status" }, "delivery_status_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Delivery Status At" }, "sent_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Sent At" }, "received_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Received At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "additionalProperties": false, "type": "object", "required": [ "id", "direction", "provider_message_id", "provider_thread_id", "rfc822_message_id", "in_reply_to_header", "from_address", "subject", "content", "triage_decision", "triage_reason", "delivery_status", "delivery_status_at", "sent_at", "received_at", "created_at" ], "title": "MessageResponse", "description": "One message in a thread.\n\n``content`` carries the brain's view \u2014 post-ContentNormalizer (ENG-417)\nthis is the quoted-history-stripped text. Full-fidelity provider\npayloads live in ``raw_storage_object_id`` references on the inbound\nevent but aren't surfaced here in v1." }, "src__conversation__schemas__RetentionPolicyResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "turn_retention_days": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Turn Retention Days" }, "session_retention_days": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Session Retention Days" }, "archive_strategy": { "type": "string", "enum": [ "soft_delete", "hard_delete" ], "title": "Archive Strategy" }, "is_default": { "type": "boolean", "title": "Is Default" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "archive_strategy", "is_default", "created_at", "updated_at" ], "title": "RetentionPolicyResponse" }, "src__conversation__schemas__SessionDetailResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "end_user_id": { "type": "string", "format": "uuid", "title": "End User Id" }, "channel": { "type": "string", "title": "Channel" }, "surface": { "type": "string", "title": "Surface" }, "external_session_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Session Id" }, "status": { "type": "string", "enum": [ "queued", "ringing", "active", "paused", "waiting_for_human", "transferred", "awaiting_approval", "pending_dispatch", "closed", "expired", "error", "superseded" ], "title": "Status" }, "session_type": { "type": "string", "enum": [ "live", "test", "simulation" ], "title": "Session Type", "default": "live" }, "priority": { "type": "string", "enum": [ "low", "normal", "high", "urgent" ], "title": "Priority" }, "subject": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Subject" }, "assigned_agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assigned Agent Id" }, "retention_policy_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Retention Policy Id" }, "summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Summary" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "context_variables": { "additionalProperties": true, "type": "object", "title": "Context Variables" }, "message_count": { "type": "integer", "title": "Message Count" }, "first_message_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "First Message At" }, "last_message_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Message At" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "ended_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Ended At" }, "closed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Closed At" }, "ttl_expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Ttl Expires At" }, "retention_expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Retention Expires At" }, "archived_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Archived At" }, "memory_sync_state": { "type": "string", "enum": [ "pending", "synced", "skipped", "suppressed" ], "title": "Memory Sync State", "default": "pending" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Ms" }, "summary_preview": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Summary Preview" }, "has_recording": { "type": "boolean", "title": "Has Recording", "default": false }, "eval_summary": { "$ref": "#/components/schemas/SessionEvalSummary" }, "test_features": { "anyOf": [ { "$ref": "#/components/schemas/TestSessionFeatures" }, { "type": "null" } ] }, "revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Revision Id" }, "revision_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Name" }, "revision_version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Revision Version" }, "team_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Revision Id" }, "team_revision_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Team Revision Name" }, "from_number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "From Number" }, "to_number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "To Number" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email" }, "recent_turns": { "items": { "$ref": "#/components/schemas/src__conversation__schemas__TurnResponse" }, "type": "array", "title": "Recent Turns", "default": [] }, "recording_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Recording Url" } }, "type": "object", "required": [ "id", "organization_id", "end_user_id", "channel", "surface", "status", "priority", "message_count", "started_at", "created_at", "updated_at" ], "title": "SessionDetailResponse" }, "src__conversation__schemas__SessionResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "end_user_id": { "type": "string", "format": "uuid", "title": "End User Id" }, "channel": { "type": "string", "title": "Channel" }, "surface": { "type": "string", "title": "Surface" }, "external_session_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Session Id" }, "status": { "type": "string", "enum": [ "queued", "ringing", "active", "paused", "waiting_for_human", "transferred", "awaiting_approval", "pending_dispatch", "closed", "expired", "error", "superseded" ], "title": "Status" }, "session_type": { "type": "string", "enum": [ "live", "test", "simulation" ], "title": "Session Type", "default": "live" }, "priority": { "type": "string", "enum": [ "low", "normal", "high", "urgent" ], "title": "Priority" }, "subject": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Subject" }, "assigned_agent_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Assigned Agent Id" }, "retention_policy_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Retention Policy Id" }, "summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Summary" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "context_variables": { "additionalProperties": true, "type": "object", "title": "Context Variables" }, "message_count": { "type": "integer", "title": "Message Count" }, "first_message_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "First Message At" }, "last_message_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Message At" }, "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, "ended_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Ended At" }, "closed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Closed At" }, "ttl_expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Ttl Expires At" }, "retention_expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Retention Expires At" }, "archived_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Archived At" }, "memory_sync_state": { "type": "string", "enum": [ "pending", "synced", "skipped", "suppressed" ], "title": "Memory Sync State", "default": "pending" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Ms" }, "summary_preview": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Summary Preview" }, "has_recording": { "type": "boolean", "title": "Has Recording", "default": false }, "eval_summary": { "$ref": "#/components/schemas/SessionEvalSummary" }, "test_features": { "anyOf": [ { "$ref": "#/components/schemas/TestSessionFeatures" }, { "type": "null" } ] }, "revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Revision Id" }, "revision_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Revision Name" }, "revision_version": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Revision Version" }, "team_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Team Revision Id" }, "team_revision_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Team Revision Name" }, "from_number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "From Number" }, "to_number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "To Number" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email" } }, "type": "object", "required": [ "id", "organization_id", "end_user_id", "channel", "surface", "status", "priority", "message_count", "started_at", "created_at", "updated_at" ], "title": "SessionResponse" }, "src__conversation__schemas__TurnResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" }, "seq": { "type": "integer", "title": "Seq" }, "role": { "type": "string", "enum": [ "user", "assistant", "system", "tool", "system_event" ], "title": "Role" }, "content": { "type": "string", "title": "Content" }, "tool_calls": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ToolCall" }, "type": "array" }, { "type": "null" } ], "title": "Tool Calls" }, "tool_results": { "anyOf": [ { "$ref": "#/components/schemas/ToolResult" }, { "type": "null" } ] }, "model_used": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model Used" }, "token_count": { "anyOf": [ { "$ref": "#/components/schemas/TokenCount" }, { "type": "null" } ] }, "latency_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Latency Ms" }, "is_compacted": { "type": "boolean", "title": "Is Compacted", "default": false }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "delivery_status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Delivery Status" }, "authored_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Authored By" }, "evidence": { "anyOf": [ { "oneOf": [ { "$ref": "#/components/schemas/EvidencePackageDisplay" }, { "$ref": "#/components/schemas/EvidencePackageFull" } ], "discriminator": { "propertyName": "view", "mapping": { "display": "#/components/schemas/EvidencePackageDisplay", "full": "#/components/schemas/EvidencePackageFull" } } }, { "type": "null" } ], "title": "Evidence" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" }, "sources": { "anyOf": [ { "items": { "$ref": "#/components/schemas/TurnSource" }, "type": "array" }, { "type": "null" } ], "title": "Sources" } }, "type": "object", "required": [ "id", "session_id", "seq", "role", "content", "created_at" ], "title": "TurnResponse" }, "src__knowledge_base__governance_schemas__RetentionPolicyResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "retention_days": { "type": "integer", "title": "Retention Days" }, "legal_hold_enabled": { "type": "boolean", "title": "Legal Hold Enabled" }, "legal_hold_reason": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Legal Hold Reason" }, "legal_hold_set_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Legal Hold Set By" }, "legal_hold_set_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Legal Hold Set At" }, "archive_before_delete": { "type": "boolean", "title": "Archive Before Delete" }, "archive_destination": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Archive Destination" }, "policy_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Policy Version" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "retention_days", "legal_hold_enabled", "archive_before_delete", "created_at", "updated_at" ], "title": "RetentionPolicyResponse", "description": "Org audit-retention policy + legal-hold state." }, "src__runtime__conversation_schemas__TurnResponse": { "properties": { "turn_id": { "type": "string", "format": "uuid", "title": "Turn Id" }, "conversation_id": { "type": "string", "format": "uuid", "title": "Conversation Id" }, "text": { "type": "string", "title": "Text" }, "active_assistant_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Active Assistant Id" }, "answering_assistant_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Answering Assistant Id" }, "path": { "type": "string", "title": "Path" }, "decision_source": { "type": "string", "title": "Decision Source" }, "message_seqs": { "items": { "type": "integer" }, "type": "array", "title": "Message Seqs" }, "session_status": { "type": "string", "title": "Session Status" }, "turn_ttft_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Turn Ttft Ms" }, "ended": { "type": "boolean", "title": "Ended", "default": false }, "evidence": { "anyOf": [ { "oneOf": [ { "$ref": "#/components/schemas/EvidencePackageDisplay" }, { "$ref": "#/components/schemas/EvidencePackageFull" } ], "discriminator": { "propertyName": "view", "mapping": { "display": "#/components/schemas/EvidencePackageDisplay", "full": "#/components/schemas/EvidencePackageFull" } } }, { "type": "null" } ], "title": "Evidence" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" }, "sources": { "anyOf": [ { "items": { "$ref": "#/components/schemas/TurnSource" }, "type": "array" }, { "type": "null" } ], "title": "Sources" } }, "type": "object", "required": [ "turn_id", "conversation_id", "text", "active_assistant_id", "path", "decision_source", "message_seqs", "session_status" ], "title": "TurnResponse", "description": "The outcome of one driven turn \u2014 mirrors ``driver.TurnResult``." }, "src__shared__pagination__CursorPage_SessionResponse___1": { "properties": { "items": { "items": { "$ref": "#/components/schemas/src__conversation__schemas__SessionResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[SessionResponse]" }, "src__shared__pagination__CursorPage_SessionResponse___2": { "properties": { "items": { "items": { "$ref": "#/components/schemas/src__ask_feather__schemas__SessionResponse" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" }, "has_more": { "type": "boolean", "title": "Has More" } }, "type": "object", "required": [ "items", "has_more" ], "title": "CursorPage[SessionResponse]" }, "src__workflow__api__schemas__WorkflowListResponse": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "kind": { "type": "string", "title": "Kind", "default": "assistant" }, "active_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Active Revision Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "organization_id", "name", "created_at", "updated_at" ], "title": "WorkflowListResponse" }, "src__workflow__diff__models__GraphMeta": { "properties": { "persona": { "$ref": "#/components/schemas/TextDiff" } }, "type": "object", "required": [ "persona" ], "title": "GraphMeta", "description": "Workflow-scope graph metadata diff." }, "src__workflow__playground__schemas__GraphMeta": { "properties": { "name": { "type": "string", "title": "Name" }, "entry_node_id": { "type": "string", "title": "Entry Node Id" }, "persona": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Persona" } }, "type": "object", "required": [ "name", "entry_node_id" ], "title": "GraphMeta", "description": "The small graph descriptor surfaced to a client on session start / GET." }, "src__workflow__playground__schemas__SendMessageRequest": { "properties": { "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "message" ], "title": "SendMessageRequest" } }, "securitySchemes": { "APIKeyHeader": { "type": "apiKey", "in": "header", "name": "x-api-key" } } } }