{ "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.21.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/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": { "post": { "tags": [ "identity" ], "summary": "Resolve a channel source to an end user (graph-backed)", "operationId": "resolveIdentity", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolveIdentityRequest" } } }, "required": true }, "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" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/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 (auto-merges on org_external_end_user_id conflict)", "operationId": "updateEndUser", "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/EndUserUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/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" } } } }, "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/memory/users/{end_user_id}": { "get": { "tags": [ "memory" ], "summary": "Get all facts and entities 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" } } ], "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" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "memory" ], "summary": "Delete all memories for a user (GDPR)", "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" }, "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\nFor segmented jobs, re-dispatches only the segments that failed.\nFor non-segmented (single-pass) jobs, resets the job and version\nstate and re-dispatches ``prepare_document``.\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", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportRequest" } } }, "required": true }, "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" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/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 selectable models plus per-role runtime model defaults", "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": "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 (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.", "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}/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/src__custom_tools__api__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/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/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": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by status; null lists all.", "default": "pending", "title": "Status" }, "description": "Filter by status; null lists all." }, { "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": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by handoff status.", "title": "Status" }, "description": "Filter by handoff 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/v2/conversations": { "post": { "tags": [ "runtime v2" ], "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": [ "runtime v2" ], "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": "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_SessionResponse_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/v2/conversations/{conversation_id}/turns": { "post": { "tags": [ "runtime v2" ], "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" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "runtime v2" ], "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/v2/conversations/{conversation_id}": { "get": { "tags": [ "runtime v2" ], "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": [ "runtime v2" ], "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/v2/conversations/{conversation_id}/close": { "post": { "tags": [ "runtime v2" ], "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/v2/conversations/{conversation_id}/end_session": { "post": { "tags": [ "runtime v2" ], "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/v2/conversations/test-chat": { "post": { "tags": [ "runtime v2" ], "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 ``api`` channel with\na throwaway ``end_user_id`` (no identity-graph node \u2014 the ``test``\ndiscriminator suppresses memory sync, summary generation, and identity\nwrites). The dashboard \"Try this \u2026\" panel then drives turns via\n``POST /v2/conversations/{id}/turns/stream`` passing 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`` resolves\nthe roster and pins ``bound_revisions`` 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/v2/conversations/{conversation_id}/messages": { "get": { "tags": [ "runtime v2" ], "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/v2/conversations/{conversation_id}/trace": { "get": { "tags": [ "runtime v2" ], "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/v2/conversations/{conversation_id}/turns/{turn_id}/trace": { "get": { "tags": [ "runtime v2" ], "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/v2/conversations/{conversation_id}/engineering/turns": { "get": { "tags": [ "runtime v2" ], "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/v2/conversations/{conversation_id}/engineering/turns/{turn_id}": { "get": { "tags": [ "runtime v2" ], "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/v2/conversations/{conversation_id}/reevaluate": { "post": { "tags": [ "runtime v2" ], "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 ``/v2/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/v2/conversations/{conversation_id}/turns/stream": { "post": { "tags": [ "runtime v2" ], "summary": "Run one v2 conversation turn with an SSE response", "description": "SSE counterpart to ``POST /v2/conversations/{id}/turns``.\n\nToken streaming: the v2 ``ConversationTurnDriver`` runs the turn as one\nread-modify-write transaction but now accepts an ``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`` runs the org-scope check\nand the turn (inside the driver task), and is committed before the\n``complete`` frame so the FastAPI dependency teardown doesn't hold it open\nacross the response. The generator only touches the session after the driver\ntask has 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" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/agents": { "post": { "tags": [ "agents" ], "summary": "Create an agent", "operationId": "createAgent", "security": [ { "APIKeyHeader": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentResponse" } } } }, "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": [ "agents" ], "summary": "List agents", "operationId": "listAgents", "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_AgentListResponse_" } } } }, "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/agents/{agent_id}/variables": { "get": { "tags": [ "agents" ], "summary": "List declared context variables across an agent's bound workflows", "description": "Aggregate the union of ``context_variables`` declared across the\nworkflows bound to the agent's active revision.\n\nUsed by the evaluator-create UI to drive a typo-safe dropdown for the\n``agent.variable_extracted`` deterministic-eval signal. The service owns the\nunion + dedup (agent-own wins) and returns typed ``ContextVarSpec`` \u2014 this\nhandler just maps each spec to the response shape.", "operationId": "listAgentVariables", "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/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/agents/{agent_id}": { "get": { "tags": [ "agents" ], "summary": "Get an agent", "operationId": "getAgent", "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" } } } }, "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": [ "agents" ], "summary": "Update an agent", "operationId": "updateAgent", "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/AgentUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentResponse" } } } }, "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": [ "agents" ], "summary": "Delete an agent", "operationId": "deleteAgent", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Agent 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/agents/{agent_id}/eval-config": { "get": { "tags": [ "agents" ], "summary": "Get per-agent eval configuration", "operationId": "getAgentEvalConfig", "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": [ "agents" ], "summary": "Set per-agent eval configuration", "operationId": "setAgentEvalConfig", "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/agents/platform-tools/catalog": { "get": { "tags": [ "agents" ], "summary": "List the platform tools an agent can enable", "description": "Static projection of the hard-coded platform-tool registry. Org-independent \u2014 the dashboard\nrenders this to drive the per-agent enable/disable toggles without hard-coding the catalog.", "operationId": "getPlatformToolCatalog", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformToolCatalogResponse" } } } }, "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/agents/{agent_id}/platform-tools": { "get": { "tags": [ "agents" ], "summary": "Get an agent's enabled platform tools", "operationId": "getAgentPlatformTools", "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" } } } } } }, "put": { "tags": [ "agents" ], "summary": "Set an agent's enabled platform tools", "operationId": "setAgentPlatformTools", "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/AgentPlatformToolsUpdate" } } } }, "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/agents/{agent_id}/revisions": { "post": { "tags": [ "agents" ], "summary": "Create an agent revision", "operationId": "createAgentRevision", "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/AgentRevisionCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentRevisionResponse" } } } }, "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": [ "agents" ], "summary": "List agent revisions", "operationId": "listAgentRevisions", "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/CursorPage_AgentRevisionResponse_" } } } }, "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/agents/revisions/{revision_id}": { "get": { "tags": [ "agents" ], "summary": "Get an agent revision", "operationId": "getAgentRevision", "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/AgentRevisionResponse" } } } }, "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": [ "agents" ], "summary": "Update an agent revision", "operationId": "updateAgentRevision", "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/AgentRevisionUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentRevisionResponse" } } } }, "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": [ "agents" ], "summary": "Delete an agent revision", "operationId": "deleteAgentRevision", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "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" } } } } } } }, "/v1/agents/{agent_id}/set-active-revision": { "post": { "tags": [ "agents" ], "summary": "Set active agent revision", "operationId": "setActiveAgentRevision", "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/src__agents__schemas__SetActiveRevisionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentRevisionResponse" } } } }, "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/agents/{agent_id}/revisions/{revision_id}/release-check": { "post": { "tags": [ "agents" ], "summary": "Dispatch the agent's release simulation suite against a candidate revision", "description": "Dispatch the agent's configured release suite pinned to ``revision_id``.\n\nPhase 1 is advisory: this returns the ``SimulationSuiteRun`` handle stamped\n``release_eval_status='pending'``. Once every child session's evals settle,\nthe eval task's barrier rolls up a verdict onto the same row (poll\n``GET /v1/sim-suites/{suite_id}/runs/{suite_run_id}``).", "operationId": "runAgentReleaseCheck", "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": [ "agents" ], "summary": "Latest release-check verdict for a candidate revision", "description": "Return the latest release-check ``SimulationSuiteRun`` for the revision.\n\nPowers advisory display and the \"why blocked\" panel without the client\ntracking the suite-run id. 404 when the agent has no release suite or no\nrelease check has run for the revision.", "operationId": "getAgentRevisionReleaseCheck", "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/agents/revisions/{revision_id}/tool-input-defaults": { "get": { "tags": [ "agents" ], "summary": "Get an agent revision's tool-input defaults (enriched view)", "operationId": "getAgentRevisionToolInputDefaults", "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": [ "agents" ], "summary": "Replace an agent revision's tool-input defaults", "operationId": "setAgentRevisionToolInputDefaults", "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/agents/revisions/{revision_id}/workflows": { "post": { "tags": [ "agents" ], "summary": "Attach a workflow to agent revision", "operationId": "attachWorkflowToAgent", "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/AttachWorkflowRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentRevisionWorkflowResponse" } } } }, "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": [ "agents" ], "summary": "List workflows attached to agent revision", "operationId": "listAgentRevisionWorkflows", "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/AgentRevisionWorkflowResponse" }, "title": "Response Listagentrevisionworkflows" } } } }, "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/agents/revisions/{revision_id}/workflows/{workflow_id}": { "put": { "tags": [ "agents" ], "summary": "Update workflow link on agent revision", "operationId": "updateWorkflowLink", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } }, { "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/UpdateWorkflowLinkRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentRevisionWorkflowResponse" } } } }, "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": [ "agents" ], "summary": "Detach workflow from agent revision", "operationId": "detachWorkflowFromAgent", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "revision_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Revision Id" } }, { "name": "workflow_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Workflow Id" } } ], "responses": { "204": { "description": "Successful Response" }, "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/agents/revisions/{revision_id}/policies": { "get": { "tags": [ "policies" ], "summary": "Get an assistant revision's attached policies", "operationId": "getAgentRevisionPolicies", "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": "setAgentRevisionPolicies", "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": "detachAgentRevisionPolicies", "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/agents/{agent_id}/enforcement-plan": { "get": { "tags": [ "policies" ], "summary": "Describe an assistant's policy enforcement plan (per point, per transport)", "operationId": "getAgentEnforcementPlan", "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/src__agents__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/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", "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/{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", "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": "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}/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", "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": "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", "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": "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/{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/privacy/config": { "get": { "tags": [ "privacy" ], "summary": "Get privacy config for organization", "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" } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "post": { "tags": [ "privacy" ], "summary": "Create privacy config for organization", "operationId": "createPrivacyConfig", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrivacyConfigCreate" } } }, "required": true }, "responses": { "201": { "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": [] } ] }, "patch": { "tags": [ "privacy" ], "summary": "Update privacy config for organization", "operationId": "updatePrivacyConfig", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrivacyConfigUpdate" } } }, "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" } } } }, "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/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": "Delete a phone number", "description": "Delete a phone number.\n\nBy default LK teardown must succeed before the row is removed; LK\nfailures surface as a 4xx so the caller can retry. ``force=true`` is an\ninternal-only escape hatch that drops the row even when LK is\nunreachable \u2014 used after manual reconciliation. Non-internal callers\nthat 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}/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" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/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/agents/{agent_id}/voice-config": { "get": { "tags": [ "voice" ], "summary": "Get the voice pipeline config for an agent", "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/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/teams/{team_id}/voice-config": { "get": { "tags": [ "voice" ], "summary": "Get the team-level voice pipeline config for a team", "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/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/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/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": [ { "const": "elevenlabs", "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": [ { "type": "string", "maxLength": 20 }, { "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; ``agent_id`` is JWT-signed\nand tamper-proof. The supervisor selects which enabled procedure runs\nfrom the agent's active-revision catalog on turn 1. The session is\ncreated with ``session_type=\"test\"`` so post-processing (summary,\nmemory sync) is skipped.", "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/voice/calls": { "post": { "tags": [ "voice" ], "summary": "Ingest a voice call (ASR + PII scrub + optional audio retention)", "operationId": "ingestVoiceCall", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_ingestVoiceCall" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceCallIngestResponse" } } } }, "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/calls/{call_id}": { "get": { "tags": [ "voice" ], "summary": "Get a voice call's scrubbed transcript and audio URL", "operationId": "getVoiceCall", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "call_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Call Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceCallGetResponse" } } } }, "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/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/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/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/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/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/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", "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" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/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": "vendor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Vendor" } }, { "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": "vendor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "pattern": "^(zep|mem0)$" }, { "type": "null" } ], "title": "Vendor" } }, { "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/recalls/by-vendor": { "get": { "tags": [ "analytics" ], "summary": "Per-vendor recall summary (zep vs mem0)", "operationId": "getMemoryRecallByVendor", "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/RecallByVendorRow" }, "title": "Response Getmemoryrecallbyvendor" } } } }, "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/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/agents/{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/agents/{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: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/sessions": { "get": { "tags": [ "ask-feather" ], "summary": "List Sessions", "operationId": "list_sessions_v1_ask_feather_sessions_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/src__ask_feather__schemas__SessionResponse" }, "type": "array", "title": "Response List Sessions V1 Ask Feather Sessions Get" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "post": { "tags": [ "ask-feather" ], "summary": "Create Session", "operationId": "create_session_v1_ask_feather_sessions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSessionRequest" } } }, "required": true }, "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" } } } } }, "security": [ { "APIKeyHeader": [] } ] } }, "/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": "Archive Session", "operationId": "archive_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": { "post": { "tags": [ "ask-feather" ], "summary": "Send Message", "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": { "200": { "description": "Successful Response" }, "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 (see the ``requires_approval`` SSE\nevent) with the user's approve/deny decisions, streaming the continuation.", "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": { "200": { "description": "Successful Response" }, "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": "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/{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}/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" } } ], "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" } } ], "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" } } } }, "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", "operationId": "validateWorkflowRevisionGraph", "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/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}/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/src__workflow__api__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/workflows/revisions/{revision_id}/compile": { "post": { "tags": [ "workflows" ], "summary": "Compile a workflow revision (async)", "description": "Resolve ``@references`` + compute the cache key. On a cache hit return the\nstored graph (HTTP 200, ``cached=true``); otherwise mark the revision\n``pending``, enqueue the Celery compile task, and return HTTP 202 with the\n``task_id``. Poll ``GET /workflows/revisions/{id}`` for the result.", "operationId": "compileWorkflowRevision", "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/CompileWorkflowRequest" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowCompileResponse" } } } }, "401": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "200": { "description": "Cache hit \u2014 the stored compiled graph was reused; no compile enqueued.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowCompileResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/workflows/revisions/{revision_id}/recompile": { "post": { "tags": [ "workflows" ], "summary": "Fork a workflow revision into a draft and recompile it", "description": "Recompile a (possibly published) revision without mutating it.\n\nThe active/published revision is immutable \u2014 the runtime reads its graph live \u2014\nso this forks the source into a fresh DRAFT, force-compiles the draft, and\nreturns it (HTTP 202). Poll ``GET /workflows/revisions/{revision.id}``; promote\nthe draft via ``set-active-revision`` once the recompile lands and is reviewed.", "operationId": "recompileWorkflowRevision", "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/RecompileWorkflowRequest" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowRecompileResponse" } } } }, "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}/compile/cancel": { "post": { "tags": [ "workflows" ], "summary": "Cancel an in-flight workflow compile (best-effort)", "operationId": "cancelWorkflowRevisionCompile", "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" } } } } } } }, "/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" }, "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. For\ntyped channels (email, phone, sms, voice, whatsapp, slack, twitter, etc.)\nthis produces a Contact with the matching type." }, "AgentCreate": { "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" }, "global_skill_ids": { "anyOf": [ { "items": { "type": "string", "format": "uuid" }, "type": "array" }, { "type": "null" } ], "title": "Global Skill Ids" }, "context_variables": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ContextVarSpec" }, "type": "array" }, { "type": "null" } ], "title": "Context Variables" }, "variable_defaults": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Variable Defaults" }, "channel_specific_config": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/ChannelConfig" }, "propertyNames": { "enum": [ "sms", "voice", "api", "sandbox", "email" ] }, "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" } ] }, "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 } }, "type": "object", "required": [ "name" ], "title": "AgentCreate" }, "AgentEvalConfigResponse": { "properties": { "evaluate_live": { "type": "boolean", "title": "Evaluate Live" }, "evaluate_test": { "type": "boolean", "title": "Evaluate Test" } }, "type": "object", "required": [ "evaluate_live", "evaluate_test" ], "title": "AgentEvalConfigResponse", "description": "Per-agent eval configuration exposed by ``/v1/agents/{id}/eval-config``.\n\nTwo independent toggles: ``evaluate_live`` gates ``SessionType.LIVE``\n(production) sessions and ``evaluate_test`` gates ``SessionType.TEST``\n(dev-initiated) sessions. Simulation runs always evaluate." }, "AgentEvalConfigUpdate": { "properties": { "evaluate_live": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Evaluate Live" }, "evaluate_test": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Evaluate Test" } }, "additionalProperties": false, "type": "object", "title": "AgentEvalConfigUpdate", "description": "Body for ``PUT /v1/agents/{id}/eval-config``.\n\nBoth fields are optional so the UI can flip one switch at a time without\nhaving to re-assert the other; a field left unset means \"no change\"." }, "AgentListResponse": { "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" }, "knowledge_gap_analysis_enabled": { "type": "boolean", "title": "Knowledge Gap Analysis 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": "AgentListResponse" }, "AgentPlatformToolsResponse": { "properties": { "platform_tools": { "additionalProperties": true, "type": "object", "title": "Platform Tools" } }, "type": "object", "title": "AgentPlatformToolsResponse" }, "AgentPlatformToolsUpdate": { "properties": { "platform_tools": { "additionalProperties": true, "type": "object", "title": "Platform Tools" } }, "type": "object", "title": "AgentPlatformToolsUpdate", "description": "Full-replace of an agent's enabled platform tools.\n\n``platform_tools`` is the complete enabled map \u2014 ``{toolName: {\u2026config\u2026}}`` (an empty object\nvalue = enabled with no per-tool config). Every key is validated against the hard-coded\nplatform-tool registry; an unknown name is rejected. Send ``{}`` to disable all." }, "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 }, "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" }, "AgentRevisionCreate": { "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" }, "persona": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Persona" }, "system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Prompt" }, "global_skill_ids": { "anyOf": [ { "items": { "type": "string", "format": "uuid" }, "type": "array" }, { "type": "null" } ], "title": "Global Skill Ids" }, "context_variables": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ContextVarSpec" }, "type": "array" }, { "type": "null" } ], "title": "Context Variables" }, "variable_defaults": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Variable Defaults" }, "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" }, "policies_enabled": { "type": "boolean", "title": "Policies Enabled", "default": true }, "policy_refs": { "anyOf": [ { "items": { "$ref": "#/components/schemas/PolicyRefSpec" }, "type": "array" }, { "type": "null" } ], "title": "Policy Refs" }, "channel_specific_config": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/ChannelConfig" }, "propertyNames": { "enum": [ "sms", "voice", "api", "sandbox", "email" ] }, "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" } ] }, "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" } }, "type": "object", "required": [ "name" ], "title": "AgentRevisionCreate" }, "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" }, "global_skill_ids": { "anyOf": [ { "items": { "type": "string", "format": "uuid" }, "type": "array" }, { "type": "null" } ], "title": "Global Skill Ids" }, "context_variables": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ContextVarSpec" }, "type": "array" }, { "type": "null" } ], "title": "Context Variables" }, "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" }, "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": { "enum": [ "sms", "voice", "api", "sandbox", "email" ] }, "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" } ] }, "kb_clearance_level": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Kb Clearance Level" }, "kb_audience_tags": { "items": { "type": "string" }, "type": "array", "title": "Kb Audience 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", "agent_id", "name", "created_at", "updated_at" ], "title": "AgentRevisionResponse" }, "AgentRevisionUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "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" }, "global_skill_ids": { "anyOf": [ { "items": { "type": "string", "format": "uuid" }, "type": "array" }, { "type": "null" } ], "title": "Global Skill Ids" }, "context_variables": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ContextVarSpec" }, "type": "array" }, { "type": "null" } ], "title": "Context Variables" }, "variable_defaults": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Variable Defaults" }, "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" }, "policies_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Policies Enabled" }, "policy_refs": { "anyOf": [ { "items": { "$ref": "#/components/schemas/PolicyRefSpec" }, "type": "array" }, { "type": "null" } ], "title": "Policy Refs" }, "channel_specific_config": { "anyOf": [ { "additionalProperties": { "$ref": "#/components/schemas/ChannelConfig" }, "propertyNames": { "enum": [ "sms", "voice", "api", "sandbox", "email" ] }, "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" } ] }, "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" } }, "type": "object", "title": "AgentRevisionUpdate" }, "AgentRevisionWorkflowResponse": { "properties": { "workflow_id": { "type": "string", "format": "uuid", "title": "Workflow Id" }, "workflow_name": { "type": "string", "title": "Workflow Name" }, "workflow_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Workflow Revision Id" }, "priority": { "type": "integer", "title": "Priority" }, "enabled": { "type": "boolean", "title": "Enabled" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "workflow_id", "workflow_name", "priority", "enabled", "created_at" ], "title": "AgentRevisionWorkflowResponse" }, "AgentUpdate": { "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" }, "knowledge_gap_analysis_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Knowledge Gap Analysis Enabled" }, "release_suite_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Release Suite Id" }, "release_gate_mode": { "anyOf": [ { "$ref": "#/components/schemas/ReleaseGateMode" }, { "type": "null" } ] }, "release_gate_max_failures": { "anyOf": [ { "type": "integer", "minimum": 0.0 }, { "type": "null" } ], "title": "Release Gate Max Failures" } }, "type": "object", "title": "AgentUpdate" }, "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" }, "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" }, "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": { "decisions": { "items": { "$ref": "#/components/schemas/ApprovalDecision" }, "type": "array", "minItems": 1, "title": "Decisions" } }, "type": "object", "required": [ "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" }, "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." }, "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." }, "AttachWorkflowRequest": { "properties": { "workflow_id": { "type": "string", "format": "uuid", "title": "Workflow Id" }, "workflow_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Workflow Revision Id" }, "priority": { "type": "integer", "title": "Priority", "default": 0 }, "enabled": { "type": "boolean", "title": "Enabled", "default": true } }, "type": "object", "required": [ "workflow_id" ], "title": "AttachWorkflowRequest" }, "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" }, "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 }, "supports_temperature": { "type": "boolean", "title": "Supports Temperature", "default": true }, "supports_thinking": { "type": "boolean", "title": "Supports Thinking", "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" }, "BackgroundAudioPreset": { "type": "string", "enum": [ "office", "cafe", "city", "keyboard_typing", "keyboard_typing2" ], "title": "BackgroundAudioPreset", "description": "Bundled CC0 ambience presets resolved by the voice worker.\n\nString values MUST match the keys of ``_PRESET_FILES`` in\n``src/communication/voice/agent/background_audio.py``; a unit test\n(``tests/voice/test_background_audio.py``) fails CI if the two ever\ndrift." }, "Body_ingestVoiceCall": { "properties": { "audio": { "type": "string", "contentMediaType": "application/octet-stream", "title": "Audio", "description": "Voice call audio (PCM WAV recommended)" }, "metadata": { "type": "string", "title": "Metadata", "description": "JSON object with keys: channel (str, required), external_id (str, optional), language (str, optional, default \"en\"), metadata (object, optional)" } }, "type": "object", "required": [ "audio", "metadata" ], "title": "Body_ingestVoiceCall" }, "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." }, "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)." }, "CallTransferIntent": { "properties": { "destination": { "type": "string", "title": "Destination" }, "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", "required": [ "destination" ], "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." }, "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." }, "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\n(templated). ``first_speaking_config`` is the first-speaking config\nfor this channel (also 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" } }, "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" }, "CompileWorkflowRequest": { "properties": { "force": { "type": "boolean", "title": "Force", "default": false }, "compilation_strategy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Compilation Strategy" } }, "type": "object", "title": "CompileWorkflowRequest", "description": "Body for ``POST /workflows/revisions/{id}/compile``." }, "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" }, "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" } }, "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" }, "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" }, "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." }, "ConversationCreate": { "properties": { "end_user_id": { "type": "string", "format": "uuid", "title": "End User Id" }, "channel": { "type": "string", "title": "Channel", "default": "chat" }, "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" }, "channel_subtype": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel Subtype" }, "origin": { "anyOf": [ { "type": "string", "enum": [ "inbound", "outbound" ] }, { "type": "null" } ], "title": "Origin" }, "session_type": { "type": "string", "enum": [ "live", "test", "simulation" ], "title": "Session Type", "default": "live" }, "external_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Id" }, "org_phone_number_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Org Phone Number 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" } }, "type": "object", "required": [ "end_user_id" ], "title": "ConversationCreate", "description": "Get-or-create a v2 conversation (Phase F2).\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." }, "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 /v2/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" }, "channel_subtype": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Channel Subtype" }, "origin": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Origin" }, "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" }, "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", "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." }, "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." }, "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" }, "CursorPage_AgentListResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/AgentListResponse" }, "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[AgentListResponse]" }, "CursorPage_AgentRevisionResponse_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/AgentRevisionResponse" }, "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[AgentRevisionResponse]" }, "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_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_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_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_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_SessionResponse_": { "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]" }, "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_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)." }, "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" }, "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" }, "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." }, "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." }, "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" }, "auth_results": { "$ref": "#/components/schemas/WireAuthResults" }, "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." }, "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" }, "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" }, "channel": { "type": "string", "title": "Channel", "default": "api" }, "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" } }, "type": "object", "required": [ "uid", "org_id", "status" ], "title": "EndUserResponse" }, "EndUserUpdate": { "properties": { "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": { "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" }, "ErrorResponse": { "properties": { "error": { "type": "string", "title": "Error" }, "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "error", "message" ], "title": "ErrorResponse", "description": "Standard error response returned by all API error handlers." }, "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" }, "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" }, "EscapeHatchChange": { "properties": { "trigger": { "type": "string", "title": "Trigger" }, "changes": { "items": { "$ref": "#/components/schemas/FieldChange" }, "type": "array", "title": "Changes" } }, "type": "object", "required": [ "trigger" ], "title": "EscapeHatchChange", "description": "Field-level changes within a matched (same trigger) escape hatch pair." }, "EscapeHatchCollectionDiff": { "properties": { "added": { "items": { "$ref": "#/components/schemas/ProjectedEscapeHatch" }, "type": "array", "title": "Added" }, "removed": { "items": { "$ref": "#/components/schemas/ProjectedEscapeHatch" }, "type": "array", "title": "Removed" }, "changed": { "items": { "$ref": "#/components/schemas/EscapeHatchChange" }, "type": "array", "title": "Changed" } }, "type": "object", "title": "EscapeHatchCollectionDiff", "description": "Diff over the escape_hatches collection." }, "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" }, "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" }, "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." }, "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" } }, "type": "object", "title": "EvidenceItemDisplay", "description": "One end-user source card \u2014 the ``display`` projection of an\n:class:`EvidenceItem`. Carries ONLY card fields; raw/basis/band scores,\nhashes, chunk ids, ``rag_query_id`` and constraints are never emitted." }, "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" }, "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." }, "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" }, "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." }, "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." }, "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" }, "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", "created_at" ], "title": "FallbackEventResponse" }, "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" }, "escape_hatches": { "$ref": "#/components/schemas/EscapeHatchCollectionDiff" } }, "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 }, "escape_hatches_added": { "type": "integer", "title": "Escape Hatches Added", "default": 0 }, "escape_hatches_removed": { "type": "integer", "title": "Escape Hatches Removed", "default": 0 }, "escape_hatches_changed": { "type": "integer", "title": "Escape Hatches 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" ], "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." }, "HealthResponse": { "properties": { "bridges": { "type": "integer", "title": "Bridges" }, "procedure": { "type": "string", "title": "Procedure" } }, "type": "object", "required": [ "bridges", "procedure" ], "title": "HealthResponse" }, "ImportBridgeNumberRequest": { "properties": { "twilio_number_sid": { "type": "string", "maxLength": 64, "minLength": 1, "title": "Twilio Number Sid" } }, "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 off-script ``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." }, "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", "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" }, "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", "knowledge_bases_count" ], "title": "KbInventoryRow" }, "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" }, "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" }, "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": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Tts Provider Data" }, "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" } ] }, "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" }, "voicemail_detection_mode": { "anyOf": [ { "$ref": "#/components/schemas/VoicemailDetectionMode" }, { "type": "null" } ] }, "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" }, "max_call_duration_ms": { "anyOf": [ { "type": "integer", "maximum": 14400000.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": [ { "$ref": "#/components/schemas/SilenceReminderMode" }, { "type": "null" } ] }, "silence_reminder_message": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Silence Reminder Message" }, "silence_end_action": { "anyOf": [ { "$ref": "#/components/schemas/SilenceEndAction" }, { "type": "null" } ] }, "silence_end_message": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Silence End Message" }, "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" }, "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" }, "background_audio_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Background Audio Enabled" }, "background_audio_preset": { "anyOf": [ { "$ref": "#/components/schemas/BackgroundAudioPreset" }, { "type": "null" } ] }, "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" }, "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." }, "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" }, "by_vendor": { "items": { "$ref": "#/components/schemas/RecallByVendorRow" }, "type": "array", "title": "By Vendor" }, "distribution": { "$ref": "#/components/schemas/UserDistributionRow" } }, "type": "object", "required": [ "ingestion", "coverage", "recalls", "by_vendor", "distribution" ], "title": "MemoryDashboardEnvelope", "description": "Single envelope returned by ``/v1/analytics/memory/dashboard``." }, "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" }, "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", "messages_synced", "success_rate_pct" ], "title": "MemoryIngestionTimeseriesRow" }, "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", "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" } }, "type": "object", "required": [ "models", "role_defaults" ], "title": "ModelCatalogResponse", "description": "Selectable models plus the per-role code defaults the runtime falls back to." }, "ModelChainEntry": { "properties": { "model": { "type": "string", "title": "Model" }, "config": { "$ref": "#/components/schemas/ModelConfig" } }, "type": "object", "required": [ "model" ], "title": "ModelChainEntry" }, "ModelConfig": { "properties": { "temperature": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Temperature" }, "max_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Tokens" }, "top_p": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Top P" }, "stop_sequences": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Stop Sequences" }, "reasoning_effort": { "anyOf": [ { "type": "string", "enum": [ "none", "low", "medium", "high", "xhigh" ] }, { "type": "null" } ], "title": "Reasoning Effort" }, "request_timeout_ms": { "anyOf": [ { "type": "integer" }, { "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" }, "total_cost_usd": { "type": "number", "title": "Total Cost Usd" }, "latency_ms": { "type": "integer", "title": "Latency Ms" }, "tool_calls": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Tool Calls" }, "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_tools", "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" }, "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." }, "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" }, "NodeChange": { "properties": { "id": { "type": "string", "title": "Id" }, "kind": { "type": "string", "enum": [ "agent", "action", "handoff", "approval" ], "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." }, "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)." }, "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" }, "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." }, "OrgSettings": { "properties": { "retry": { "anyOf": [ { "$ref": "#/components/schemas/RetryConfig" }, { "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" } }, "additionalProperties": true, "type": "object", "title": "OrgSettings", "description": "Typed schema for Organization.settings JSON column." }, "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" }, "plan": { "type": "string", "title": "Plan" }, "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", "plan", "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" }, "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." }, "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)." } }, "type": "object", "required": [ "from_phone_number_id", "to_phone_number" ], "title": "OutboundRequest" }, "OutboundResponse": { "properties": { "room_name": { "type": "string", "title": "Room Name" }, "dispatch_id": { "type": "string", "title": "Dispatch Id" }, "agent_name": { "type": "string", "title": "Agent Name" }, "session_id": { "type": "string", "format": "uuid", "title": "Session Id" } }, "type": "object", "required": [ "room_name", "dispatch_id", "agent_name", "session_id" ], "title": "OutboundResponse" }, "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" }, "Payload": { "additionalProperties": { "$ref": "#/components/schemas/JsonValue" }, "type": "object" }, "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": "agent" }, "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 } }, "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": { "type": "integer", "maximum": 20.0, "minimum": 0.0, "title": "Min Words", "default": 3 }, "min_duration_ms": { "type": "integer", "maximum": 10000.0, "minimum": 0.0, "title": "Min Duration Ms", "default": 300 }, "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``." }, "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" }, "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" }, "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." }, "PrivacyConfigCreate": { "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", "default": [ "ssn", "credit_card", "iban", "us_bank_number" ] }, "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.7 }, "audio_scrubbing_enabled": { "type": "boolean", "title": "Audio Scrubbing Enabled", "default": true }, "audio_retention_policy": { "type": "string", "enum": [ "transcript_only", "redacted_audio_retained", "raw" ], "title": "Audio Retention Policy", "default": "redacted_audio_retained" }, "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", "title": "PrivacyConfigCreate" }, "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_scrubbing_enabled": { "type": "boolean", "title": "Audio Scrubbing Enabled" }, "audio_retention_policy": { "type": "string", "title": "Audio Retention Policy" }, "audio_redaction_fill": { "type": "string", "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_scrubbing_enabled", "audio_retention_policy", "audio_redaction_fill", "supported_languages", "default_language", "language_detection_enabled", "created_at", "updated_at" ], "title": "PrivacyConfigResponse" }, "PrivacyConfigUpdate": { "properties": { "pii_scrubbing_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Pii Scrubbing Enabled" }, "scrub_types": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Scrub Types" }, "custom_deny_patterns": { "anyOf": [ { "items": { "$ref": "#/components/schemas/CustomDenyPattern" }, "type": "array", "maxItems": 128 }, { "type": "null" } ], "title": "Custom Deny Patterns" }, "custom_allow_patterns": { "anyOf": [ { "items": { "$ref": "#/components/schemas/CustomAllowPattern" }, "type": "array", "maxItems": 128 }, { "type": "null" } ], "title": "Custom Allow Patterns" }, "score_threshold": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Score Threshold" }, "audio_scrubbing_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Audio Scrubbing Enabled" }, "audio_retention_policy": { "anyOf": [ { "type": "string", "enum": [ "transcript_only", "redacted_audio_retained", "raw" ] }, { "type": "null" } ], "title": "Audio Retention Policy" }, "audio_redaction_fill": { "anyOf": [ { "type": "string", "enum": [ "silence", "tone_1khz" ] }, { "type": "null" } ], "title": "Audio Redaction Fill" }, "supported_languages": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Supported Languages" }, "default_language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Default Language" }, "language_detection_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Language Detection Enabled" } }, "type": "object", "title": "PrivacyConfigUpdate" }, "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." }, "ProjectedEscapeHatch": { "properties": { "trigger": { "type": "string", "title": "Trigger" }, "target_label": { "type": "string", "title": "Target Label" }, "static_line": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Static Line" } }, "type": "object", "required": [ "trigger", "target_label" ], "title": "ProjectedEscapeHatch", "description": "Author-facing escape hatch \u2014 trigger, rendered target, optional line." }, "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" ], "title": "Kind" }, "is_entry": { "type": "boolean", "title": "Is Entry", "default": false }, "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" }, "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" } }, "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- 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." }, "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." }, "RecallByVendorRow": { "properties": { "vendor": { "type": "string", "title": "Vendor" }, "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": [ "vendor", "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": "RecallByVendorRow" }, "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." }, "RecompileWorkflowRequest": { "properties": { "compilation_strategy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Compilation Strategy" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" } }, "type": "object", "title": "RecompileWorkflowRequest", "description": "Body for ``POST /workflows/revisions/{id}/recompile``.\n\nRecompile = fork the (typically frozen/published) source revision into a fresh\ndraft and force-compile the draft. ``name`` overrides the auto-generated draft\nname; ``compilation_strategy`` overrides the strategy carried from the source." }, "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", "blocking" ], "title": "ReleaseGateMode", "description": "Per-agent release-gate mode (ENG-727). ``off`` = no release checks;\n``advisory`` = compute + display a verdict but never block activation;\n``blocking`` = (Phase 2) refuse activation without a fresh passing verdict.\nDormant in Phase 1 \u2014 only the Phase-2 activation gate reads it." }, "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": 1 }, "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" }, "status": { "type": "string", "title": "Status" }, "session_eval_status": { "type": "string", "title": "Session Eval Status" }, "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 }, "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" }, "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" } }, "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 full dot-path" } }, "type": "object", "required": [ "path" ], "title": "ResponseFieldMapping", "description": "A single field to extract from a tool response body." }, "ResponseFieldSelector": { "properties": { "field_mappings": { "items": { "$ref": "#/components/schemas/ResponseFieldMapping" }, "type": "array", "title": "Field Mappings" } }, "type": "object", "title": "ResponseFieldSelector", "description": "Defines which fields to extract from 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)." }, "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)." }, "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", "title": "Name" }, "model_chain": { "items": { "$ref": "#/components/schemas/ModelChainEntry" }, "type": "array", "title": "Model Chain" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "is_default": { "type": "boolean", "title": "Is Default", "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" }, "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", "model_chain", "created_at", "updated_at" ], "title": "RouterConfigResponse" }, "RouterConfigUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "model_chain": { "anyOf": [ { "items": { "$ref": "#/components/schemas/ModelChainEntry" }, "type": "array" }, { "type": "null" } ], "title": "Model Chain" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "is_default": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Default" }, "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" }, "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": "" }, "mock_world": { "additionalProperties": true, "type": "object", "title": "Mock World" }, "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" }, "success_criteria": { "items": { "$ref": "#/components/schemas/SuccessCriterion" }, "type": "array", "title": "Success Criteria" } }, "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": "" }, "mock_world": { "additionalProperties": true, "type": "object", "title": "Mock World" }, "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" }, "success_criteria": { "items": { "$ref": "#/components/schemas/SuccessCriterion" }, "type": "array", "title": "Success Criteria" }, "mock_world": { "additionalProperties": true, "type": "object", "title": "Mock World" }, "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", "success_criteria", "mock_world", "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" }, "success_criteria": { "anyOf": [ { "items": { "$ref": "#/components/schemas/SuccessCriterion" }, "type": "array" }, { "type": "null" } ], "title": "Success Criteria" }, "mock_world": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Mock World" }, "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": 1, "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 as the Celery task id 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,\nthe Celery task id is derived from it so repeat POSTs with the same key\ndedup at the broker. Omit only for truly fire-once flows." }, "SendSmsResponse": { "properties": { "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": [ "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." }, "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)." }, "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", "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", "token_mint_failed", "sip_dial_failed", "participant_join_timeout", "setup_error", "stale_routing", "superseded", "duplicate_dispatch" ], "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)." }, "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" }, "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." }, "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." }, "SilenceEndAction": { "type": "string", "enum": [ "hangup_immediate", "speak_then_hangup" ], "title": "SilenceEndAction" }, "SilenceReminderMode": { "type": "string", "enum": [ "static", "auto" ], "title": "SilenceReminderMode" }, "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" } }, "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" }, "channel": { "$ref": "#/components/schemas/ScenarioChannel" }, "tool_overrides": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Tool Overrides" }, "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" }, "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", "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" } }, "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" }, "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" }, "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" }, "SmartRoutingMetadata": { "properties": { "classifier_model": { "type": "string", "title": "Classifier Model" }, "classifier_tier": { "type": "string", "enum": [ "economy", "standard", "premium" ], "title": "Classifier Tier" }, "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" }, "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" }, "system_prompt": { "$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", "system_prompt" ], "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." }, "SuccessCriterion": { "properties": { "description": { "type": "string", "maxLength": 500, "minLength": 1, "title": "Description" }, "output_type": { "$ref": "#/components/schemas/SuccessCriterionOutputType" } }, "type": "object", "required": [ "description", "output_type" ], "title": "SuccessCriterion" }, "SuccessCriterionOutputType": { "type": "string", "enum": [ "boolean", "score_5" ], "title": "SuccessCriterionOutputType" }, "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)." }, "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": { "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": { "additionalProperties": true, "type": "object", "title": "Capabilities" } }, "type": "object", "required": [ "external_id", "display_name" ], "title": "TTSModelOut" }, "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" } }, "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" }, "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" }, "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" } }, "type": "object", "title": "TeamUpdate" }, "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" }, "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" } }, "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 to avoid leaning on the\nidentity graph: every \"Reset\" or \"End session\" mints a new throwaway\n``end_user_id`` + ``ConversationSession`` row so dev-side Neo4j churn\n(wipes, merges, deletes) can never strand the panel with a stale uid.\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" } }, "type": "object", "required": [ "session_id", "end_user_id" ], "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" }, "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" }, "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" }, "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" }, "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" }, "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" }, "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." }, "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." }, "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": { "type": "string", "title": "Destination", "description": "Dial target \u2014 E.164 (e.g. +15105550100) or a sip: URI" }, "mode": { "type": "string", "enum": [ "cold", "warm" ], "title": "Mode", "default": "cold" } }, "additionalProperties": false, "type": "object", "required": [ "destination" ], "title": "TransferTargetInput", "description": "Operator-supplied config for a shared call_transfer target (ENG, voice).\n\nThe reusable cold-transfer destination. Mirrors the storage-facing fields of\n:class:`~src.shared.transfer_contracts.TransferTargetConfig`; the request\nlayer only checks shape/``mode`` here, while ``destination`` validity (E.164\nor ``sip:`` URI) is enforced at the service layer 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": { "type": "string", "title": "Destination" }, "mode": { "type": "string", "enum": [ "cold", "warm" ], "title": "Mode", "default": "cold" } }, "type": "object", "required": [ "destination" ], "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``." }, "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", "default": false }, "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." }, "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." }, "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." }, "UpdateWorkflowLinkRequest": { "properties": { "priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Priority" }, "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" }, "workflow_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Workflow Revision Id" } }, "type": "object", "title": "UpdateWorkflowLinkRequest" }, "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" }, "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" }, "VoiceCallGetResponse": { "properties": { "call": { "$ref": "#/components/schemas/VoiceCallSummary" }, "transcript": { "$ref": "#/components/schemas/VoiceTranscriptOut" }, "audio_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Audio Url" } }, "type": "object", "required": [ "call", "transcript" ], "title": "VoiceCallGetResponse" }, "VoiceCallIngestResponse": { "properties": { "call": { "$ref": "#/components/schemas/VoiceCallSummary" }, "transcript": { "$ref": "#/components/schemas/VoiceTranscriptOut" }, "audio_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Audio Url" } }, "type": "object", "required": [ "call", "transcript" ], "title": "VoiceCallIngestResponse" }, "VoiceCallSummary": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "organization_id": { "type": "string", "format": "uuid", "title": "Organization Id" }, "external_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Id" }, "channel": { "type": "string", "title": "Channel" }, "duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Ms" }, "audio_mime_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Audio Mime Type" }, "audio_retention_policy": { "type": "string", "title": "Audio Retention Policy" }, "scrub_status": { "type": "string", "title": "Scrub Status" }, "metadata": { "additionalProperties": true, "type": "object", "title": "Metadata" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "organization_id", "external_id", "channel", "duration_ms", "audio_mime_type", "audio_retention_policy", "scrub_status", "created_at" ], "title": "VoiceCallSummary" }, "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", "const": "elevenlabs", "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": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Tts Provider Data" }, "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" } ] }, "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" }, "voicemail_detection_mode": { "anyOf": [ { "$ref": "#/components/schemas/VoicemailDetectionMode" }, { "type": "null" } ] }, "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" }, "max_call_duration_ms": { "anyOf": [ { "type": "integer", "maximum": 14400000.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": [ { "$ref": "#/components/schemas/SilenceReminderMode" }, { "type": "null" } ] }, "silence_reminder_message": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Silence Reminder Message" }, "silence_end_action": { "anyOf": [ { "$ref": "#/components/schemas/SilenceEndAction" }, { "type": "null" } ] }, "silence_end_message": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Silence End Message" }, "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" }, "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" }, "background_audio_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Background Audio Enabled" }, "background_audio_preset": { "anyOf": [ { "$ref": "#/components/schemas/BackgroundAudioPreset" }, { "type": "null" } ] }, "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" }, "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" }, "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" }, "interruptions_enabled": { "type": "boolean", "title": "Interruptions Enabled" }, "interruption_min_words": { "type": "integer", "title": "Interruption Min Words" }, "interruption_min_duration_ms": { "type": "integer", "title": "Interruption Min Duration Ms" }, "interruption_backoff_ms": { "type": "integer", "title": "Interruption Backoff Ms" }, "interruption_sensitivity": { "type": "number", "title": "Interruption Sensitivity" }, "interruption_trigger_phrases": { "items": { "type": "string" }, "type": "array", "title": "Interruption Trigger Phrases" }, "interruption_hard_phrases": { "items": { "type": "string" }, "type": "array", "title": "Interruption Hard Phrases" }, "interruption_final_transcript_grace_ms": { "type": "integer", "title": "Interruption Final Transcript Grace Ms" }, "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" }, "voicemail_detection_mode": { "type": "string", "title": "Voicemail Detection Mode" }, "voicemail_detection_timeout_ms": { "type": "integer", "title": "Voicemail Detection Timeout Ms" }, "voicemail_detection_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Voicemail Detection Model" }, "voicemail_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Voicemail Message" }, "max_call_duration_ms": { "type": "integer", "title": "Max Call Duration Ms" }, "end_call_phrases": { "items": { "type": "string" }, "type": "array", "title": "End Call Phrases" }, "silence_timeout_ms": { "type": "integer", "title": "Silence Timeout Ms" }, "silence_reminder_count": { "type": "integer", "title": "Silence Reminder Count" }, "silence_reminder_mode": { "type": "string", "title": "Silence Reminder Mode" }, "silence_reminder_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Silence Reminder Message" }, "silence_end_action": { "type": "string", "title": "Silence End Action" }, "silence_end_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Silence End Message" }, "dtmf_enabled": { "type": "boolean", "title": "Dtmf Enabled" }, "dtmf_termination_digit": { "type": "string", "title": "Dtmf Termination Digit" }, "dtmf_inter_digit_timeout_ms": { "type": "integer", "title": "Dtmf Inter Digit Timeout Ms" }, "dtmf_max_digits": { "type": "integer", "title": "Dtmf Max Digits" }, "dtmf_prefix": { "type": "string", "title": "Dtmf Prefix" }, "backchannel_enabled": { "type": "boolean", "title": "Backchannel Enabled" }, "backchannel_frequency": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Backchannel Frequency" }, "pronunciation_overrides": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Pronunciation Overrides" }, "background_audio_preset": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Background Audio Preset" }, "background_audio_volume": { "type": "number", "title": "Background Audio Volume" }, "background_audio_loop": { "type": "boolean", "title": "Background Audio Loop" }, "background_audio_enabled": { "type": "boolean", "title": "Background Audio Enabled" }, "noise_cancellation_enabled": { "type": "boolean", "title": "Noise Cancellation Enabled" }, "recording_enabled": { "type": "boolean", "title": "Recording Enabled" }, "transcription_storage_enabled": { "type": "boolean", "title": "Transcription Storage Enabled" }, "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" }, "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" }, "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", "interruptions_enabled", "interruption_min_words", "interruption_min_duration_ms", "interruption_backoff_ms", "interruption_sensitivity", "interruption_final_transcript_grace_ms", "min_endpoint_delay_ms", "max_endpoint_delay_ms", "preemptive_generation_enabled", "voicemail_detection_mode", "voicemail_detection_timeout_ms", "max_call_duration_ms", "silence_timeout_ms", "silence_reminder_count", "silence_reminder_mode", "silence_end_action", "dtmf_enabled", "dtmf_termination_digit", "dtmf_inter_digit_timeout_ms", "dtmf_max_digits", "dtmf_prefix", "backchannel_enabled", "background_audio_volume", "background_audio_loop", "background_audio_enabled", "noise_cancellation_enabled", "recording_enabled", "transcription_storage_enabled", "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": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Tts Provider Data" }, "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" } ] }, "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" }, "voicemail_detection_mode": { "anyOf": [ { "$ref": "#/components/schemas/VoicemailDetectionMode" }, { "type": "null" } ] }, "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" }, "max_call_duration_ms": { "anyOf": [ { "type": "integer", "maximum": 14400000.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": [ { "$ref": "#/components/schemas/SilenceReminderMode" }, { "type": "null" } ] }, "silence_reminder_message": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Silence Reminder Message" }, "silence_end_action": { "anyOf": [ { "$ref": "#/components/schemas/SilenceEndAction" }, { "type": "null" } ] }, "silence_end_message": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Silence End Message" }, "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" }, "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" }, "background_audio_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Background Audio Enabled" }, "background_audio_preset": { "anyOf": [ { "$ref": "#/components/schemas/BackgroundAudioPreset" }, { "type": "null" } ] }, "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" }, "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" }, "VoiceTranscriptOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "voice_call_id": { "type": "string", "format": "uuid", "title": "Voice Call Id" }, "full_text": { "type": "string", "title": "Full Text" }, "was_scrubbed": { "type": "boolean", "title": "Was Scrubbed" }, "scrub_detection_count": { "type": "integer", "title": "Scrub Detection Count" }, "language": { "type": "string", "title": "Language" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "voice_call_id", "full_text", "was_scrubbed", "scrub_detection_count", "language", "created_at" ], "title": "VoiceTranscriptOut" }, "VoiceUpsertRequest": { "properties": { "provider": { "type": "string", "const": "elevenlabs", "title": "Provider" }, "external_id": { "type": "string", "maxLength": 128, "minLength": 1, "title": "External Id" } }, "type": "object", "required": [ "provider", "external_id" ], "title": "VoiceUpsertRequest" }, "VoicemailDetectionMode": { "type": "string", "enum": [ "off", "leave_message" ], "title": "VoicemailDetectionMode" }, "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" }, "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." }, "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." }, "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`." }, "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)." } }, "type": "object", "title": "WebCallRequest", "description": "Browser-initiated test call against an agent.\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 ``agent_id`` into the token metadata so the browser cannot\ntamper with which agent it is testing. The supervisor picks which\nenabled procedure runs from the agent's active-revision catalog on\nturn 1." }, "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" } }, "type": "object", "required": [ "livekit_url", "access_token", "room_name", "session_id" ], "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" } }, "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." }, "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." }, "WireAuthResults": { "properties": { "spf": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Spf" }, "dkim": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Dkim" }, "dmarc": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Dmarc" } }, "additionalProperties": false, "type": "object", "title": "WireAuthResults", "description": "SPF / DKIM / DMARC results from the receiving MTA." }, "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 AgentRevisionWorkflow \u2192 AgentRevision \u2192 Agent, scoped\nthrough the workflow's org. ``is_active_revision`` is True when the linking\nagent-revision is the agent's CURRENT active (published) revision \u2014 i.e. the\nworkflow is live for that agent, not merely attached to a draft revision." }, "WorkflowCompileResponse": { "properties": { "status": { "type": "string", "title": "Status" }, "task_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Task Id" }, "cached": { "type": "boolean", "title": "Cached", "default": false }, "revision": { "$ref": "#/components/schemas/WorkflowRevisionResponse" } }, "type": "object", "required": [ "status", "revision" ], "title": "WorkflowCompileResponse", "description": "Result of a compile request.\n\n``cached=True`` \u2192 the stored graph was reused (HTTP 200, no task ran).\nOtherwise the compile was enqueued (HTTP 202) and ``task_id`` is the handle\nfor polling (``GET /workflows/revisions/{id}``) and cancelling. ``status`` is\nthe revision's ``compilation_status`` after the call (``succeeded`` for a\ncache hit, ``pending`` for a fresh enqueue)." }, "WorkflowCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "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" }, "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\")." }, "WorkflowGraphRequest": { "properties": { "compiled_graph": { "additionalProperties": true, "type": "object", "title": "Compiled Graph" } }, "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" }, "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", "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" } ] } }, "type": "object", "required": [ "updated", "validation" ], "title": "WorkflowGraphUpdateResponse", "description": "Result of a manual graph update.\n\n``updated=False`` means validation failed and the revision was left unchanged;\nthe response status is 422 and ``validation.findings`` explains why." }, "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" } }, "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" }, "WorkflowRecompileResponse": { "properties": { "status": { "type": "string", "title": "Status" }, "task_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Task Id" }, "source_revision_id": { "type": "string", "format": "uuid", "title": "Source Revision Id" }, "revision": { "$ref": "#/components/schemas/WorkflowRevisionResponse" } }, "type": "object", "required": [ "status", "source_revision_id", "revision" ], "title": "WorkflowRecompileResponse", "description": "Result of a recompile (fork-then-compile).\n\n``revision`` is a NEW draft revision forked from ``source_revision_id`` and is\nbeing compiled (always HTTP 202 \u2014 a recompile always forces). Poll\n``GET /workflows/revisions/{revision.id}`` for the result. The source revision\nis never mutated; promote the draft via ``set-active-revision`` when ready." }, "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" }, "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": { "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" }, "instructions": { "type": "string", "title": "Instructions" }, "system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Prompt" }, "compilation_strategy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Compilation Strategy" }, "trigger_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trigger Type" }, "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": [ "name", "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" } ] } }, "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" }, "system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Prompt" }, "compiled_graph": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Compiled 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" } }, "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" }, "system_prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "System Prompt" }, "compilation_strategy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Compilation Strategy" }, "trigger_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trigger Type" }, "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" }, "WorkflowToolResponse": { "properties": { "tool": { "$ref": "#/components/schemas/ToolResponse" }, "tool_revision_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Tool Revision Id" } }, "type": "object", "required": [ "tool" ], "title": "WorkflowToolResponse", "description": "Tool attached to a workflow revision (with optional pinned 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__agents__schemas__SetActiveRevisionRequest": { "properties": { "revision_id": { "type": "string", "format": "uuid", "title": "Revision Id" }, "bypass_release_gate": { "type": "boolean", "title": "Bypass Release Gate", "default": false }, "override_reason": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Override Reason" } }, "type": "object", "required": [ "revision_id" ], "title": "SetActiveRevisionRequest" }, "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/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__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__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__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__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__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__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" } }, "type": "object", "required": [ "id", "seq", "role", "content", "created_at" ], "title": "MessageResponse" }, "src__ask_feather__schemas__SendMessageRequest": { "properties": { "content": { "type": "string", "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" }, "status": { "type": "string", "title": "Status" }, "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" } }, "type": "object", "required": [ "id", "title", "status", "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" }, "status": { "type": "string", "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", "title", "status", "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" }, "origin": { "anyOf": [ { "type": "string", "enum": [ "inbound", "outbound" ] }, { "type": "null" } ], "title": "Origin" }, "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", "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_synced": { "type": "boolean", "title": "Memory Synced", "default": false }, "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" }, "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", "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" }, "origin": { "anyOf": [ { "type": "string", "enum": [ "inbound", "outbound" ] }, { "type": "null" } ], "title": "Origin" }, "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", "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_synced": { "type": "boolean", "title": "Memory Synced", "default": false }, "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" } }, "type": "object", "required": [ "id", "organization_id", "end_user_id", "channel", "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" }, "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" } }, "type": "object", "required": [ "id", "session_id", "role", "content", "created_at" ], "title": "TurnResponse" }, "src__custom_tools__api__schemas__SetActiveRevisionRequest": { "properties": { "revision_id": { "type": "string", "format": "uuid", "title": "Revision Id" } }, "type": "object", "required": [ "revision_id" ], "title": "SetActiveRevisionRequest" }, "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" }, "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" } }, "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__workflow__api__schemas__SetActiveRevisionRequest": { "properties": { "revision_id": { "type": "string", "format": "uuid", "title": "Revision Id" } }, "type": "object", "required": [ "revision_id" ], "title": "SetActiveRevisionRequest" }, "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" }, "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" }, "system_prompt": { "$ref": "#/components/schemas/TextDiff" } }, "type": "object", "required": [ "persona", "system_prompt" ], "title": "GraphMeta", "description": "Workflow-scope graph metadata diff (persona + system_prompt prose fields)." }, "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" } } } }