{"openapi":"3.1.0","info":{"title":"Encore Agent Platform API","version":"1.0.0","description":"Public API for the Encore Agent Platform: create and manage AI agents, read conversations and transcripts, manage knowledge bases and custom tools, and call agents through chat completions.\n\n## Authentication\n\nCreate an API key in the platform under Settings > API Keys and send it as `X-API-Key: <key>` or `Authorization: Bearer <key>`. OAuth 2.0 (authorization code with PKCE) is used for the MCP server; see https://api.gainencore.ai/.well-known/oauth-authorization-server.\n\n## MCP\n\nThe same capabilities are available to AI assistants through the remote MCP server at https://platform.gainencore.ai/api/v1/mcp (OAuth protected).\n\nAll resources are scoped to an organization. API keys are bound to their organization.","contact":{"name":"Encore","url":"https://www.gainencore.ai"}},"servers":[{"url":"https://api-platform.gainencore.ai","description":"Production"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"tags":[{"name":"Agents","description":"\n**Core agent CRUD operations**\n\nCreate, read, update, delete AI agents. Agents are the primary entity for handling\nconversations. Each agent has:\n- LLM configuration (provider, model, temperature)\n- Voice/TTS settings (for phone channel)\n- Flow definition (conversation logic)\n- Knowledge base references\n- Custom tool configurations\n\n**Key endpoints:**\n- `POST /api/v1/agents` - Create new agent\n- `GET /api/v1/agents` - List all agents\n- `GET /api/v1/agents/{agent_id}` - Get agent details\n- `PATCH /api/v1/agents/{agent_id}` - Update agent\n- `POST /api/v1/agents/{agent_id}/export` - Export agent configuration\n- `POST /api/v1/agents/import` - Import agent from export file\n"},{"name":"Models","description":"\n**LLM model configuration**\n\nList available LLM providers and models for agent configuration.\nSupports OpenAI, Anthropic (Claude), and Google (Gemini).\n"},{"name":"Tools","description":"\n**Custom API tool management**\n\nCreate and manage custom HTTP API tools that agents can invoke during conversations.\nTools support:\n- Parameter mapping from conversation context\n- Response variable assignments\n- Pre-request authentication flows\n- Mock configurations for testing\n- Trigger messages (fast replies during execution)\n\n**Key endpoints:**\n- `GET /api/v1/tools/agents/{agent_id}/tools` - List agent tools\n- `POST /api/v1/tools/agents/{agent_id}/tools` - Create tool\n- `POST /api/v1/tools/test` - Test tool configuration\n"},{"name":"Chat Completions","description":"\n**Chat completion API (Custom Format)**\n\nFlow-based chat completions for chat widgets. Supports:\n- Streaming responses with SSE\n- Flow orchestration (node execution, exits)\n- Knowledge base retrieval\n- Tool execution\n- Session data context\n\n**SSE Event Types:**\n- `fast_reply` - Quick acknowledgment/filler message\n- `response` - Main response content (streamed)\n- `done` - Conversation turn complete\n"},{"name":"OpenAI Compatible","description":"\n**OpenAI-compatible chat completions (voice service)**\n\nOpenAI-format endpoint for the voice service (Pipecat).\nRequires JWT authentication. Uses same flow orchestrator as\ncustom format but returns OpenAI-compatible SSE chunks.\n\n**Note:** This endpoint is primarily for internal voice service use.\nFor chat widgets, use the custom format endpoint at `/api/v1/chat/completions`.\n"},{"name":"Conversations","description":"\n**Conversation history and transcripts**\n\nAccess conversation logs, transcripts, and recordings.\nSupports filtering, search, and analytics aggregation.\n\n**Key endpoints:**\n- `GET /api/v1/conversations` - List conversations with filters\n- `GET /api/v1/conversations/{id}` - Get conversation details\n- `GET /api/v1/conversations/{id}/messages` - Get message history\n"},{"name":"Knowledge Base","description":"\n**RAG knowledge base management**\n\nCreate knowledge bases and upload documents for retrieval-augmented generation.\nSupports:\n- File upload (PDF, DOCX, TXT, images, etc.)\n- URL crawling and sitemap import\n- Periodic crawl schedules\n- Hybrid search (vector + full-text)\n- Chunk management\n\n**Processing Pipeline:**\n1. Upload document -> S3 storage\n2. Kafka event published\n3. DocumentProcessor: parse -> chunk -> embed\n4. Vectors stored in pgvector\n5. Available for semantic search\n\n**Key endpoints:**\n- `POST /api/v1/knowledge-bases` - Create KB\n- `POST /api/v1/knowledge-bases/{id}/upload` - Upload documents\n- `POST /api/v1/knowledge-bases/{id}/crawl-url` - Crawl URL\n- `POST /api/v1/knowledge-bases/{id}/search` - Search KB\n"},{"name":"Health","description":"Health check endpoints"}],"paths":{"/health":{"get":{"tags":["Health"],"summary":"Health Check","description":"Simple health check endpoint for Kubernetes probes.\n\nThis endpoint is async to run directly on the event loop, bypassing\nthe thread pool. This prevents health checks from being blocked when\nthe thread pool is saturated (e.g., during DB migrations in rolling\ndeployments where sync requests pile up waiting for locks).\n\nDoes NOT call any external services to avoid blocking.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/detailed":{"get":{"tags":["Health"],"summary":"Health Check Detailed","description":"Detailed health check with service status.\n\nUse this for debugging, NOT for Kubernetes probes.","operationId":"health_check_detailed_health_detailed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/langfuse":{"get":{"tags":["Health"],"summary":"Langfuse Health","description":"Detailed Langfuse observability status.\n\nReturns comprehensive information about LLM tracing configuration.","operationId":"langfuse_health_health_langfuse_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/agents":{"post":{"tags":["Agents"],"summary":"Create Agent","description":"Create a new agent.\n\nArgs:\n    agent_data: Agent creation data\n    db: Database session\n    current_user: Current authenticated user\n\nReturns:\n    Created agent","operationId":"create_agent_api_v1_agents_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"get":{"tags":["Agents"],"summary":"List Agents","description":"List all agents for the current organization.","operationId":"list_agents_api_v1_agents_get","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/skip"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentListResponse"},{"$ref":"#/components/schemas/AgentSummaryListResponse"}]}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/pin":{"post":{"tags":["Agents"],"summary":"Pin Agent","description":"Pin an agent to the top of the current user's agent list. Idempotent.","operationId":"pin_agent_api_v1_agents__agent_id__pin_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"204":{"description":"Successful Response"},"422":{"$ref":"#/components/responses/ValidationError"}}},"delete":{"tags":["Agents"],"summary":"Unpin Agent","description":"Remove an agent from the current user's pinned list. Idempotent.","operationId":"unpin_agent_api_v1_agents__agent_id__pin_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"204":{"description":"Successful Response"},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}":{"get":{"tags":["Agents"],"summary":"Get Agent","description":"Get a specific agent.\nUsers can only view agents within their current organization.","operationId":"get_agent_api_v1_agents__agent_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"delete":{"tags":["Agents"],"summary":"Delete Agent","description":"Delete an agent and all its related records.\n\nArgs:\n    agent_id: Agent ID\n    db: Database session\n    current_user: Current authenticated user\n    current_org: Current active organization\n\nRaises:\n    HTTPException: If agent not found or unauthorized","operationId":"delete_agent_api_v1_agents__agent_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"204":{"description":"Successful Response"},"422":{"$ref":"#/components/responses/ValidationError"}}},"patch":{"tags":["Agents"],"summary":"Update Agent","description":"Update an agent.\nUsers can only edit agents within their current organization.","operationId":"update_agent_api_v1_agents__agent_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/create_version"},{"$ref":"#/components/parameters/version_name"},{"$ref":"#/components/parameters/switch_to_version"},{"$ref":"#/components/parameters/expected_flow_version"},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/resolve-org":{"get":{"tags":["Agents"],"summary":"Resolve Agent Org","description":"Resolve which organization an agent belongs to.\n\nUsed for cross-workspace deep-linking: when a user opens an agent link\nbut is currently in a different workspace, this endpoint returns the correct\norganization_id so the frontend can auto-switch.\n\nOnly returns the org_id if the user is an active member of that organization.\nReturns 404 if the agent doesn't exist or the user doesn't have access.","operationId":"resolve_agent_org_api_v1_agents__agent_id__resolve_org_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/generate-api-token":{"post":{"tags":["Agents"],"summary":"Generate Api Token","description":"Generate a new API token for B2B integration.\n\nThis endpoint creates a secure random API token that can be used to authenticate\nB2B API requests to this agent. The token is stored in the database and returned\nto the user. Users should keep this token secure as it provides programmatic access\nto the agent.","operationId":"generate_api_token_api_v1_agents__agent_id__generate_api_token_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/api-token":{"delete":{"tags":["Agents"],"summary":"Revoke Api Token","description":"Revoke the API token for an agent.\n\nThis endpoint removes the API token from the agent, effectively disabling\nall B2B API access until a new token is generated.","operationId":"revoke_api_token_api_v1_agents__agent_id__api_token_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/duplicate":{"post":{"tags":["Agents"],"summary":"Duplicate Agent","description":"Duplicate an existing agent.\n\nArgs:\n    agent_id: Agent ID to duplicate\n    db: Database session\n    current_user: Current authenticated user\n    current_org: Current active organization\n\nReturns:\n    Duplicated agent\n\nRaises:\n    HTTPException: If agent not found or unauthorized","operationId":"duplicate_agent_api_v1_agents__agent_id__duplicate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/changelog":{"get":{"tags":["Agents","Agents"],"summary":"Get Agent Changelog","description":"Return flow change journal entries for an agent.","operationId":"get_agent_changelog_api_v1_agents__agent_id__changelog_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/since"},{"$ref":"#/components/parameters/source"},{"$ref":"#/components/parameters/limit_f515a628"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/reclassify-outcomes/preview":{"get":{"tags":["Agents"],"summary":"Reclassify Outcomes Preview","description":"Count of conversations that would be re-classified, given the date\nrange. No side effects \u2014 safe to call repeatedly (e.g. as the user\nadjusts the date pickers in the UI).","operationId":"reclassify_outcomes_preview_api_v1_agents__agent_id__reclassify_outcomes_preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/start_date"},{"$ref":"#/components/parameters/end_date"},{"$ref":"#/components/parameters/source_9f55468b"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/reclassify-outcomes":{"post":{"tags":["Agents"],"summary":"Reclassify Outcomes","description":"Reclassify Outcomes","operationId":"reclassify_outcomes_api_v1_agents__agent_id__reclassify_outcomes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/start_date"},{"$ref":"#/components/parameters/end_date"},{"$ref":"#/components/parameters/source_9f55468b"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/mark-live":{"post":{"tags":["Agents"],"summary":"Mark Agent Live","description":"Mark Agent Live","operationId":"mark_agent_live_api_v1_agents__agent_id__mark_live_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkLiveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/generate-stt-context":{"post":{"tags":["Agents"],"summary":"Generate Stt Context Endpoint","description":"Generate Stt Context Endpoint","operationId":"generate_stt_context_endpoint_api_v1_agents__agent_id__generate_stt_context_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/test-post-action":{"post":{"tags":["Agents"],"summary":"Test Post Action","description":"Test a post-conversation action against sample or real conversation data.","operationId":"test_post_action_api_v1_agents__agent_id__test_post_action_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/action-history":{"get":{"tags":["Agents"],"summary":"Get Agent Action History","description":"Retrieve action execution history for all conversations of an agent.\n\nReturns conversations where post-conversation actions were attempted, ordered\nby ended_at descending (most recent first). Each entry includes the action\nresults stored in extraction_results['action_results'].\n\nReturns:\n    Dict with total count and list of conversation action-history entries.","operationId":"get_agent_action_history_api_v1_agents__agent_id__action_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/limit_c97d13e6"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/rerun-failed-actions":{"post":{"tags":["Agents"],"summary":"Rerun Agent Failed Actions","description":"Rerun failed post-conversation actions across all conversations for this agent.\n\nFinds conversations with at least one failed action result and re-executes\nonly those failed actions, appending new result records. Limited to 50\nconversations per request to avoid timeouts.\n\nReturns:\n    Summary dict: total_conversations, succeeded, failed, results list.","operationId":"rerun_agent_failed_actions_api_v1_agents__agent_id__rerun_failed_actions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/pronunciation-sync":{"get":{"tags":["Agents"],"summary":"Get Agent Pronunciation Sync","description":"Get Agent Pronunciation Sync","operationId":"get_agent_pronunciation_sync_api_v1_agents__agent_id__pronunciation_sync_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/graph":{"get":{"tags":["Agents","Agents"],"summary":"Get Agent Graph","description":"Retrieve an agent's flow graph structure.","operationId":"get_agent_graph_api_v1_agents__agent_id__graph_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGraphResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"patch":{"tags":["Agents","Agents"],"summary":"Patch Agent Graph","description":"Incrementally update an agent's flow graph.\n\nThis endpoint allows adding nodes, exits (edges), fields (variables), and tools\nto an existing agent flow without requiring a full graph replacement.","operationId":"patch_agent_graph_api_v1_agents__agent_id__graph_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGraphPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGraphPatchResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/graph/nodes/{node_id}":{"patch":{"tags":["Agents","Agents"],"summary":"Patch Node","description":"Partially update a single node within an agent's flow graph.\n\nSupports concurrent editing \u2014 different users can edit different nodes\nsimultaneously without conflicts. Only the provided fields are merged\ninto the node; unprovided fields are left unchanged.\n\nPosition-only updates (only `position` provided, no `data` or `name`)\ndo not increment the flow_version, as positions are cosmetic.","operationId":"patch_node_api_v1_agents__agent_id__graph_nodes__node_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"node_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodePatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodePatchResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"delete":{"tags":["Agents","Agents"],"summary":"Delete Node","description":"Delete a single node from an agent's flow graph.\n\nAlso removes all exits (edges) connected to the node (as source or target)\nand any flow variables whose source_node_id matches the deleted node.\nThe start node cannot be deleted.","operationId":"delete_node_api_v1_agents__agent_id__graph_nodes__node_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"node_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeDeleteResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/graph/positions":{"patch":{"tags":["Agents","Agents"],"summary":"Patch Node Positions","description":"Batch-update node positions within an agent's flow graph.\n\nDesigned for drag-and-drop operations where only visual positions change.\nDoes NOT increment flow_version since positions are cosmetic layout data.\nNode IDs that do not exist in the flow are silently skipped.","operationId":"patch_node_positions_api_v1_agents__agent_id__graph_positions_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionBatchResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/enhance-prompt-with-context":{"post":{"tags":["Agents"],"summary":"Enhance Agent Prompt With Context","description":"Enhance a prompt using full flow context and AI.\n\nTakes a rough prompt outline and improves it into a well-structured prompt\nthat an LLM can execute effectively. Uses full context about the agent's\nflow (nodes, connections, tools, variables) to generate contextually\nappropriate improvements.","operationId":"enhance_agent_prompt_with_context_api_v1_agents_enhance_prompt_with_context_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnhancePromptWithContextRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnhancePromptWithContextResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/generate-kb-tool-description":{"post":{"tags":["Agents"],"summary":"Generate Kb Tool Description With Ai","description":"AI-generate the LLM-facing description of a per-KB knowledge-search tool.\n\nUsed by the split-KB-tools feature (AgentFlow.split_kb_tools): each attached\nKB becomes its own knowledge_search_<slug> tool and the agent routes between\nthem by description alone, so the generation is grounded in the sibling KBs\nto keep descriptions mutually discriminative (e.g. pension vs life insurance).","operationId":"generate_kb_tool_description_with_ai_api_v1_agents_generate_kb_tool_description_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateKBToolDescriptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateKBToolDescriptionResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/generate-phoneme":{"post":{"tags":["Agents"],"summary":"Generate Pronunciation Phoneme","description":"Generate Pronunciation Phoneme","operationId":"generate_pronunciation_phoneme_api_v1_agents_generate_phoneme_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratePhonemeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratePhonemeResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/build-flow":{"post":{"tags":["Agents"],"summary":"Build Flow From User Description","description":"Build a conversation flow from a natural language description using AI.\n\nThis endpoint takes a free-form description of the desired conversation flow\nand generates a complete flow definition with nodes and edges. The system uses\nretry logic with different prompt variations to increase the success rate.","operationId":"build_flow_from_user_description_api_v1_agents_build_flow_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildFlowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildFlowResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/generate-code":{"post":{"tags":["Agents"],"summary":"Generate Python Code","description":"Generate Python code from a natural language description.\n\nThis endpoint takes a description of what the code should do and generates\nsecure Python code that can be used in a code execution node. The code will\nhave access to the available fields and will return a dictionary of values.","operationId":"generate_python_code_api_v1_agents_generate_code_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateCodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateCodeResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/build-from-description":{"post":{"tags":["Agents"],"summary":"Build Agent From User Description","description":"Build an agent configuration from a user description using AI.\n\nThis endpoint takes a free-form description of the agent the user wants to build\nand generates an agent name, greeting message, and complete system prompt based\non a reference template, adapted to the specific use case.","operationId":"build_agent_from_user_description_api_v1_agents_build_from_description_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildAgentResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/build-from-description/stream":{"post":{"tags":["Agents"],"summary":"Build Agent From User Description Stream","description":"Build an agent configuration from a user description using AI with streaming.\n\nThis endpoint streams the generation process, providing real-time updates as the\nagent configuration is being built. This allows the frontend to show progress\nand partial results to the user.","operationId":"build_agent_from_user_description_stream_api_v1_agents_build_from_description_stream_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/generate-name":{"post":{"tags":["Agents"],"summary":"Generate Name","description":"Generate a descriptive agent name from a user description.\n\nArgs:\n    request: Build agent request containing the user's description\n    current_user: Current authenticated user\n\nReturns:\n    Generated agent name (3-5 words)\n\nRaises:\n    HTTPException: If API key not configured or generation fails","operationId":"generate_name_api_v1_agents_generate_name_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/generate-greeting":{"post":{"tags":["Agents"],"summary":"Generate Greeting","description":"Generate a greeting message for the agent.\n\nArgs:\n    request: JSON body with description and agent_name\n    current_user: Current authenticated user\n\nReturns:\n    Generated greeting message\n\nRaises:\n    HTTPException: If API key not configured or generation fails","operationId":"generate_greeting_api_v1_agents_generate_greeting_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/generate-prompt":{"post":{"tags":["Agents"],"summary":"Generate Prompt","description":"Generate a system prompt for the agent.\n\nArgs:\n    request: JSON body with description, agent_name, and optionally language\n    current_user: Current authenticated user\n\nReturns:\n    Generated system prompt\n\nRaises:\n    HTTPException: If API key not configured or generation fails","operationId":"generate_prompt_api_v1_agents_generate_prompt_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/detect-language":{"post":{"tags":["Agents"],"summary":"Detect Agent Language","description":"Detect the primary language/locale for the agent.\n\nArgs:\n    request: Build agent request containing the user's description\n    current_user: Current authenticated user\n\nReturns:\n    Detected language code (e.g., \"he-IL\", \"en-US\")\n\nRaises:\n    HTTPException: If API key not configured or generation fails","operationId":"detect_agent_language_api_v1_agents_detect_language_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/generate-post-call-fields":{"post":{"tags":["Agents"],"summary":"Generate Fields","description":"Generate post-call extraction fields based on agent description.\n\nArgs:\n    request: Build agent request containing the user's description\n    current_user: Current authenticated user\n\nReturns:\n    List of field definitions with parameter_name, parameter_description, and is_required\n\nRaises:\n    HTTPException: If API key not configured or generation fails","operationId":"generate_fields_api_v1_agents_generate_post_call_fields_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/cache-greeting":{"post":{"tags":["Agents"],"summary":"Cache Agent Greeting","description":"Pre-generate and cache the greeting audio for an agent.\n\nThis endpoint triggers background generation of the TTS audio for the agent's greeting,\nso it's ready for instant playback on the first call. This avoids the latency of\ngenerating the greeting audio when a user first calls the agent.","operationId":"cache_agent_greeting_api_v1_agents__agent_id__cache_greeting_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/upload-widget-icon":{"post":{"tags":["Agents"],"summary":"Upload Widget Icon","description":"Upload a custom widget icon image.\n\nReturns:\n    JSON with the public URL of the uploaded icon","operationId":"upload_widget_icon_api_v1_agents__agent_id__upload_widget_icon_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_widget_icon_api_v1_agents__agent_id__upload_widget_icon_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/illustration":{"post":{"tags":["Agents"],"summary":"Upload Illustration","description":"Upload a live illustration screenshot image.\n\nReturns:\n    JSON with the public URL of the uploaded illustration","operationId":"upload_illustration_api_v1_agents__agent_id__illustration_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/website_url"},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_illustration_api_v1_agents__agent_id__illustration_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"get":{"tags":["Agents"],"summary":"Get Illustration","description":"Get the current illustration URL for an agent.\n\nReturns:\n    JSON with illustration URL and metadata","operationId":"get_illustration_api_v1_agents__agent_id__illustration_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/illustration/capture":{"post":{"tags":["Agents"],"summary":"Capture Illustration","description":"Capture a screenshot of a website using Firecrawl API.\n\nRequest body:\n    website_url: URL of the website to capture\n\nReturns:\n    JSON with the public URL of the captured illustration","operationId":"capture_illustration_api_v1_agents__agent_id__illustration_capture_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/versions":{"post":{"tags":["Agents"],"summary":"Create Version","description":"Create a new version snapshot of the agent.\n\nArgs:\n    agent_id: Agent ID\n    version_data: Version creation data (name, description)\n    db: Database session\n    current_user: Current authenticated user\n    current_org: Current organization\n\nReturns:\n    Created version metadata (without snapshot)","operationId":"create_version_api_v1_agents__agent_id__versions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVersionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVersionResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"get":{"tags":["Agents"],"summary":"List Versions","description":"List all versions for an agent (newest first).\n\nArgs:\n    agent_id: Agent ID\n    skip: Number of records to skip\n    limit: Maximum number of records to return\n    db: Database session\n    current_user: Current authenticated user\n    current_org: Current organization\n\nReturns:\n    List of version metadata (without snapshots)","operationId":"list_versions_api_v1_agents__agent_id__versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/skip"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentVersionResponse"}}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/versions/live":{"get":{"tags":["Agents"],"summary":"Get Live Version Endpoint","description":"Get the currently published (live) version for an agent.\n\nReturns None if no version has been published yet.","operationId":"get_live_version_endpoint_api_v1_agents__agent_id__versions_live_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/VersionLifecycleResponse"},{"type":"null"}]}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/versions/diff":{"get":{"tags":["Agents"],"summary":"Get Version Diff","description":"Get diff between two versions.","operationId":"get_version_diff_api_v1_agents__agent_id__versions_diff_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/from_version_id"},{"$ref":"#/components/parameters/to_version_id"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDiffResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/versions-lifecycle":{"get":{"tags":["Agents"],"summary":"List Versions With Lifecycle","description":"List versions with full lifecycle information.\n\nThis is an enhanced version of GET /versions that includes status,\napproval workflow, and publication metadata.","operationId":"list_versions_with_lifecycle_api_v1_agents__agent_id__versions_lifecycle_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/status"},{"$ref":"#/components/parameters/skip"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VersionLifecycleResponse"}}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/versions/{version_id}":{"patch":{"tags":["Agents"],"summary":"Update Version Endpoint","description":"Update version metadata (name, description).","operationId":"update_version_endpoint_api_v1_agents__agent_id__versions__version_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionLifecycleResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/versions/{version_id}/publish":{"post":{"tags":["Agents"],"summary":"Publish Version Endpoint","description":"Publish a version, making it the live version for conversations.\n\nIf the agent has require_approval_before_publish=True, the version\nmust first be approved via the approval workflow.","operationId":"publish_version_endpoint_api_v1_agents__agent_id__versions__version_id__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionLifecycleResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/versions/{version_id}/set-live":{"post":{"tags":["Agents"],"summary":"Set Version Live","description":"Set an already-published version as the live version.\n\nThis is useful for:\n- Fixing data inconsistencies where published_version_id is out of sync\n- Rolling back to a previous published version\n\nOnly versions with status='published' can be set as live.","operationId":"set_version_live_api_v1_agents__agent_id__versions__version_id__set_live_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionLifecycleResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/versions/{version_id}/request-approval":{"post":{"tags":["Agents"],"summary":"Request Version Approval","description":"Request approval for a draft version.\n\nThis moves the version to 'pending_approval' status.\nOnly required when agent.require_approval_before_publish=True.","operationId":"request_version_approval_api_v1_agents__agent_id__versions__version_id__request_approval_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionApprovalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionLifecycleResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/versions/{version_id}/approve":{"post":{"tags":["Agents"],"summary":"Approve Version Endpoint","description":"Approve a pending version.\n\nRequires org admin or owner role. After approval, the version\ncan be published.","operationId":"approve_version_endpoint_api_v1_agents__agent_id__versions__version_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionApproveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionLifecycleResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/versions/{version_id}/reject":{"post":{"tags":["Agents"],"summary":"Reject Version Endpoint","description":"Reject a pending version.\n\nRequires org admin or owner role. The version returns to 'draft'\nstatus with the rejection reason recorded.","operationId":"reject_version_endpoint_api_v1_agents__agent_id__versions__version_id__reject_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionRejectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionLifecycleResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/versions/{version_id}/restore":{"post":{"tags":["Agents"],"summary":"Restore Version Endpoint","description":"Restore an agent to a previous version's state.\n\nThis copies the snapshot data back to the agent. It does NOT\nautomatically publish - create a new version and publish if needed.","operationId":"restore_version_endpoint_api_v1_agents__agent_id__versions__version_id__restore_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/versions/audit-log":{"get":{"tags":["Agents"],"summary":"Get Version Audit Log","description":"Get the audit log for version lifecycle events.\n\nReturns a chronological record of publishes, approvals, rejections, etc.","operationId":"get_version_audit_log_api_v1_agents__agent_id__versions_audit_log_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/skip"},{"$ref":"#/components/parameters/limit_cae63f62"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogEntry"}}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/approval-settings":{"get":{"tags":["Agents"],"summary":"Get Approval Settings","description":"Get the approval workflow settings for an agent.","operationId":"get_approval_settings_api_v1_agents__agent_id__approval_settings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalSettingsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"put":{"tags":["Agents"],"summary":"Update Approval Settings","description":"Update the approval workflow settings for an agent.\n\nRequires org admin or owner role.","operationId":"update_approval_settings_api_v1_agents__agent_id__approval_settings_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalSettingsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/versions/{version}":{"get":{"tags":["Agents"],"summary":"Get Version","description":"Get a specific version's complete snapshot.\n\nArgs:\n    agent_id: Agent ID\n    version: Version number\n    db: Database session\n    current_user: Current authenticated user\n    current_org: Current organization\n\nReturns:\n    Version metadata with complete snapshot","operationId":"get_version_api_v1_agents__agent_id__versions__version__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVersionDetailResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"delete":{"tags":["Agents"],"summary":"Delete Version","description":"Delete a specific version.\n\nArgs:\n    agent_id: Agent ID\n    version: Version number\n    db: Database session\n    current_user: Current authenticated user\n    current_org: Current organization\n\nReturns:\n    Success message\n\nRaises:\n    HTTPException: If trying to delete version 1 (initial version)","operationId":"delete_version_api_v1_agents__agent_id__versions__version__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/export":{"get":{"tags":["Agents"],"summary":"Export Agent","description":"Export an agent as a complete portable JSON.\n\nSupports exporting the current agent state or a specific version's snapshot.\nOptional KB document export includes parsed text or original files.\nPass include_kb_content=true (admin-only) to flag kb_references with\nhas_content=true \u2014 the export wizard then calls the KB export endpoints to\nassemble full KB content in the browser.","operationId":"export_agent_api_v1_agents__agent_id__export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/version_id"},{"$ref":"#/components/parameters/include_tools"},{"$ref":"#/components/parameters/include_tests"},{"$ref":"#/components/parameters/include_fillers"},{"$ref":"#/components/parameters/include_test_personas"},{"$ref":"#/components/parameters/include_test_cases"},{"$ref":"#/components/parameters/include_test_suites"},{"$ref":"#/components/parameters/include_question_sets"},{"$ref":"#/components/parameters/test_persona_ids"},{"$ref":"#/components/parameters/test_case_ids"},{"$ref":"#/components/parameters/test_suite_ids"},{"$ref":"#/components/parameters/question_set_ids"},{"$ref":"#/components/parameters/include_kb_content"},{"$ref":"#/components/parameters/include_embeddings"},{"$ref":"#/components/parameters/include_audio"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentExport"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/import":{"post":{"tags":["Agents"],"summary":"Import Agent","description":"Import Agent","operationId":"import_agent_api_v1_agents_import_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentImportResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/ui-tools/suggest":{"post":{"tags":["Agents"],"summary":"Suggest Ui Tools","description":"Propose custom UI components tailored to this agent's flow.","operationId":"suggest_ui_tools_api_v1_agents__agent_id__ui_tools_suggest_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestUIToolsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestUIToolsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/ui-tools/generate":{"post":{"tags":["Agents"],"summary":"Generate Ui Tool","description":"Generate one custom component spec from a natural-language description.","operationId":"generate_ui_tool_api_v1_agents__agent_id__ui_tools_generate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateUIToolRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UIToolSpecResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/ui-tools/validate":{"post":{"tags":["Agents"],"summary":"Validate Ui Tool","description":"Validate a spec against the primitive grammar (no LLM) \u2014 backs the\nbuilder's JSON drawer so a bad hand-edit fails HERE, not at agent save.","operationId":"validate_ui_tool_api_v1_agents__agent_id__ui_tools_validate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateUIToolRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateUIToolResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/ui-tools/generate-embedded":{"post":{"tags":["Agents"],"summary":"Generate Embedded Ui Tool","description":"Generate one embedded (free-form HTML) component spec \u2014\nparallel to /generate (which produces declarative primitive specs).","operationId":"generate_embedded_ui_tool_api_v1_agents__agent_id__ui_tools_generate_embedded_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateUIToolRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UIToolSpecResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/ui-tools/refine-embedded":{"post":{"tags":["Agents"],"summary":"Refine Embedded Ui Tool","description":"Revise an embedded (free-form HTML) component spec .","operationId":"refine_embedded_ui_tool_api_v1_agents__agent_id__ui_tools_refine_embedded_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefineUIToolRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UIToolSpecResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/agents/{agent_id}/ui-tools/refine":{"post":{"tags":["Agents"],"summary":"Refine Ui Tool","description":"Revise a component spec per the maker's describe-the-change instruction.","operationId":"refine_ui_tool_api_v1_agents__agent_id__ui_tools_refine_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefineUIToolRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UIToolSpecResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/models":{"get":{"tags":["Models","models"],"summary":"Get Models","description":"Get all available LLM models grouped by provider. Requires authentication\n(any signed-in user; no org membership or permission needed).\n\nReturns model configuration for UI display (labels, latency, badges).\nDoes not include internal routing information (litellm_name).","operationId":"get_models_api_v1_models_get","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/tools/agents/{agent_id}/tools":{"get":{"tags":["Tools","tools"],"summary":"List Agent Tools","description":"List all tools for an agent","operationId":"list_agent_tools_api_v1_tools_agents__agent_id__tools_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentToolResponse"}}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"post":{"tags":["Tools","tools"],"summary":"Create Agent Tool","description":"Create a new tool for an agent","operationId":"create_agent_tool_api_v1_tools_agents__agent_id__tools_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/via_mcp"},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentToolCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentToolResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/tools/agents/{agent_id}/tools/{tool_id}/duplicate":{"post":{"tags":["Tools","tools"],"summary":"Duplicate Agent Tool","description":"Duplicate an existing tool within the same agent","operationId":"duplicate_agent_tool_api_v1_tools_agents__agent_id__tools__tool_id__duplicate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentToolResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/tools/agents/{agent_id}/tools/{tool_id}":{"get":{"tags":["Tools","tools"],"summary":"Get Agent Tool","description":"Get a specific tool","operationId":"get_agent_tool_api_v1_tools_agents__agent_id__tools__tool_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentToolResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"patch":{"tags":["Tools","tools"],"summary":"Update Agent Tool","description":"Update a tool","operationId":"update_agent_tool_api_v1_tools_agents__agent_id__tools__tool_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/via_mcp"},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentToolUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentToolResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"delete":{"tags":["Tools","tools"],"summary":"Delete Agent Tool","description":"Delete a tool","operationId":"delete_agent_tool_api_v1_tools_agents__agent_id__tools__tool_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"204":{"description":"Successful Response"},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/tools/test":{"post":{"tags":["Tools","tools"],"summary":"Test Tool Api","description":"Test an API tool configuration by making an actual HTTP request.\n\nThis endpoint allows testing tool configurations before saving them.\nIt supports:\n- All HTTP methods (GET, POST, PUT, PATCH, DELETE)\n- Various authentication types (API key, Bearer, Basic)\n- Pre-request execution for token fetching\n- Variable substitution in URL, headers, and body","operationId":"test_tool_api_api_v1_tools_test_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolTestResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/tools/test-chain":{"post":{"tags":["Tools","tools"],"summary":"Test Tool Chain","description":"Test Tool Chain","operationId":"test_tool_chain_api_v1_tools_test_chain_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolTestChainRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolTestChainResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/tools/certificates/upload":{"post":{"tags":["Tools","tools"],"summary":"Upload Certificate","description":"Upload and validate client certificates for mTLS authentication.\n\nSupports two formats:\n- **PEM**: Upload certificate and private key as separate files\n- **PFX/P12**: Upload a single bundled file with password\n\nThe endpoint validates the certificate, extracts metadata (CN, expiry),\nencrypts sensitive data (private keys, PFX data), and returns the\nencrypted data for storage in tool configuration.","operationId":"upload_certificate_api_v1_tools_certificates_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_certificate_api_v1_tools_certificates_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateUploadResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/tools/jwt-key/upload":{"post":{"tags":["Tools","tools"],"summary":"Upload Jwt Key","description":"Upload and validate a PEM private key for the generic JWT auth mode.\n\nMirrors the certificate upload flow: validates the key (and passphrase),\nencrypts it at rest, and returns the encrypted key plus the public-key\nfingerprint (``SHA256:<base64>``) so the user can register the public key\nwith the provider (e.g. Snowflake). The plaintext key is never returned.","operationId":"upload_jwt_key_api_v1_tools_jwt_key_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_jwt_key_api_v1_tools_jwt_key_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JwtKeyUploadResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/tools/mcp/test-connection":{"post":{"tags":["Tools","tools"],"summary":"Test Mcp Connection","description":"Test connection to an MCP server and discover available tools.\n\nConnects to the specified MCP server URL, performs handshake,\nand lists all available tools. Used to validate configuration\nbefore saving an MCP server tool.","operationId":"test_mcp_connection_api_v1_tools_mcp_test_connection_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPTestConnectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPTestConnectionResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/chat/completions":{"post":{"tags":["Chat Completions"],"summary":"Chat Completions","description":"Create a chat completion with streaming response.\n\nThis endpoint processes user messages through the flow orchestrator\nand returns responses as Server-Sent Events (SSE).\n\n**Headers:**\n- `X-Session-Token`: Optional session token for conversation persistence.\n  If provided, the conversation will be linked to this session token,\n  enabling the user to retrieve conversation history later.","operationId":"chat_completions_api_v1_chat_completions_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XSessionToken"},{"$ref":"#/components/parameters/XInputTimestamp"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/chat/completions/{conversation_id}":{"post":{"tags":["Chat Completions"],"summary":"Chat Completions By Id","description":"Create a chat completion with the conversation_id in the URL path.\n\nIdentical to ``POST /completions`` except the existing conversation is\nidentified by the path segment instead of the request body. Used by the\nchat widget for follow-up turns so the id rides the URL.\n\nThe path value always takes precedence over any ``conversation_id`` in the\nbody.","operationId":"chat_completions_by_id_api_v1_chat_completions__conversation_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/XSessionToken"},{"$ref":"#/components/parameters/XInputTimestamp"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/chat/conversations/{conversation_id}":{"get":{"tags":["Chat Completions"],"summary":"Get Conversation","description":"Get conversation details including full state.\n\nArgs:\n    conversation_id: Conversation ID\n    organization_id: Organization (tenant) ID\n\nReturns:\n    Conversation details with current state","operationId":"get_conversation_api_v1_chat_conversations__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/organization_id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/chat/conversations/{conversation_id}/interactions":{"get":{"tags":["Chat Completions"],"summary":"Get Conversation Interactions","description":"Get interaction history for a conversation.\n\nReads from ConversationMessage (assistant messages with debug_data).","operationId":"get_conversation_interactions_api_v1_chat_conversations__conversation_id__interactions_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/organization_id"},{"$ref":"#/components/parameters/limit_cae63f62"},{"$ref":"#/components/parameters/offset_f52e6b45"},{"$ref":"#/components/parameters/include_debug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/chat/conversations/{conversation_id}/end":{"post":{"tags":["Chat Completions"],"summary":"End Conversation","description":"End a conversation session.\n\nThis endpoint should be called when:\n- User closes the chat widget\n- User leaves the page\n- Chat session times out\n- Conversation completes naturally\n\nNote: Summary and sentiment generation is handled asynchronously\nby the Kafka post-conversation analytics consumer when the\nConversationEndedEvent is published.","operationId":"end_conversation_api_v1_chat_conversations__conversation_id__end_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/organization_id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/v1/chat/completions":{"post":{"tags":["OpenAI Compatible"],"summary":"Openai Chat Completions","description":"OpenAI-compatible chat completion endpoint.\n\nThis endpoint accepts OpenAI format requests and converts them to our\ninternal format for processing by the flow orchestrator.\n\nSupports two authentication methods:\n1. JWT Bearer token (for dashboard/web clients)\n2.","operationId":"openai_chat_completions_v1_chat_completions_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XConversationID"},{"$ref":"#/components/parameters/XInputTimestamp"},{"$ref":"#/components/parameters/XSessionData"},{"$ref":"#/components/parameters/XIsTestNumber"},{"$ref":"#/components/parameters/XVoiceTurnID"},{"$ref":"#/components/parameters/XVoiceTurnWithdrawn"},{"$ref":"#/components/parameters/XPregenId"},{"$ref":"#/components/parameters/XUndeliveredTurnId"},{"$ref":"#/components/parameters/XVoiceServiceAPIKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIChatCompletionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/v1/chat/completions/idle-nudge":{"post":{"tags":["OpenAI Compatible"],"summary":"Openai Idle Nudge","description":"Generate a single context-aware user-idle nudge, or the farewell after the last one.\n\nStreams in the turn stream's wire format \u2014 OpenAI chunks plus the ``x-*`` control\nlines \u2014 so voice feeds it through its existing response path to TTS. No ack race,\nno flow orchestration; a nudge does NOT advance the conversation turn, it is a\nside-channel prompt for re-engagement.","operationId":"openai_idle_nudge_v1_chat_completions_idle_nudge_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XConversationID"},{"$ref":"#/components/parameters/XVoiceTurnID"},{"$ref":"#/components/parameters/XVoiceServiceAPIKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdleNudgeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/v1/chat/completions/idle-hangup":{"post":{"tags":["OpenAI Compatible"],"summary":"Openai Idle Hangup","description":"Persist the user-idle farewell + mark the conversation end_reason.\n\nCalled by the voice service right after it dispatches the farewell TTS\nframe and the pipeline ``EndFrame``. Writes the farewell to the transcript\nand sets ``conversation.","operationId":"openai_idle_hangup_v1_chat_completions_idle_hangup_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XConversationID"},{"$ref":"#/components/parameters/XVoiceServiceAPIKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdleHangupRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/v1/chat/completions/transfer-result":{"post":{"tags":["OpenAI Compatible"],"summary":"Openai Transfer Result","description":"Openai Transfer Result","operationId":"openai_transfer_result_v1_chat_completions_transfer_result_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XConversationID"},{"$ref":"#/components/parameters/XVoiceServiceAPIKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferResultRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases":{"get":{"tags":["Knowledge Base"],"summary":"List Knowledge Bases","description":"List all knowledge bases for the current organization.","operationId":"list_knowledge_bases_api_v1_knowledge_bases_get","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBaseInfo"}}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"post":{"tags":["Knowledge Base"],"summary":"Create Knowledge Base","description":"Create a new knowledge base for the current organization.","operationId":"create_knowledge_base_api_v1_knowledge_bases_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseInfo"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}":{"delete":{"tags":["Knowledge Base"],"summary":"Delete Knowledge Base","description":"Delete a knowledge base and all its documents.\n\nThis also cleans up all references to this KB in agents' flow_definition,\npreventing orphaned references that would cause errors when saving agents.","operationId":"delete_knowledge_base_api_v1_knowledge_bases__kb_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"204":{"description":"Successful Response"},"422":{"$ref":"#/components/responses/ValidationError"}}},"patch":{"tags":["Knowledge Base"],"summary":"Update Knowledge Base","description":"Update a knowledge base's metadata and configuration.\n\nThis endpoint allows updating knowledge base properties including:\n- Name and description\n- Chunking configuration (requires re-indexing if changed)\n- Synonym map for query expansion","operationId":"update_knowledge_base_api_v1_knowledge_bases__kb_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseInfo"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/change-embedding-model":{"post":{"tags":["Knowledge Base"],"summary":"Change Embedding Model","description":"Change the embedding model for a knowledge base and re-embed all documents.\n\nThis operation:\n1. Updates the KB's embedding model configuration\n2. Deletes ALL existing chunks (old embeddings are incompatible)\n3. Resets all documents to UPLOADED status\n4. Queues all documents for re-processing with the new embedding model\n\nThe KB will be unavailable for queries during re-indexing.","operationId":"change_embedding_model_api_v1_knowledge_bases__kb_id__change_embedding_model_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeEmbeddingModelRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeEmbeddingModelResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/update-chunking":{"post":{"tags":["Knowledge Base"],"summary":"Update Chunking Settings","description":"Update chunking settings for a knowledge base and re-chunk all documents.\n\nThis operation:\n1. Updates the KB's chunking configuration (chunk_size, chunk_overlap, strategy)\n2. Deletes ALL existing chunks\n3. Resets all documents to UPLOADED status\n4. Queues all documents for re-processing with new chunking settings\n\nThe KB will be unavailable for queries during re-chunking.","operationId":"update_chunking_settings_api_v1_knowledge_bases__kb_id__update_chunking_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChunkingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChunkingResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/documents":{"get":{"tags":["Knowledge Base"],"summary":"List Documents","description":"List all documents in a knowledge base.","operationId":"list_documents_api_v1_knowledge_bases__kb_id__documents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentResponse"}}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/chunks/export.csv":{"get":{"tags":["Knowledge Base"],"summary":"Export Kb Chunks Csv","description":"Stream a CSV of chunk references the user can paste into a testing CSV import.","operationId":"export_kb_chunks_csv_api_v1_knowledge_bases__kb_id__chunks_export_csv_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/documents/initiate-upload":{"post":{"tags":["Knowledge Base"],"summary":"Initiate Presigned Upload","description":"Initiate a batch upload with presigned URLs for direct client-to-S3 uploads.\n\nThis is the scalable upload path for large batches (100+ files).\nReturns presigned URLs that the client can use to upload files directly to S3,\nbypassing the backend and avoiding memory/timeout issues.\n\nFlow:\n1. Client calls this endpoint with file metadata\n2. Backend creates execution, generates presigned URLs\n3.","operationId":"initiate_presigned_upload_api_v1_knowledge_bases__kb_id__documents_initiate_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateUploadRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateUploadResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/documents/confirm-uploads/{execution_id}":{"post":{"tags":["Knowledge Base"],"summary":"Confirm Uploads","description":"Confirm that files have been uploaded to S3 and trigger processing.\n\nCalled by the client after successfully uploading files to S3 using presigned URLs.\nThis endpoint:\n1. Verifies the execution exists\n2. Updates the uploaded count\n3. Publishes Kafka events to trigger document processing","operationId":"confirm_uploads_api_v1_knowledge_bases__kb_id__documents_confirm_uploads__execution_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"execution_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmUploadsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/upload-executions/{execution_id}":{"delete":{"tags":["Knowledge Base"],"summary":"Cancel Upload Execution","description":"Cancel an upload execution and clean up uploaded files from S3.\n\nThis endpoint is called when the user cancels an upload in progress.\nIt will:\n1. Mark the execution as cancelled\n2. Delete any files already uploaded to S3\n3. Delete any document records created for this execution","operationId":"cancel_upload_execution_api_v1_knowledge_bases__kb_id__upload_executions__execution_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"execution_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/active-executions":{"get":{"tags":["Knowledge Base"],"summary":"Get Active Executions","description":"Get Active Executions","operationId":"get_active_executions_api_v1_knowledge_bases_active_executions_get","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveExecutionsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/download-urls":{"post":{"tags":["Knowledge Base"],"summary":"Get Download Urls","description":"Generate pre-signed download URLs for documents.\n\nReturns pre-signed S3 URLs that the client can use to download files directly.\nFor editor-created documents (no S3 file), returns data URLs with inline content.","operationId":"get_download_urls_api_v1_knowledge_bases_download_urls_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadUrlsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadUrlsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/documents/{doc_id}/content":{"get":{"tags":["Knowledge Base"],"summary":"Get Document Content","description":"Get document content for preview.","operationId":"get_document_content_api_v1_knowledge_bases__kb_id__documents__doc_id__content_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/documents/{doc_id}/raw":{"get":{"tags":["Knowledge Base"],"summary":"Get Document Raw File","description":"Get the raw/original file for a document.\n\nArgs:\n    download: If True, force download with Content-Disposition: attachment.\n              If False, display inline in browser (for viewing).\n\nReturns:\n    - For uploaded files (PDF, DOCX, etc.): Returns file content\n    - For raw/editor documents: Returns 404","operationId":"get_document_raw_file_api_v1_knowledge_bases__kb_id__documents__doc_id__raw_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/download"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"put":{"tags":["Knowledge Base"],"summary":"Update Raw Document","description":"Update a raw document created from markdown editor.\n\nUpdates the document content, deletes old chunks, and rebuilds\nembeddings for the new content.","operationId":"update_raw_document_api_v1_knowledge_bases__kb_id__documents__doc_id__raw_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RawDocumentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/documents/{doc_id}":{"delete":{"tags":["Knowledge Base"],"summary":"Delete Document","description":"Delete a document from a knowledge base and rebuild index in background.\n\nThe index is rebuilt from cached embeddings (no re-embedding) to avoid orphaned\nvectors that would waste slots in top-k retrieval.","operationId":"delete_document_api_v1_knowledge_bases__kb_id__documents__doc_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"204":{"description":"Successful Response"},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/documents/{doc_id}/retry":{"post":{"tags":["Knowledge Base"],"summary":"Retry Failed Document","description":"Retry Failed Document","operationId":"retry_failed_document_api_v1_knowledge_bases__kb_id__documents__doc_id__retry_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/documents/raw":{"post":{"tags":["Knowledge Base"],"summary":"Create Raw Document","description":"Create a raw document from markdown editor.\n\nCreates a document from user-provided markdown content, chunks it,\nand builds embeddings for RAG retrieval.","operationId":"create_raw_document_api_v1_knowledge_bases__kb_id__documents_raw_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RawDocumentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/search":{"post":{"tags":["Knowledge Base"],"summary":"Search Knowledge Base","description":"Search a knowledge base using semantic search.\n\nPerforms hybrid search (vector similarity + keyword matching) with RRF fusion\nfor optimal results.\n\nReturns matching text chunks with:\n- Content text\n- Similarity scores\n- Source document information\n- Metadata","operationId":"search_knowledge_base_api_v1_knowledge_bases__kb_id__search_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KBSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KBSearchResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/crawl":{"post":{"tags":["Knowledge Base"],"summary":"Crawl Url","description":"Crawl Url","operationId":"crawl_url_api_v1_knowledge_bases__kb_id__crawl_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryJobResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/crawl/{job_id}/cancel":{"post":{"tags":["Knowledge Base"],"summary":"Cancel Crawl Discovery","description":"Cancel Crawl Discovery","operationId":"cancel_crawl_discovery_api_v1_knowledge_bases__kb_id__crawl__job_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryCancelResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/crawl/active":{"get":{"tags":["Knowledge Base"],"summary":"Get Active Crawl Discovery","description":"Get Active Crawl Discovery","operationId":"get_active_crawl_discovery_api_v1_knowledge_bases__kb_id__crawl_active_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ActiveDiscoveryResponse"},{"type":"null"}]}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/crawl-map":{"get":{"tags":["Knowledge Base"],"summary":"List Crawl Map","description":"List Crawl Map","operationId":"list_crawl_map_api_v1_knowledge_bases__kb_id__crawl_map_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/source_root"},{"$ref":"#/components/parameters/status_001a15fc"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CrawlMapEntryResponse"}}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/crawl-map/entries":{"patch":{"tags":["Knowledge Base"],"summary":"Curate Crawl Map Entries","description":"Curate Crawl Map Entries","operationId":"curate_crawl_map_entries_api_v1_knowledge_bases__kb_id__crawl_map_entries_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlMapCurateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlMapCurateResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/crawl-map/export":{"get":{"tags":["Knowledge Base"],"summary":"Export Crawl Map","description":"Export Crawl Map","operationId":"export_crawl_map_api_v1_knowledge_bases__kb_id__crawl_map_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/source_root_1f0d3709"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/crawl-map/import":{"post":{"tags":["Knowledge Base"],"summary":"Import Crawl Map","description":"Import Crawl Map","operationId":"import_crawl_map_api_v1_knowledge_bases__kb_id__crawl_map_import_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlMapImportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlMapImportResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/cancel-indexing":{"post":{"tags":["Knowledge Base"],"summary":"Cancel Indexing","description":"Cancel ongoing indexing operation for a knowledge base.\nThis is useful if indexing is taking too long or server is freezing.","operationId":"cancel_indexing_api_v1_knowledge_bases__kb_id__cancel_indexing_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/agentic-indexing":{"patch":{"tags":["Knowledge Base"],"summary":"Update Agentic Indexing","description":"Toggle agentic indexing and set model for a knowledge base.","operationId":"update_agentic_indexing_api_v1_knowledge_bases__kb_id__agentic_indexing_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgenticIndexingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/enrich":{"post":{"tags":["Knowledge Base"],"summary":"Trigger Enrichment","description":"Trigger agentic indexing enrichment for a knowledge base.\n\nPublishes a Kafka event to start the enrichment pipeline:\n1. Agent SDK analyzes all documents (summaries, entities, cross-refs)\n2. LiteLLM generates contextual descriptions for each chunk\n3. Chunks are re-embedded with enriched text","operationId":"trigger_enrichment_api_v1_knowledge_bases__kb_id__enrich_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TriggerEnrichmentRequest"},{"type":"null"}]}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/chunks":{"get":{"tags":["Knowledge Base"],"summary":"List Chunks","description":"List chunks for a knowledge base with filtering and pagination.","operationId":"list_chunks_api_v1_knowledge_bases__kb_id__chunks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/limit_b5156385"},{"$ref":"#/components/parameters/offset_70739c5c"},{"$ref":"#/components/parameters/chunk_type"},{"$ref":"#/components/parameters/document_id"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/chunks/{chunk_id}":{"get":{"tags":["Knowledge Base"],"summary":"Get Chunk","description":"Get a single chunk by ID.","operationId":"get_chunk_api_v1_knowledge_bases__kb_id__chunks__chunk_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"chunk_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChunkResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"patch":{"tags":["Knowledge Base"],"summary":"Update Chunk","description":"Update a chunk's text or enriched text and re-embed.","operationId":"update_chunk_api_v1_knowledge_bases__kb_id__chunks__chunk_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"chunk_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChunkUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/documents/{doc_id}/tags":{"patch":{"tags":["Knowledge Base"],"summary":"Update Document Tags","description":"Set a document's tags.\n\nThe submitted list is the document's complete tag set \u2014 it replaces the\ncurrent tags on every chunk of the document, so an omitted tag is removed\nand an empty list clears them. Does not re-embed.","operationId":"update_document_tags_api_v1_knowledge_bases__kb_id__documents__doc_id__tags_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTagsUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTagsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/rollback-enrichment":{"post":{"tags":["Knowledge Base"],"summary":"Rollback Enrichment","description":"Rollback agentic indexing enrichment for a knowledge base.","operationId":"rollback_enrichment_api_v1_knowledge_bases__kb_id__rollback_enrichment_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/knowledge-bases/{kb_id}/cancel-enrichment":{"post":{"tags":["Knowledge Base"],"summary":"Cancel Enrichment","description":"Cancel a running enrichment for a knowledge base.","operationId":"cancel_enrichment_api_v1_knowledge_bases__kb_id__cancel_enrichment_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kb_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/filter-options":{"get":{"tags":["Conversations"],"summary":"Get Conversation Filter Options","description":"Get available flow variable names and custom field names for conversation filtering.\n\nAggregates variable definitions from agent flow_definition and session_data_config,\ndeduplicated across agents. Used to populate filter dropdowns and column pickers.","operationId":"get_conversation_filter_options_api_v1_conversations_filter_options_get","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/agent_ids"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFilterOptionsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/filter-options/variable-values":{"get":{"tags":["Conversations"],"summary":"Get Variable Values","description":"Get distinct values for a specific variable name across conversations.\n\nSearches across flow_variables, session_data, and extracted_field JSONB paths\nin the conversations table. Returns unique non-null, non-empty string values.","operationId":"get_variable_values_api_v1_conversations_filter_options_variable_values_get","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/variable_name"},{"$ref":"#/components/parameters/variable_source"},{"$ref":"#/components/parameters/agent_ids_2739a8d0"},{"$ref":"#/components/parameters/limit_4881f7f3"},{"$ref":"#/components/parameters/search_31d1902d"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableValuesResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/":{"get":{"tags":["Conversations"],"summary":"List All Conversations","description":"List all conversations across all organization's agents with optional filtering.","operationId":"list_all_conversations_api_v1_conversations__get","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/skip"},{"$ref":"#/components/parameters/limit_9e56a301"},{"$ref":"#/components/parameters/sort_by"},{"$ref":"#/components/parameters/sort_direction"},{"$ref":"#/components/parameters/include_caller_stats"},{"$ref":"#/components/parameters/start_date_b4821dbd"},{"$ref":"#/components/parameters/end_date_8cacdc68"},{"$ref":"#/components/parameters/call_type"},{"$ref":"#/components/parameters/conversation_type"},{"$ref":"#/components/parameters/source_2d59cfdd"},{"$ref":"#/components/parameters/include_test"},{"$ref":"#/components/parameters/include_simulated"},{"$ref":"#/components/parameters/source_channel"},{"$ref":"#/components/parameters/agent_ids_d408e484"},{"$ref":"#/components/parameters/min_duration"},{"$ref":"#/components/parameters/max_duration"},{"$ref":"#/components/parameters/min_message_count"},{"$ref":"#/components/parameters/max_message_count"},{"$ref":"#/components/parameters/include_no_user_message"},{"$ref":"#/components/parameters/star_rating"},{"$ref":"#/components/parameters/has_rating"},{"$ref":"#/components/parameters/has_transfer"},{"$ref":"#/components/parameters/has_governance_incidents"},{"$ref":"#/components/parameters/sentiment"},{"$ref":"#/components/parameters/status_80f3cace"},{"$ref":"#/components/parameters/outcome_classification"},{"$ref":"#/components/parameters/needs_attention"},{"$ref":"#/components/parameters/resolution_bucket"},{"$ref":"#/components/parameters/custom_field_filters"},{"$ref":"#/components/parameters/flow_variable_filters"},{"$ref":"#/components/parameters/variable_filters"},{"$ref":"#/components/parameters/search_2bd2f7b2"},{"$ref":"#/components/parameters/from_number"},{"$ref":"#/components/parameters/to_number"},{"$ref":"#/components/parameters/external_id"},{"$ref":"#/components/parameters/conversation_id"},{"$ref":"#/components/parameters/node"},{"$ref":"#/components/parameters/dropped"},{"$ref":"#/components/parameters/dropped_nodes"},{"$ref":"#/components/parameters/fv_id"},{"$ref":"#/components/parameters/nvm"},{"$ref":"#/components/parameters/nvx"},{"$ref":"#/components/parameters/top_n"},{"$ref":"#/components/parameters/visited_node_id"},{"$ref":"#/components/parameters/ended_node_id"},{"$ref":"#/components/parameters/av"},{"$ref":"#/components/parameters/edge_from"},{"$ref":"#/components/parameters/edge_to"},{"$ref":"#/components/parameters/gbg"},{"$ref":"#/components/parameters/agg_rev"},{"$ref":"#/components/parameters/topic_node_id"},{"$ref":"#/components/parameters/topic_includes_secondary"},{"$ref":"#/components/parameters/topic_subtree"},{"$ref":"#/components/parameters/qa_cluster_id"},{"$ref":"#/components/parameters/qa_pair_id"},{"$ref":"#/components/parameters/widget_conditions"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationListResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/query":{"post":{"tags":["Conversations"],"summary":"Query All Conversations","description":"Query All Conversations","operationId":"query_all_conversations_api_v1_conversations_query_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/skip"},{"$ref":"#/components/parameters/limit_9e56a301"},{"$ref":"#/components/parameters/sort_by"},{"$ref":"#/components/parameters/sort_direction"},{"$ref":"#/components/parameters/include_caller_stats"},{"$ref":"#/components/parameters/start_date_b4821dbd"},{"$ref":"#/components/parameters/end_date_8cacdc68"},{"$ref":"#/components/parameters/call_type"},{"$ref":"#/components/parameters/conversation_type"},{"$ref":"#/components/parameters/source_2d59cfdd"},{"$ref":"#/components/parameters/include_test"},{"$ref":"#/components/parameters/include_simulated"},{"$ref":"#/components/parameters/source_channel"},{"$ref":"#/components/parameters/agent_ids_d408e484"},{"$ref":"#/components/parameters/min_duration"},{"$ref":"#/components/parameters/max_duration"},{"$ref":"#/components/parameters/min_message_count"},{"$ref":"#/components/parameters/max_message_count"},{"$ref":"#/components/parameters/include_no_user_message_55e5b033"},{"$ref":"#/components/parameters/star_rating"},{"$ref":"#/components/parameters/has_rating"},{"$ref":"#/components/parameters/has_transfer"},{"$ref":"#/components/parameters/has_governance_incidents"},{"$ref":"#/components/parameters/sentiment"},{"$ref":"#/components/parameters/status_80f3cace"},{"$ref":"#/components/parameters/outcome_classification"},{"$ref":"#/components/parameters/needs_attention"},{"$ref":"#/components/parameters/resolution_bucket_73903fd0"},{"$ref":"#/components/parameters/custom_field_filters"},{"$ref":"#/components/parameters/flow_variable_filters"},{"$ref":"#/components/parameters/variable_filters"},{"$ref":"#/components/parameters/search_2bd2f7b2"},{"$ref":"#/components/parameters/from_number"},{"$ref":"#/components/parameters/to_number"},{"$ref":"#/components/parameters/external_id"},{"$ref":"#/components/parameters/conversation_id_dc141130"},{"$ref":"#/components/parameters/node"},{"$ref":"#/components/parameters/dropped"},{"$ref":"#/components/parameters/dropped_nodes"},{"$ref":"#/components/parameters/fv_id"},{"$ref":"#/components/parameters/nvm"},{"$ref":"#/components/parameters/nvx"},{"$ref":"#/components/parameters/top_n"},{"$ref":"#/components/parameters/visited_node_id"},{"$ref":"#/components/parameters/ended_node_id_cbf02b1e"},{"$ref":"#/components/parameters/av"},{"$ref":"#/components/parameters/edge_from_69103fe6"},{"$ref":"#/components/parameters/edge_to_c7350b72"},{"$ref":"#/components/parameters/gbg_ecebe4ea"},{"$ref":"#/components/parameters/agg_rev_4f397087"},{"$ref":"#/components/parameters/topic_node_id_277b2d6f"},{"$ref":"#/components/parameters/topic_includes_secondary"},{"$ref":"#/components/parameters/topic_subtree_bba684b4"},{"$ref":"#/components/parameters/qa_cluster_id_59fa155f"},{"$ref":"#/components/parameters/qa_pair_id"},{"$ref":"#/components/parameters/widget_conditions_a2f76214"},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConversationsListQueryBody"},{"type":"null"}]}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationListResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/export":{"get":{"tags":["Conversations"],"summary":"Export Conversations","description":"Export Conversations","operationId":"export_conversations_api_v1_conversations_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/format"},{"$ref":"#/components/parameters/agent_id"},{"$ref":"#/components/parameters/tz"},{"$ref":"#/components/parameters/start_date_b4821dbd"},{"$ref":"#/components/parameters/end_date_8cacdc68"},{"$ref":"#/components/parameters/call_type"},{"$ref":"#/components/parameters/conversation_type"},{"$ref":"#/components/parameters/source_2d59cfdd"},{"$ref":"#/components/parameters/include_test"},{"$ref":"#/components/parameters/include_simulated"},{"$ref":"#/components/parameters/source_channel"},{"$ref":"#/components/parameters/agent_ids_d408e484"},{"$ref":"#/components/parameters/min_duration"},{"$ref":"#/components/parameters/max_duration"},{"$ref":"#/components/parameters/min_message_count"},{"$ref":"#/components/parameters/max_message_count"},{"$ref":"#/components/parameters/include_no_user_message_103ea6d7"},{"$ref":"#/components/parameters/star_rating"},{"$ref":"#/components/parameters/has_rating"},{"$ref":"#/components/parameters/has_transfer"},{"$ref":"#/components/parameters/has_governance_incidents"},{"$ref":"#/components/parameters/sentiment"},{"$ref":"#/components/parameters/status_80f3cace"},{"$ref":"#/components/parameters/outcome_classification"},{"$ref":"#/components/parameters/needs_attention"},{"$ref":"#/components/parameters/resolution_bucket_49cfec01"},{"$ref":"#/components/parameters/custom_field_filters"},{"$ref":"#/components/parameters/flow_variable_filters"},{"$ref":"#/components/parameters/variable_filters"},{"$ref":"#/components/parameters/search_2bd2f7b2"},{"$ref":"#/components/parameters/from_number"},{"$ref":"#/components/parameters/to_number"},{"$ref":"#/components/parameters/external_id"},{"$ref":"#/components/parameters/conversation_id_d75ee9aa"},{"$ref":"#/components/parameters/node"},{"$ref":"#/components/parameters/dropped"},{"$ref":"#/components/parameters/dropped_nodes"},{"$ref":"#/components/parameters/fv_id"},{"$ref":"#/components/parameters/nvm"},{"$ref":"#/components/parameters/nvx"},{"$ref":"#/components/parameters/top_n"},{"$ref":"#/components/parameters/visited_node_id"},{"$ref":"#/components/parameters/ended_node_id_0b64981b"},{"$ref":"#/components/parameters/av"},{"$ref":"#/components/parameters/edge_from_cbf2c3c7"},{"$ref":"#/components/parameters/edge_to_95a6cb23"},{"$ref":"#/components/parameters/gbg_f7ac7dc9"},{"$ref":"#/components/parameters/agg_rev_763a8aa1"},{"$ref":"#/components/parameters/topic_node_id_2db9dc8f"},{"$ref":"#/components/parameters/topic_includes_secondary"},{"$ref":"#/components/parameters/topic_subtree_4f8e1387"},{"$ref":"#/components/parameters/qa_cluster_id_b973de04"},{"$ref":"#/components/parameters/qa_pair_id"},{"$ref":"#/components/parameters/widget_conditions_06fa19fd"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"post":{"tags":["Conversations"],"summary":"Export Conversations With Columns","description":"Export Conversations With Columns","operationId":"export_conversations_with_columns_api_v1_conversations_export_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/format"},{"$ref":"#/components/parameters/agent_id_9d9859ed"},{"$ref":"#/components/parameters/tz_477f7e21"},{"$ref":"#/components/parameters/start_date_b4821dbd"},{"$ref":"#/components/parameters/end_date_8cacdc68"},{"$ref":"#/components/parameters/call_type"},{"$ref":"#/components/parameters/conversation_type"},{"$ref":"#/components/parameters/source_2d59cfdd"},{"$ref":"#/components/parameters/include_test"},{"$ref":"#/components/parameters/include_simulated"},{"$ref":"#/components/parameters/source_channel"},{"$ref":"#/components/parameters/agent_ids_d408e484"},{"$ref":"#/components/parameters/min_duration"},{"$ref":"#/components/parameters/max_duration"},{"$ref":"#/components/parameters/min_message_count"},{"$ref":"#/components/parameters/max_message_count"},{"$ref":"#/components/parameters/include_no_user_message_5f82a442"},{"$ref":"#/components/parameters/star_rating"},{"$ref":"#/components/parameters/has_rating"},{"$ref":"#/components/parameters/has_transfer"},{"$ref":"#/components/parameters/has_governance_incidents"},{"$ref":"#/components/parameters/sentiment"},{"$ref":"#/components/parameters/status_80f3cace"},{"$ref":"#/components/parameters/outcome_classification"},{"$ref":"#/components/parameters/needs_attention"},{"$ref":"#/components/parameters/resolution_bucket_be745123"},{"$ref":"#/components/parameters/custom_field_filters"},{"$ref":"#/components/parameters/flow_variable_filters"},{"$ref":"#/components/parameters/variable_filters"},{"$ref":"#/components/parameters/search_2bd2f7b2"},{"$ref":"#/components/parameters/from_number"},{"$ref":"#/components/parameters/to_number"},{"$ref":"#/components/parameters/external_id"},{"$ref":"#/components/parameters/conversation_id_d1e8bb22"},{"$ref":"#/components/parameters/node"},{"$ref":"#/components/parameters/dropped"},{"$ref":"#/components/parameters/dropped_nodes"},{"$ref":"#/components/parameters/fv_id"},{"$ref":"#/components/parameters/nvm"},{"$ref":"#/components/parameters/nvx"},{"$ref":"#/components/parameters/top_n"},{"$ref":"#/components/parameters/visited_node_id"},{"$ref":"#/components/parameters/ended_node_id_9282b2b3"},{"$ref":"#/components/parameters/av"},{"$ref":"#/components/parameters/edge_from_380bf297"},{"$ref":"#/components/parameters/edge_to_a0dd4003"},{"$ref":"#/components/parameters/gbg_60a34871"},{"$ref":"#/components/parameters/agg_rev_2de8cca6"},{"$ref":"#/components/parameters/topic_node_id_e9143983"},{"$ref":"#/components/parameters/topic_includes_secondary"},{"$ref":"#/components/parameters/topic_subtree_b2aab5f6"},{"$ref":"#/components/parameters/qa_cluster_id_b2f58589"},{"$ref":"#/components/parameters/qa_pair_id"},{"$ref":"#/components/parameters/widget_conditions_8a676fc8"},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConversationsExportBody"},{"type":"null"}]}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/feedback/export":{"get":{"tags":["Conversations"],"summary":"Export Feedback Report","description":"Export Feedback Report","operationId":"export_feedback_report_api_v1_conversations_feedback_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/agent_id_bed03356"},{"$ref":"#/components/parameters/tz_74cbf382"},{"$ref":"#/components/parameters/start_date_b4821dbd"},{"$ref":"#/components/parameters/end_date_8cacdc68"},{"$ref":"#/components/parameters/call_type"},{"$ref":"#/components/parameters/conversation_type"},{"$ref":"#/components/parameters/source_2d59cfdd"},{"$ref":"#/components/parameters/include_test"},{"$ref":"#/components/parameters/include_simulated"},{"$ref":"#/components/parameters/source_channel"},{"$ref":"#/components/parameters/agent_ids_d408e484"},{"$ref":"#/components/parameters/min_duration"},{"$ref":"#/components/parameters/max_duration"},{"$ref":"#/components/parameters/min_message_count"},{"$ref":"#/components/parameters/max_message_count"},{"$ref":"#/components/parameters/include_no_user_message_dd41162e"},{"$ref":"#/components/parameters/star_rating"},{"$ref":"#/components/parameters/has_rating"},{"$ref":"#/components/parameters/has_transfer"},{"$ref":"#/components/parameters/has_governance_incidents"},{"$ref":"#/components/parameters/sentiment"},{"$ref":"#/components/parameters/status_80f3cace"},{"$ref":"#/components/parameters/outcome_classification"},{"$ref":"#/components/parameters/needs_attention"},{"$ref":"#/components/parameters/resolution_bucket_a97f59bc"},{"$ref":"#/components/parameters/custom_field_filters"},{"$ref":"#/components/parameters/flow_variable_filters"},{"$ref":"#/components/parameters/variable_filters"},{"$ref":"#/components/parameters/search_2bd2f7b2"},{"$ref":"#/components/parameters/from_number"},{"$ref":"#/components/parameters/to_number"},{"$ref":"#/components/parameters/external_id"},{"$ref":"#/components/parameters/conversation_id_322e2ed1"},{"$ref":"#/components/parameters/node"},{"$ref":"#/components/parameters/dropped"},{"$ref":"#/components/parameters/dropped_nodes"},{"$ref":"#/components/parameters/fv_id"},{"$ref":"#/components/parameters/nvm"},{"$ref":"#/components/parameters/nvx"},{"$ref":"#/components/parameters/top_n"},{"$ref":"#/components/parameters/visited_node_id"},{"$ref":"#/components/parameters/ended_node_id_0d43dc30"},{"$ref":"#/components/parameters/av"},{"$ref":"#/components/parameters/edge_from_d6e913ab"},{"$ref":"#/components/parameters/edge_to_2a552a05"},{"$ref":"#/components/parameters/gbg_882655c4"},{"$ref":"#/components/parameters/agg_rev_189f22ac"},{"$ref":"#/components/parameters/topic_node_id_785340de"},{"$ref":"#/components/parameters/topic_includes_secondary"},{"$ref":"#/components/parameters/topic_subtree_9bba5b51"},{"$ref":"#/components/parameters/qa_cluster_id_5e4a8cb8"},{"$ref":"#/components/parameters/qa_pair_id"},{"$ref":"#/components/parameters/widget_conditions_cc028709"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/agents/{agent_id}/conversations":{"post":{"tags":["Conversations"],"summary":"Create Conversation","description":"Create a new conversation for an agent.\n\nArgs:\n    agent_id: Agent ID\n    conversation_data: Conversation creation data\n    db: Database session\n    current_user: Current authenticated user\n    current_org: Current active organization\n\nReturns:\n    Created conversation\n\nRaises:\n    HTTPException: If agent not found or unauthorized","operationId":"create_conversation_api_v1_conversations_agents__agent_id__conversations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"get":{"tags":["Conversations"],"summary":"List Conversations","description":"List all conversations for an agent with optional filtering.","operationId":"list_conversations_api_v1_conversations_agents__agent_id__conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/skip"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/start_date_b4821dbd"},{"$ref":"#/components/parameters/end_date_8cacdc68"},{"$ref":"#/components/parameters/call_type"},{"$ref":"#/components/parameters/conversation_type"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationListResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/agents/{agent_id}/conversations/{conversation_id}":{"get":{"tags":["Conversations"],"summary":"Get Conversation","description":"Get a specific conversation with all messages.\n\nArgs:\n    agent_id: Agent ID\n    conversation_id: Conversation ID\n    include: Optional ``?include=flattened`` adds the bubble-shape\n        transcript to the response. Other comma-separated values are\n        silently ignored (forward-compatibility).","operationId":"get_conversation_api_v1_conversations_agents__agent_id__conversations__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/include"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDetailResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"delete":{"tags":["Conversations"],"summary":"Delete Conversation","description":"Delete a conversation and all its messages.\n\nArgs:\n    agent_id: Agent ID\n    conversation_id: Conversation ID\n    db: Database session\n    current_user: Current authenticated user\n    current_org: Current active organization\n\nRaises:\n    HTTPException: If agent or conversation not found, or unauthorized","operationId":"delete_conversation_api_v1_conversations_agents__agent_id__conversations__conversation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"204":{"description":"Successful Response"},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/agents/{agent_id}/conversations/{conversation_id}/fix-suggestions":{"post":{"tags":["Conversations"],"summary":"Suggest Fixes For Conversation Endpoint","description":"Generate AI fix suggestions for a user-flagged answer in a conversation.\n\nReuses the strict-test fix core (``services/testing/conversation_fix.","operationId":"suggest_fixes_for_conversation_endpoint_api_v1_conversations_agents__agent_id__conversations__conversation_id__fix_suggestions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationFixRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FixSuggestionsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/agents/{agent_id}/conversations/{conversation_id}/fix-verify":{"post":{"tags":["Conversations"],"summary":"Verify Conversation Fix Endpoint","description":"Verify Conversation Fix Endpoint","operationId":"verify_conversation_fix_endpoint_api_v1_conversations_agents__agent_id__conversations__conversation_id__fix_verify_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FixVerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FixVerifyResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/agents/{agent_id}/conversations/{conversation_id}/messages":{"post":{"tags":["Conversations"],"summary":"Add Message","description":"Add a message to a conversation.\n\nArgs:\n    agent_id: Agent ID\n    conversation_id: Conversation ID\n    message_data: Message data (role, content, timestamp)\n    db: Database session\n    current_user: Current authenticated user\n    current_org: Current active organization\n\nReturns:\n    Created message\n\nRaises:\n    HTTPException: If agent or conversation not found, or unauthorized","operationId":"add_message_api_v1_conversations_agents__agent_id__conversations__conversation_id__messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__conversation__MessageResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/agents/{agent_id}/conversations/{conversation_id}/documents/upload-url":{"post":{"tags":["Conversations"],"summary":"Get Document Upload Url","description":"Get a presigned URL for uploading a document during a conversation.\n\nThis is a PUBLIC endpoint (no auth required) for use by the chat widget.\nThe chat widget needs to upload documents during collect node interactions.","operationId":"get_document_upload_url_api_v1_conversations_agents__agent_id__conversations__conversation_id__documents_upload_url_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUploadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUploadResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/agents/{agent_id}/conversations/{conversation_id}/documents/confirm":{"post":{"tags":["Conversations"],"summary":"Confirm Document Upload","description":"Confirm a document upload and persist it in conversation state.\n\nThis is a PUBLIC endpoint (no auth required) for use by the chat widget.\nAfter uploading a file to S3 via presigned URL, the widget calls this\nto store the document reference in conversation state variables so the\ncollect node can see pre-uploaded documents.","operationId":"confirm_document_upload_api_v1_conversations_agents__agent_id__conversations__conversation_id__documents_confirm_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentConfirmRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/agents/{agent_id}/conversations/{conversation_id}/documents/merge":{"post":{"tags":["Conversations"],"summary":"Merge Document Uploads","description":"Merge several already-uploaded documents into one document variable.\n\nThis is a PUBLIC endpoint (no auth required) for use by the chat widget,\nmatching the trust model of the sibling upload-url/confirm endpoints.\n\nUsed by `multi_file` document fields on collect nodes: the widget uploads each\npart via the presigned-URL endpoint, then calls this once.","operationId":"merge_document_uploads_api_v1_conversations_agents__agent_id__conversations__conversation_id__documents_merge_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentMergeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/agents/{agent_id}/conversations/{conversation_id}/documents/{variable_name}":{"delete":{"tags":["Conversations"],"summary":"Delete Document Variable","description":"Remove a document variable from conversation state.\n\nThis is a PUBLIC endpoint (no auth required) for use by the chat widget.\nCalled when a user removes an uploaded document from the document collection panel.\n\nArgs:\n    agent_id: Agent ID\n    conversation_id: Conversation ID\n    variable_name: Name of the document variable to remove\n    db: Database session\n\nReturns:\n    Success status","operationId":"delete_document_variable_api_v1_conversations_agents__agent_id__conversations__conversation_id__documents__variable_name__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"variable_name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/agents/{agent_id}/conversations/{conversation_id}/documents/{field_name}/file":{"get":{"tags":["Conversations"],"summary":"Get Document File","description":"Proxy-download a document file from a conversation.\n\nReturns the raw file bytes with proper Content-Type and Content-Disposition\nheaders. The frontend never talks to S3 directly.\n\nSupports two modes:\n1. Look up document from extraction_results (default) - for completed conversations\n2. Use provided s3_key directly - for live conversations where document is in memory","operationId":"get_document_file_api_v1_conversations_agents__agent_id__conversations__conversation_id__documents__field_name__file_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"field_name","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/download_49f05320"},{"$ref":"#/components/parameters/s3_key"},{"$ref":"#/components/parameters/filename"},{"$ref":"#/components/parameters/content_type"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/agents/{agent_id}/conversations/{conversation_id}/documents/export":{"get":{"tags":["Conversations"],"summary":"Export Conversation Documents","description":"Export all documents from a conversation as a ZIP file.\n\nThis is an AUTHENTICATED endpoint for use by the dashboard.\n\nArgs:\n    agent_id: Agent ID\n    conversation_id: Conversation ID\n    db: Database session\n    current_user: Current authenticated user\n    current_org: Current active organization\n\nReturns:\n    StreamingResponse with ZIP file containing all documents\n\n..","operationId":"export_conversation_documents_api_v1_conversations_agents__agent_id__conversations__conversation_id__documents_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/documents/download-urls":{"post":{"tags":["Conversations"],"summary":"Get Document Download Urls","description":"Generate pre-signed download URLs for conversation documents.\n\nReturns pre-signed S3 URLs for each document found in the specified\nconversations. The client downloads and creates a ZIP client-side.\nSupports bulk export across multiple conversations.","operationId":"get_document_download_urls_api_v1_conversations_documents_download_urls_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDocumentDownloadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadUrlsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/dashboard-summary":{"get":{"tags":["Conversations"],"summary":"Get Dashboard Summary","description":"Get Dashboard Summary","operationId":"get_dashboard_summary_api_v1_conversations_dashboard_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/days"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardSummaryResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/agents/{agent_id}/analytics":{"get":{"tags":["Conversations"],"summary":"Get Conversation Analytics","description":"Get Conversation Analytics","operationId":"get_conversation_analytics_api_v1_conversations_agents__agent_id__analytics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/days"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/pii/decrypt":{"post":{"tags":["Conversations"],"summary":"Decrypt Pii Value","description":"Decrypt a single masked PII value for dashboard click-to-reveal.\n\nRequires:\n- Agent must have reveal_mode=\"revealable\" in pii_mask_config\n- User's role must meet agent's reveal_min_role threshold","operationId":"decrypt_pii_value_api_v1_conversations_pii_decrypt_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PIIDecryptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PIIDecryptResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/semantic-search":{"post":{"tags":["Conversations"],"summary":"Semantic Search Conversations","description":"Perform semantic search across organization's conversations using AI embeddings.\n\nArgs:\n    request: Search request with query and filters\n    db: Database session\n    current_user: Current authenticated user\n    current_org: Current organization\n\nReturns:\n    List of conversations matching the semantic query\n\nNote:\n    This endpoint searches across all agents in the organization.","operationId":"semantic_search_conversations_api_v1_conversations_semantic_search_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SemanticSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SemanticSearchResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/embed-conversation/{conversation_id}":{"post":{"tags":["Conversations"],"summary":"Embed Conversation","description":"Embed a single conversation for semantic search.\n\nArgs:\n    conversation_id: Conversation ID to embed\n    background_tasks: FastAPI background tasks\n    db: Database session\n    current_user: Current authenticated user\n    current_org: Current organization\n\nReturns:\n    Success message","operationId":"embed_conversation_api_v1_conversations_embed_conversation__conversation_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/rebuild-embeddings-index":{"post":{"tags":["Conversations"],"summary":"Rebuild Embeddings Index","description":"Rebuild the entire conversation embeddings index for all agents in the organization.\n\nArgs:\n    background_tasks: FastAPI background tasks\n    db: Database session\n    current_user: Current authenticated user\n    current_org: Current organization\n\nReturns:\n    Success message\n\nNote:\n    This is a background task that may take several minutes for organizations with many conversations.","operationId":"rebuild_embeddings_index_api_v1_conversations_rebuild_embeddings_index_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/messages/feedback":{"post":{"tags":["Conversations"],"summary":"Submit Message Feedback Endpoint","description":"Submit feedback (thumbs up/down) for a specific message.\n\nMessage IDs are in the format {turn_id}-assistant (matching ConversationMessage.id).","operationId":"submit_message_feedback_endpoint_api_v1_conversations_messages_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageFeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/rating":{"post":{"tags":["Conversations"],"summary":"Submit Conversation Rating","description":"Submit a star rating (1-5) for a conversation.\n\nArgs:\n    rating_request: Conversation rating data (conversation_id and rating)\n    background_tasks: FastAPI background tasks\n    db: Database session\n\nReturns:\n    Success message with updated rating\n\nRaises:\n    HTTPException: If conversation not found or invalid rating","operationId":"submit_conversation_rating_api_v1_conversations_rating_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationRatingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}":{"get":{"tags":["Conversations"],"summary":"Get Conversation By Id","description":"Get a conversation by ID.\n\nThis endpoint allows fetching a conversation without knowing the agent ID,\nuseful for deep-linking from notifications and other contexts.","operationId":"get_conversation_by_id_api_v1_conversations__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}/preview":{"get":{"tags":["Conversations"],"summary":"Get Conversation Preview","description":"Get Conversation Preview","operationId":"get_conversation_preview_api_v1_conversations__conversation_id__preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/limit_bd9bdc19"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_PreviewResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}/resolve-org":{"get":{"tags":["Conversations"],"summary":"Resolve Conversation Org","description":"Resolve Conversation Org","operationId":"resolve_conversation_org_api_v1_conversations__conversation_id__resolve_org_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}/recording-url":{"get":{"tags":["Conversations"],"summary":"Get Recording Url","description":"Get a presigned URL for downloading a conversation recording.\n\nIf the recording is stored in S3, generates a 1-hour presigned URL.\nIf the recording is a direct URL (e.g., Twilio URL), returns it as-is.","operationId":"get_recording_url_api_v1_conversations__conversation_id__recording_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}/recording/upload-url":{"post":{"tags":["Conversations"],"summary":"Get Recording Upload Url","description":"Get a presigned URL for uploading a browser recording to S3.\nUsed by voice test panel to upload MediaRecorder captures.","operationId":"get_recording_upload_url_api_v1_conversations__conversation_id__recording_upload_url_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}/recording/confirm":{"post":{"tags":["Conversations"],"summary":"Confirm Recording Upload","description":"Confirm that a browser recording has been uploaded to S3.\nSets the recording_url on the conversation so it appears in the dashboard.","operationId":"confirm_recording_upload_api_v1_conversations__conversation_id__recording_confirm_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingConfirmRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}/pdf-download-url":{"get":{"tags":["Conversations"],"summary":"Get Pdf Download Url","description":"Get a presigned URL for downloading a filled PDF for a conversation.\n\nWith multiple PDF fill configs, a conversation can produce several filled\nPDFs (extraction_results[\"pdf_documents\"]). Pass ``config_id`` to select a\nspecific one; without it, the first completed doc is returned. Falls back\nto the legacy single ``pdf_document`` key for older conversations.","operationId":"get_pdf_download_url_api_v1_conversations__conversation_id__pdf_download_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/config_id"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}/recording":{"get":{"tags":["Conversations"],"summary":"Stream Recording","description":"Stream a conversation recording directly through the backend.\n\nThis endpoint proxies the recording from S3/storage, which is useful when:\n- S3/SeaweedFS is not directly accessible from the browser (e.g.","operationId":"stream_recording_api_v1_conversations__conversation_id__recording_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}/restore":{"post":{"tags":["Conversations"],"summary":"Restore Conversation State","description":"Restore a conversation to a previous state.\n\nThis endpoint allows \"rewinding\" a conversation to a specific interaction point.\nIt restores the conversation's state (current_state) from the interaction's\nstate_snapshot and removes all subsequent interactions and messages.","operationId":"restore_conversation_state_api_v1_conversations__conversation_id__restore_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationRestoreRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationRestoreResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}/tester-notes":{"post":{"tags":["Conversations"],"summary":"Create Tester Note","description":"Attach a tester bug-report note to a conversation.\n\nUsed by the agent builder voice-test panel's \"mark text + comment\" flow.\nShares storage and Slack delivery with the DTMF `*` voice tester-note path.","operationId":"create_tester_note_api_v1_conversations__conversation_id__tester_notes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TesterNoteCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TesterNoteCreateResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}/transcript":{"get":{"tags":["Conversations"],"summary":"Export Conversation Transcript","description":"Export a single conversation transcript.","operationId":"export_conversation_transcript_api_v1_conversations__conversation_id__transcript_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/format_99aaef8a"},{"$ref":"#/components/parameters/include_tools_a3be1cb4"},{"$ref":"#/components/parameters/tz_3b01eea3"},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/transcripts/export":{"post":{"tags":["Conversations"],"summary":"Export Bulk Transcripts","description":"Export multiple conversation transcripts as a ZIP file.\n\nArgs:\n    export_request: Export request with conversation IDs or filters\n    db: Database session\n    current_user: Current authenticated user\n    current_org: Current organization\n\nReturns:\n    StreamingResponse with ZIP file download containing all transcripts\n\nRaises:\n    HTTPException: If no conversations found or export fails\n\n..","operationId":"export_bulk_transcripts_api_v1_conversations_transcripts_export_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptExportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/transcripts/download-urls":{"post":{"tags":["Conversations"],"summary":"Get Transcript Download Urls","description":"Generate download URLs for conversation transcripts.\n\nReturns inline data URLs for each transcript. The client downloads\nand creates a ZIP file client-side using these URLs.\n\nLimited to 200 conversations per request to bound memory usage.","operationId":"get_transcript_download_urls_api_v1_conversations_transcripts_download_urls_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptExportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadUrlsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}/evaluation":{"get":{"tags":["Conversations"],"summary":"Get Conversation Evaluation","description":"Get full evaluation details with reasoning for a conversation.","operationId":"get_conversation_evaluation_api_v1_conversations__conversation_id__evaluation_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}/rerun-actions":{"post":{"tags":["Conversations"],"summary":"Rerun Conversation Actions","description":"Rerun post-conversation actions (email, webhook) for a specific conversation.\n\nLoads the conversation and its agent, rebuilds the transcript, and re-executes\nall enabled post-conversation actions. Stores updated results back to\nextraction_results['action_results'].\n\nReturns:\n    List of action result dicts with keys: action_id, action_name, type, success, error.","operationId":"rerun_conversation_actions_api_v1_conversations__conversation_id__rerun_actions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}/monitor-token":{"get":{"tags":["Conversations"],"summary":"Get Monitor Token","description":"Get a monitor token for live audio monitoring of an active voice conversation.\n\nGenerates a short-lived JWT that authenticates WebSocket connections to the\nvoice service's monitor endpoint.","operationId":"get_monitor_token_api_v1_conversations__conversation_id__monitor_token_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/{conversation_id}/anonymize":{"post":{"tags":["Conversations"],"summary":"Anonymize Conversation","description":"Manually anonymize a single conversation, bypassing the retention policy date guard.\n\nUsed for legacy conversations that predate an agent's retention policy.","operationId":"anonymize_conversation_api_v1_conversations__conversation_id__anonymize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/export-jobs":{"post":{"tags":["Conversations"],"summary":"Create Conversation Export Job","description":"Accept a conversations export and build it in the background.\n\nValidation (agent ownership, exportable columns) happens here with the\nsame 404 / 400 as the in-request export; the row count for the progress\nindicator is taken here too. Returns the job in ``pending`` state.","operationId":"create_conversation_export_job_api_v1_conversations_export_jobs_post","security":[{"HTTPBearer":[]}],"parameters":[{"$ref":"#/components/parameters/format"},{"$ref":"#/components/parameters/agent_id_ac5bdf63"},{"$ref":"#/components/parameters/tz_477f7e21"},{"$ref":"#/components/parameters/start_date_b4821dbd"},{"$ref":"#/components/parameters/end_date_8cacdc68"},{"$ref":"#/components/parameters/call_type"},{"$ref":"#/components/parameters/conversation_type"},{"$ref":"#/components/parameters/source_2d59cfdd"},{"$ref":"#/components/parameters/include_test"},{"$ref":"#/components/parameters/include_simulated"},{"$ref":"#/components/parameters/source_channel"},{"$ref":"#/components/parameters/agent_ids_d408e484"},{"$ref":"#/components/parameters/min_duration"},{"$ref":"#/components/parameters/max_duration"},{"$ref":"#/components/parameters/min_message_count"},{"$ref":"#/components/parameters/max_message_count"},{"$ref":"#/components/parameters/include_no_user_message_8dba6fc1"},{"$ref":"#/components/parameters/star_rating"},{"$ref":"#/components/parameters/has_rating"},{"$ref":"#/components/parameters/has_transfer"},{"$ref":"#/components/parameters/has_governance_incidents"},{"$ref":"#/components/parameters/sentiment"},{"$ref":"#/components/parameters/status_80f3cace"},{"$ref":"#/components/parameters/outcome_classification"},{"$ref":"#/components/parameters/needs_attention"},{"$ref":"#/components/parameters/resolution_bucket_c2f08cf0"},{"$ref":"#/components/parameters/custom_field_filters"},{"$ref":"#/components/parameters/flow_variable_filters"},{"$ref":"#/components/parameters/variable_filters"},{"$ref":"#/components/parameters/search_2bd2f7b2"},{"$ref":"#/components/parameters/from_number"},{"$ref":"#/components/parameters/to_number"},{"$ref":"#/components/parameters/external_id"},{"$ref":"#/components/parameters/conversation_id_cf612bbb"},{"$ref":"#/components/parameters/node"},{"$ref":"#/components/parameters/dropped"},{"$ref":"#/components/parameters/dropped_nodes"},{"$ref":"#/components/parameters/fv_id"},{"$ref":"#/components/parameters/nvm"},{"$ref":"#/components/parameters/nvx"},{"$ref":"#/components/parameters/top_n"},{"$ref":"#/components/parameters/visited_node_id"},{"$ref":"#/components/parameters/ended_node_id_283ca92d"},{"$ref":"#/components/parameters/av"},{"$ref":"#/components/parameters/edge_from_8a3388a5"},{"$ref":"#/components/parameters/edge_to_297e2a72"},{"$ref":"#/components/parameters/gbg_075811ec"},{"$ref":"#/components/parameters/agg_rev_9c65a851"},{"$ref":"#/components/parameters/topic_node_id_07a5636e"},{"$ref":"#/components/parameters/topic_includes_secondary"},{"$ref":"#/components/parameters/topic_subtree_7413e456"},{"$ref":"#/components/parameters/qa_cluster_id_27fa135b"},{"$ref":"#/components/parameters/qa_pair_id"},{"$ref":"#/components/parameters/widget_conditions_27796d51"},{"$ref":"#/components/parameters/XOrganizationID"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConversationsExportBody"},{"type":"null"}]}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationExportJobResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/api/v1/conversations/export-jobs/{job_id}":{"get":{"tags":["Conversations"],"summary":"Get Conversation Export Job","description":"Poll a job. ``download_url`` is set once ``status`` is ``completed``.","operationId":"get_conversation_export_job_api_v1_conversations_export_jobs__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/XOrganizationID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationExportJobResponse"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}}},"components":{"schemas":{"ConversationsExportBody":{"properties":{"columns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"Ordered conversations-page column ids to export ('summary', 'agent', 'flow_var:<field>', ...). Omit for the default fixed export layout."},"widget_conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Custom Widget drill-down payload \u2014 identical shape and semantics to the query param, and takes precedence over it (mirrors POST /query)."}},"type":"object","description":""},"GroupedAggregateRow":{"properties":{"label":{"title":"Label"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"is_other":{"type":"boolean","default":false},"bucket_index":{"anyOf":[{"type":"integer"},{"type":"null"}]},"values":{"anyOf":[{"items":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}]},"type":"array"},{"type":"null"}]}},"type":"object","description":""},"UIToolSpecResponse":{"properties":{"spec":{"additionalProperties":true,"type":"object"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object","required":["spec"]},"InitiateUploadRequest":{"properties":{"files":{"items":{"$ref":"#/components/schemas/PresignedUrlRequest"},"type":"array"},"extract_images":{"type":"boolean","default":false}},"type":"object","required":["files"],"description":"Request to initiate a batch upload with presigned URLs."},"CertificateConfig":{"properties":{"enabled":{"type":"boolean","default":false},"certificate_pem":{"anyOf":[{"type":"string"},{"type":"null"}]},"private_key_pem":{"anyOf":[{"type":"string"},{"type":"null"}]},"pfx_data":{"anyOf":[{"type":"string"},{"type":"null"}]},"pfx_password":{"anyOf":[{"type":"string"},{"type":"null"}]},"certificate_cn":{"anyOf":[{"type":"string"},{"type":"null"}]},"certificate_expiry":{"anyOf":[{"type":"string"},{"type":"null"}]},"certificate_format":{"type":"string","enum":["pem","pfx"],"default":"pem"}},"type":"object","description":"Client certificate configuration for mTLS authentication.\n\nSupports both PEM format (separate cert/key files) and PFX/P12 format."},"ApprovalSettingsResponse":{"properties":{"require_approval":{"type":"boolean"},"approval_config":{"anyOf":[{"$ref":"#/components/schemas/ApprovalConfig"},{"type":"null"}]}},"type":"object","required":["require_approval"],"description":"Response with current approval settings."},"VerificationRecord":{"properties":{"snapshot_id":{"type":"string","description":"QualityGateSnapshot.id from the source agent"},"composition_hash":{"type":"string","description":"SHA-256 hex of the canonicalized composition"},"agent_scoped_number":{"type":"integer","description":"Per-agent sequential snapshot number on the source"},"total_items":{"type":"integer","description":"Total tests in the verifying run"},"passed_items":{"type":"integer","description":"Passed tests in the verifying run"},"failed_items":{"type":"integer","description":"Failed tests in the verifying run (always 0 for verified)"},"verified_at":{"type":"string","format":"date-time","description":"TestRun.completed_at of the passing run"},"test_run_id":{"type":"integer","description":"TestRun.id of the verifying run on the source"},"version_display":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source agent's version label (e.g. 'v1.0.2') \u2014 kept as-is, not translated to target"},"verified_by_user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Email of the QualityGateSnapshot.created_by user (raw email, matches exported_by precedent)"}},"type":"object","required":["snapshot_id","composition_hash","agent_scoped_number","total_items","passed_items","failed_items","verified_at","test_run_id"],"description":""},"KBSiblingInfo":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"type":"object","required":["name"],"description":"A sibling knowledge base on the same agent (split KB tools context)."},"UpdateChunkingRequest":{"properties":{"chunk_size":{"type":"integer","maximum":8000.0,"minimum":100.0,"description":"Characters per chunk (100-8000)"},"chunk_overlap":{"type":"integer","maximum":2000.0,"minimum":0.0,"description":"Overlap between chunks (0-2000)"},"chunking_strategy":{"$ref":"#/components/schemas/ChunkingStrategy","description":"Chunking strategy","default":"recursive"}},"type":"object","required":["chunk_size","chunk_overlap"],"description":"Request schema for updating chunking settings."},"UpdateAgenticIndexingRequest":{"properties":{"enabled":{"type":"boolean","description":"Enable or disable agentic indexing"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"LLM model for enrichment (e.g., claude-sonnet-4-5)"},"custom_enrichment_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Custom prompt template for chunk enrichment. Overrides the default summarization + tags prompt."}},"type":"object","required":["enabled"],"description":"Request to update agentic indexing settings for a KB."},"SavedQAFixSuggestion":{"properties":{"title":{"type":"string"},"rationale":{"type":"string"},"type":{"type":"string","const":"add_saved_qa","default":"add_saved_qa"},"kb_id":{"type":"string"},"question":{"type":"string"},"answer":{"type":"string"}},"type":"object","required":["title","rationale","kb_id","question","answer"],"description":"Content gap \u2014 no chunk covers the answer; propose a saved Q&A."},"BuildAgentResponse":{"properties":{"agent_name":{"type":"string"},"greeting_message":{"type":"string"},"system_prompt":{"type":"string"}},"type":"object","required":["agent_name","greeting_message","system_prompt"],"description":"Schema for the built agent configuration."},"ApprovalSettingsUpdate":{"properties":{"require_approval":{"type":"boolean","description":"Whether approval is required before publishing"},"approval_config":{"anyOf":[{"$ref":"#/components/schemas/ApprovalConfig"},{"type":"null"}],"description":"Approver configuration (null to clear)"}},"type":"object","required":["require_approval"],"description":"Request to update approval settings for an agent."},"ConversationRestoreRequest":{"properties":{"interaction_id":{"type":"string"}},"type":"object","required":["interaction_id"],"description":"Schema for restoring conversation to a previous state."},"TestFixSuggestion":{"properties":{"title":{"type":"string"},"rationale":{"type":"string"},"type":{"type":"string","const":"update_test","default":"update_test"},"strict_replay_id":{"type":"integer"},"field":{"type":"string","enum":["expected_outcome","question"]},"current_value":{"anyOf":[{"type":"string"},{"type":"null"}]},"proposed_value":{"type":"string"}},"type":"object","required":["title","rationale","strict_replay_id","field","proposed_value"],"description":"The test itself is wrong/stale \u2014 fix expected_outcome or question."},"AuditLogEntry":{"properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_number":{"anyOf":[{"type":"integer"},{"type":"null"}]},"action":{"type":"string"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"type":"object","required":["id","agent_id","version_id","version_number","action","user_id","details","created_at"],"description":"Audit log entry for version lifecycle events."},"CrawlMapCurateRequest":{"properties":{"entry_ids":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1},"status":{"type":"string"}},"type":"object","required":["entry_ids","status"],"description":""},"KBReference":{"properties":{"kb_id":{"type":"string"},"name":{"type":"string"},"has_content":{"type":"boolean","description":"True when the export zip bundles full KB content (docs, chunks, Q&A). Set by the export endpoint when include_kb_content=True.","default":false}},"type":"object","required":["kb_id","name"],"description":"Minimal KB reference for display in import wizard. No documents or config."},"VariableOption":{"properties":{"name":{"type":"string"},"type":{"type":"string"},"source_agents":{"items":{"type":"string"},"type":"array"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]}},"type":"object","required":["name","type","source_agents"],"description":"Available variable/field option for conversation filtering."},"IdleNudgeRequest":{"properties":{"attempt":{"type":"integer","maximum":10.0,"minimum":1.0,"description":"1-indexed reprompt attempt number."},"max_attempts":{"type":"integer","maximum":10.0,"minimum":1.0,"description":"Configured reprompt ceiling."},"idle_seconds":{"type":"integer","maximum":600.0,"minimum":1.0,"description":"How long the user was silent before triggering."},"custom_instruction":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent-authored instruction for the LLM. None = platform default."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent language/locale tag (e.g. 'he-IL', 'en-US')."},"dtmf_only":{"type":"boolean","description":"","default":false},"voice_fallback":{"type":"boolean","description":"True for the final DTMF-only nudge after voice has been re-enabled: the nudge tells the caller they can type OR speak the number.","default":false},"farewell":{"type":"boolean","description":"The reprompts are exhausted (voice-v2, VI-19): stream the farewell instead of a nudge, close it with x-conversation-end and persist it as the idle_farewell row\u2026","default":false}},"type":"object","required":["attempt","max_attempts","idle_seconds"],"description":"Voice-side request for a single user-idle reprompt."},"ConversationDocumentDownloadRequest":{"properties":{"conversation_ids":{"items":{"type":"string"},"type":"array","description":"List of conversation IDs to export documents from"}},"type":"object","required":["conversation_ids"],"description":"Request schema for conversation document download URLs."},"CrawlMapEntryResponse":{"properties":{"id":{"type":"string"},"url":{"type":"string"},"source_root_url":{"type":"string"},"depth":{"anyOf":[{"type":"integer"},{"type":"null"}]},"status":{"type":"string"},"include_flag":{"type":"boolean"},"discovery_source":{"type":"string"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_crawled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"change_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"entry_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"ingest_state":{"anyOf":[{"type":"string"},{"type":"null"}]},"ingest_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"guard_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"membership":{"anyOf":[{"type":"string"},{"type":"null"}]},"in_scope":{"type":"boolean","default":false},"available_actions":{"items":{"type":"string"},"type":"array"},"excluded_by_rule":{"type":"boolean","default":false},"bucket":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object","required":["id","url","source_root_url","status","include_flag","discovery_source"],"description":""},"GenerateUIToolRequest":{"properties":{"description":{"type":"string","maxLength":2000,"minLength":3}},"type":"object","required":["description"]},"CustomPIIType":{"properties":{"id":{"type":"string","description":"Stable entity id, e.g. CUSTOM_AB12CD. Used verbatim as the Presidio entity type and inside the masked token, so it must match ^CUSTOM_[A-Z0-9_]{1,40}$."},"name":{"type":"string","maxLength":50,"minLength":1,"description":"Display label shown on the masking badge (any language)."},"regex":{"type":"string","maxLength":1000,"minLength":1,"description":"Detection pattern. Whole match is masked."},"enabled":{"type":"boolean","description":"Whether this type is active.","default":true}},"type":"object","required":["id","name","regex"],"description":""},"SessionDataFieldDefinition":{"properties":{"name":{"type":"string","maxLength":50,"minLength":1,"description":"Variable name to use in flows (e.g., 'user_id', 'account_tier')"},"source_path":{"type":"string","maxLength":200,"minLength":1,"description":"Dot notation path to extract from session_data (e.g., 'user.id', 'account.tier')"},"type":{"type":"string","enum":["string","number","boolean","object","list","enum"],"description":"Expected data type of the field","default":"string"},"required":{"type":"boolean","description":"Whether this field is required (logs warning if missing)","default":false},"default":{"anyOf":[{},{"type":"null"}],"description":"Default value if field is missing from session_data"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Human-readable description for documentation and autocomplete"},"is_system":{"type":"boolean","description":"If True, this is a system field that cannot be removed by users","default":false},"enum_values":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"Allowed values when type is 'enum'"},"source":{"type":"string","enum":["api","csv"],"description":"Where this variable's value originates. 'api' = embed widget / API request body / magic link / SIP headers (the existing entry points).","default":"api"}},"type":"object","required":["name","source_path"],"description":"Definition of a field to extract from session_data."},"PositionBatchRequest":{"properties":{"nodes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"List of {node_id: str, position: {x: float, y: float}}"}},"type":"object","required":["nodes"],"description":"Request to batch-update node positions (for drag operations)."},"ToolTestChainResponse":{"properties":{"success":{"type":"boolean"},"stopped_at_index":{"type":"integer"},"steps":{"items":{"$ref":"#/components/schemas/ToolTestChainStepResult"},"type":"array","default":[]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object","required":["success","stopped_at_index"],"description":"Response schema for a chain (sequence) test."},"VersionApprovalRequest":{"properties":{"comment":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Comment explaining the changes"}},"type":"object","description":"Request approval for a version."},"VersionDiffFieldChange":{"properties":{"field_path":{"type":"string"},"old_value":{"anyOf":[{},{"type":"null"}]},"new_value":{"anyOf":[{},{"type":"null"}]},"change_type":{"type":"string","enum":["added","removed","modified"]}},"type":"object","required":["field_path","change_type"],"description":"Single field change in version diff."},"FlowStageNode":{"properties":{"label":{"title":"Label"},"count":{"type":"integer","default":0},"is_other":{"type":"boolean","default":false},"bucket_index":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"type":"object","description":""},"ConversationRatingRequest":{"properties":{"conversation_id":{"type":"string"},"rating":{"type":"integer"}},"type":"object","required":["conversation_id","rating"],"description":"Schema for submitting conversation star rating (1-5)."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array"}},"type":"object"},"OpenAIMessage":{"properties":{"role":{"$ref":"#/components/schemas/OpenAIMessageRole"},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object","required":["role"],"description":"OpenAI message format.\n\nAttributes:\n    role: The role of the message author (system, user, assistant, tool)\n    content: The content of the message\n    name: O\u2026"},"SuggestUIToolsRequest":{"properties":{"count":{"type":"integer","maximum":4.0,"minimum":1.0,"default":2},"focus":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"type":"object"},"AgentVersionDetailResponse":{"properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"version":{"type":"integer"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"created_by_user_id":{"type":"string"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_display":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent_version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","pending_approval","published","archived"],"default":"draft"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"snapshot":{"additionalProperties":true,"type":"object"},"approval_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"approved_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"approval_comment":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object","required":["id","agent_id","version","name","description","created_at","created_by_user_id","snapshot"],"description":"Schema for detailed agent version response (with snapshot)."},"ValidateUIToolRequest":{"properties":{"spec":{"additionalProperties":true,"type":"object"}},"type":"object","required":["spec"]},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array"},"msg":{"type":"string"},"type":{"type":"string"},"input":{"title":"Input"},"ctx":{"type":"object"}},"type":"object","required":["loc","msg","type"]},"AuthConfig":{"properties":{"type":{"type":"string","enum":["none","api_key","bearer","basic","oauth2","oauth1","jwt"],"default":"none"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"api_key_header":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"Authorization"},"api_key_prefix":{"anyOf":[{"type":"string"},{"type":"null"}]},"username":{"anyOf":[{"type":"string"},{"type":"null"}]},"password":{"anyOf":[{"type":"string"},{"type":"null"}]},"token":{"anyOf":[{"type":"string"},{"type":"null"}]},"algorithm":{"anyOf":[{"type":"string"},{"type":"null"}]},"jwt_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"jwt_passphrase":{"anyOf":[{"type":"string"},{"type":"null"}]},"jwt_payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}]},"jwt_headers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}]},"jwt_add_to":{"anyOf":[{"type":"string","enum":["header","query"]},{"type":"null"}],"default":"header"},"jwt_header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"Authorization"},"jwt_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"Bearer"},"jwt_key_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}]},"certificate":{"anyOf":[{"$ref":"#/components/schemas/CertificateConfig"},{"type":"null"}]},"skip_ssl_verification":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false}},"type":"object"},"PromptContext":{"properties":{"prompt_type":{"type":"string","enum":["system","node","greeting","end","collect","exit"],"description":"Type of prompt being enhanced"},"node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the node (for node prompts)"},"node_type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Type of node: start, conversation, collect, end"},"node_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable name of the node"}},"type":"object","required":["prompt_type"],"description":"Context about the prompt being enhanced."},"AgentSummary":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"},"is_live":{"type":"boolean","default":false},"capabilities":{"items":{"type":"string"},"type":"array"}},"type":"object","required":["id","name","is_active"],"description":"Minimal agent projection for dashboard counters and lists.\n\nReturned by GET /api/v1/agents?fields=summary."},"AgentExportMetadata":{"properties":{"export_version":{"type":"string","default":"2.3"},"exported_at":{"type":"string","format":"date-time"},"exported_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version ID if exported from a specific version"},"source_version_display":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version display string (e.g. '1.2.0') if exported from a specific version"},"snapshot_tools_available":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"False when exporting old version without tool snapshot \u2014 tools from current agent state"},"verification_record":{"anyOf":[{"$ref":"#/components/schemas/VerificationRecord"},{"type":"null"}],"description":""},"validation_status":{"type":"string","enum":["success","partial","failed"],"default":"success"},"validation_errors":{"items":{"type":"string"},"type":"array","description":"List of validation errors encountered during export"},"validation_warnings":{"items":{"type":"string"},"type":"array","description":"List of validation warnings (non-fatal issues)"}},"type":"object","required":["exported_at"],"description":"Metadata about the exported agent."},"PdfTemplateData":{"properties":{"config_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":""},"filename":{"type":"string"},"content_base64":{"type":"string"},"content_type":{"type":"string","default":"application/pdf"}},"type":"object","required":["filename","content_base64"],"description":"PDF template binary data for export/import portability."},"Body_upload_widget_icon_api_v1_agents__agent_id__upload_widget_icon_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream"}},"type":"object","required":["file"]},"GenerateCodeResponse":{"properties":{"code":{"type":"string","description":"Generated Python code"},"description":{"type":"string","description":"Brief description of what the code does"},"output_fields":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","description":"List of output fields with name and description"}},"type":"object","required":["code","description"],"description":"Schema for generated Python code."},"GenerateCodeRequest":{"properties":{"description":{"type":"string","minLength":10,"description":"Free-form description of what the code should do"},"available_fields":{"items":{"type":"string"},"type":"array","description":"List of field names available in the conversation flow"}},"type":"object","required":["description"],"description":"Schema for generating Python code from a description."},"CrawlMapCurateResponse":{"properties":{"updated":{"type":"integer"}},"type":"object","required":["updated"],"description":"Result of ``PATCH /{kb_id}/crawl-map/entries`` \u2014 rows actually updated."},"ToolAssignment":{"properties":{"response_path":{"type":"string","minLength":1,"description":"Path expression: dot notation for JSON, XPath for XML"},"variable_name":{"type":"string","minLength":1,"description":"Target variable name to store the value"},"extraction_type":{"type":"string","enum":["json_path","xpath"],"description":"Extraction method: json_path for JSON, xpath for XML","default":"json_path"}},"type":"object","required":["response_path","variable_name"],"description":"Mapping from tool response to variable.\n\nSupports two extraction types:\n- json_path: Dot notation for JSON (e.g., 'data."},"NodePatchResponse":{"properties":{"agent_id":{"type":"string"},"node_id":{"type":"string"},"flow_version":{"type":"integer"},"updated_at":{"type":"string"}},"type":"object","required":["agent_id","node_id","flow_version","updated_at"],"description":"Response after updating a single node."},"ConfirmUploadRequest":{"properties":{"document_id":{"type":"string"},"filename":{"type":"string"},"content_type":{"type":"string"},"storage_key":{"type":"string"},"file_size_bytes":{"type":"integer","exclusiveMinimum":0.0,"description":"File size must be positive"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Page this document was originally crawled from."}},"type":"object","required":["document_id","filename","content_type","storage_key","file_size_bytes"],"description":"Request to confirm a file was uploaded successfully."},"ChunkingStrategy":{"type":"string","enum":["recursive","semantic","markdown","markdown_headings","token"],"description":""},"ApprovalConfig":{"properties":{"approver_user_ids":{"items":{"type":"string"},"type":"array","description":"Specific user IDs who can approve"},"approver_roles":{"items":{"type":"string"},"type":"array","description":"Roles that can approve (e.g. admin, owner)"}},"type":"object","description":"Configuration for version approval workflow.\n\nDefines who is authorized to approve/reject versions."},"VersionDiffSummary":{"properties":{"id":{"type":"string"},"version_display":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"type":"object","required":["id","version_display","created_at"],"description":"Summary of a version for diff response."},"ConversationResponse":{"properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"call_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"from_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"to_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"started_at":{"type":"string","format":"date-time"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}]},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"local_recording_path":{"anyOf":[{"type":"string"},{"type":"null"}]},"transcript_simple":{"anyOf":[{"type":"string"},{"type":"null"}]},"transcript_detailed":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"conversation_type":{"type":"string","default":"voice"},"call_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","default":"production"},"source_channel":{"anyOf":[{"type":"string"},{"type":"null"}]},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"call_summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"short_summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"call_sentiment":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentiment_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}]},"outcome_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}]},"end_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"analysis_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"transferred_to_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false},"transfer_destination":{"anyOf":[{"type":"string"},{"type":"null"}]},"transfer_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"transfer_method":{"anyOf":[{"type":"string"},{"type":"null"}]},"transfer_target_value":{"anyOf":[{"type":"string"},{"type":"null"}]},"transfer_sip_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}]},"transfer_initiated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"needs_attention":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"needs_attention_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"attention_handled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"attention_handled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"attention_handled_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"attention_handled_by_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"eval_is_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"eval_injection_attempt":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"eval_injection_success":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"eval_hallucination":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"eval_out_of_context":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"eval_unanswered_question":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"eval_has_pii":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"eval_has_bias":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"eval_overall_score":{"anyOf":[{"type":"integer"},{"type":"null"}]},"eval_overall_severity":{"anyOf":[{"type":"string"},{"type":"null"}]},"eval_summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"eval_key_issues":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"eval_strengths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"eval_recommendations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"eval_score_breakdown":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}]},"eval_score_max_points":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}]},"user_message_count":{"anyOf":[{"type":"integer"},{"type":"null"}]},"unheard_message_count":{"anyOf":[{"type":"integer"},{"type":"null"}]},"first_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"star_rating":{"anyOf":[{"type":"integer"},{"type":"null"}]},"positive_feedback_count":{"type":"integer","default":0},"negative_feedback_count":{"type":"integer","default":0},"feedback_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"tester_notes":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}]},"session_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"page_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"extraction_results":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"live_extraction_results":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"is_returning_caller":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"call_count_last_week":{"anyOf":[{"type":"integer"},{"type":"null"}]},"governance_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"governance_incident_count":{"anyOf":[{"type":"integer"},{"type":"null"}]},"governance_critical_count":{"anyOf":[{"type":"integer"},{"type":"null"}]},"current_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"anonymized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"type":"object","required":["id","agent_id","call_id","from_number","to_number","started_at","ended_at","duration_seconds","recording_url","local_recording_path","transcript_simple","transcript_detailed","status","call_summary","call_sentiment"],"description":"Schema for conversation response."},"DownloadUrlsRequest":{"properties":{"kb_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"List of knowledge base IDs (for all KB mode)"},"document_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"List of document IDs (for single KB mode)"}},"type":"object","description":"Request body for generating download URLs."},"VersionDiffNodeChange":{"properties":{"node_id":{"type":"string"},"change_type":{"type":"string","enum":["added","removed","modified"]},"old_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"new_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]}},"type":"object","required":["node_id","change_type"],"description":"Flow node change in version diff."},"ConfirmUploadsRequest":{"properties":{"uploads":{"items":{"$ref":"#/components/schemas/ConfirmUploadRequest"},"type":"array"}},"type":"object","required":["uploads"],"description":"Request to confirm multiple files were uploaded successfully."},"AgentGraphPatchResponse":{"properties":{"agent_id":{"type":"string","description":"ID of the updated agent"},"nodes_added":{"type":"integer","description":"Number of new nodes added"},"nodes_updated":{"type":"integer","description":"Number of existing nodes updated (overwritten)"},"exits_added":{"type":"integer","description":"Number of new exits added"},"fields_added":{"type":"integer","description":"Number of new fields added","default":0},"fields_updated":{"type":"integer","description":"Number of existing fields updated","default":0},"tools_added":{"type":"integer","description":"Number of new tools added","default":0},"tools_updated":{"type":"integer","description":"Number of existing tools updated","default":0},"total_nodes":{"type":"integer","description":"Total number of nodes in the flow after update"},"total_exits":{"type":"integer","description":"Total number of exits in the flow after update"},"total_fields":{"type":"integer","description":"Total number of fields in the flow after update","default":0},"total_tools":{"type":"integer","description":"Total number of tools after update","default":0},"message":{"type":"string","description":"Human-readable summary of the operation"}},"type":"object","required":["agent_id","nodes_added","nodes_updated","exits_added","total_nodes","total_exits","message"],"description":"Response schema for graph patch operations.\n\nReturns information about the applied changes and the updated flow state."},"AgentResponse":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"description":"Human-readable agent name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Brief description of the agent's purpose"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Assigned phone number in E.164 format (for voice agents)"},"greeting_text":{"type":"string","description":"Initial greeting message sent at conversation start"},"system_prompt":{"type":"string","description":"Main system prompt defining agent personality and behavior"},"security_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Security guidelines prompt for content filtering"},"security_enabled":{"type":"boolean","description":"Whether security evaluation is enabled for this agent","default":true},"security_confidence_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Minimum confidence to block a message (0.5-1.0)"},"security_block_message":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Message shown when input is blocked by security checks"},"security_check_input_enabled":{"type":"boolean","description":"Evaluate user messages for policy violations","default":true},"security_check_output_enabled":{"type":"boolean","description":"Evaluate agent responses for policy violations","default":false},"security_check_injection_enabled":{"type":"boolean","description":"Detect prompt injection attempts","default":true},"security_fail_policy":{"type":"string","description":"What happens when security evaluation fails: 'open' or 'closed'","default":"open"},"security_injection_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"Known phrases used in prompt injection attacks"},"security_passive_message":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Additional instruction appended to system prompt for passive security"},"security_tail_message":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Custom security reminder appended at end of system prompt (null = use default)"},"security_evaluation_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Custom prompt template for security evaluation LLM"},"security_llm_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"LLM provider for security evaluation"},"security_llm_model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"LLM model for security evaluation"},"security_inject_to_prompt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether to inject passive security instruction into system prompt (default True)"},"is_active":{"type":"boolean","description":"Whether the agent is active and can receive conversations","default":true},"is_live":{"type":"boolean","description":"Whether the agent is live in production (tracking flag only)","default":false},"id":{"type":"string"},"user_id":{"type":"string"},"organization_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"conversation_count":{"type":"integer","default":0},"has_running_ab_test":{"type":"boolean","default":false},"current_version":{"anyOf":[{"type":"integer"},{"type":"null"}]},"flow_version":{"type":"integer","default":1},"published_version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"require_approval_before_publish":{"type":"boolean","default":false},"has_unpublished_changes":{"type":"boolean","default":true},"llm_provider":{"type":"string"},"llm_model":{"type":"string"},"llm_temperature":{"type":"number"},"llm_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"tts_provider":{"type":"string"},"tts_voice_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"tts_voice_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"tts_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"tts_locale":{"type":"string"},"tts_tempo":{"anyOf":[{"type":"number"},{"type":"null"}]},"tts_variance":{"anyOf":[{"type":"number"},{"type":"null"}]},"tts_temperature":{"anyOf":[{"type":"number"},{"type":"null"}]},"tts_seed":{"anyOf":[{"type":"integer"},{"type":"null"}]},"tts_speaking_rate":{"type":"number"},"voice_instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"tts_voice_gender":{"anyOf":[{"type":"string"},{"type":"null"}]},"stt_provider":{"type":"string"},"stt_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"stt_language":{"type":"string"},"soniox_vad_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"soniox_guard_window_ms":{"anyOf":[{"type":"integer","maximum":1500.0,"minimum":0.0},{"type":"null"}],"description":"Endpoint continuation guard window in milliseconds"},"vad_stop_secs":{"type":"number"},"vad_confidence":{"type":"number"},"enable_rag":{"type":"boolean"},"knowledge_base_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"rag_retrieval_k":{"type":"integer"},"rag_embeddings_model":{"type":"string"},"enable_hybrid_search":{"type":"boolean","default":true},"enable_reranking":{"type":"boolean","default":false},"hybrid_search_alpha":{"type":"integer","default":50},"reranking_top_k":{"type":"integer","default":20},"reranking_final_k":{"type":"integer","default":5},"reranking_max_doc_length":{"type":"integer","default":500},"rag_include_conversation_context":{"type":"boolean","default":true},"rag_context_turns":{"type":"integer","default":1},"rag_mode":{"type":"string","default":"auto"},"kb_search_trigger_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"kb_fast_reply_mode":{"anyOf":[{"type":"string"},{"type":"null"}]},"add_ack":{"type":"boolean"},"enable_smart_ack":{"type":"boolean"},"ack_threshold_ms":{"type":"integer","default":500},"ack_response_gap_ms":{"type":"integer","default":250},"enable_nikud_replacement":{"type":"boolean"},"enable_transcripts":{"type":"boolean"},"enable_recordings":{"type":"boolean"},"notification_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"acknowledgments":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}]},"webhook_enabled":{"type":"boolean","default":false},"webhook_endpoint_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"webhook_include_recording":{"type":"boolean","default":true},"webhook_include_transcription":{"type":"boolean","default":true},"webhook_include_call_meta":{"type":"boolean","default":true},"webhook_include_dynamic_fields":{"type":"boolean","default":true},"webhook_auth_header":{"anyOf":[{"type":"string"},{"type":"null"}]},"transfer_enabled":{"type":"boolean"},"transfer_options":{"anyOf":[{},{"type":"null"}]},"allow_human_transfer":{"type":"boolean"},"send_sms_enabled":{"type":"boolean","default":false},"sms_recipient_variable":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"system__caller_id"},"sms_message_mode":{"type":"string","enum":["llm","scripted"],"default":"llm"},"sms_message_template":{"anyOf":[{"type":"string"},{"type":"null"}]},"has_sms_capable_phone":{"type":"boolean","default":false},"sms_sender_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"sms_per_conversation_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":3},"show_confirmation_use_yes_no_labels":{"type":"boolean","default":false},"data_retention_days":{"anyOf":[{"type":"integer"},{"type":"null"}]},"data_retention_mode":{"type":"string","enum":["delete","anonymize"],"default":"anonymize"},"mask_pii":{"type":"boolean","default":false},"pii_mask_config":{"anyOf":[{"$ref":"#/components/schemas/PIIMaskConfig"},{"type":"null"}]},"conversation_timeout_seconds":{"type":"integer","default":14400},"topic_classification_threshold":{"type":"number","default":0.6},"topics_enabled":{"type":"boolean","default":true},"qa_tracker_enabled":{"type":"boolean","default":true},"qa_answered_confidence_threshold":{"type":"number","default":0.6},"qa_routing_similarity_threshold":{"type":"number","default":0.7},"google_calendar_enabled":{"type":"boolean","default":false},"google_calendar_timeframe_days":{"type":"integer","default":10},"google_calendar_slot_duration":{"type":"integer","default":45},"show_preview_bubble":{"type":"boolean","default":true},"widget_icon_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"bot_icon_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"widget_primary_color":{"type":"string","default":"#0f172a"},"widget_header_text_color":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"#ffffff"},"widget_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"widget_button_style":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"circle"},"widget_button_scale":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":100},"widget_button_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"widget_button_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"widget_submit_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"widget_bot_bubble_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"widget_suggestion_color":{"anyOf":[{"type":"string"},{"type":"null"}]},"widget_draggable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true},"widget_show_header":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true},"widget_show_refresh_button":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true},"widget_show_end_conversation_rating":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true},"widget_show_message_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false},"widget_show_avatar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true},"widget_show_branding":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true},"widget_fullscreen_mode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false},"show_tool_activity":{"type":"boolean","default":false},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"access_mode":{"type":"string","default":"public"},"magic_link_required_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"magic_link_expired_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"illustration_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"illustration_generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"legal_disclaimer":{"anyOf":[{"type":"string"},{"type":"null"}]},"disclaimer_display_mode":{"type":"string","default":"expandable"},"agent_mode":{"type":"string","default":"simple"},"channel":{"type":"string","default":"voice"},"agent_language":{"type":"string","default":"en-US"},"timezone":{"type":"string","default":"UTC"},"flow_definition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"capabilities":{"items":{"type":"string"},"type":"array","description":"Modalities this agent supports: text (chat/sms/email), voice (phone)","default":["text"]},"enabled_channels":{"items":{"type":"string"},"type":"array","description":"Specific source channels enabled for this agent","default":["chat"]},"api_token":{"anyOf":[{"type":"string"},{"type":"null"}]},"custom_css":{"anyOf":[{"type":"string"},{"type":"null"}]},"session_data_config":{"anyOf":[{"$ref":"#/components/schemas/SessionDataConfig"},{"type":"null"}]},"custom_schema_config":{"anyOf":[{"$ref":"#/components/schemas/CustomSchemaConfig"},{"type":"null"}]},"async_callback_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"impression_tracking_enabled":{"type":"boolean","default":true},"visitor_cookie_ttl_hours":{"type":"integer","default":24},"widget_enabled":{"type":"boolean","default":true},"widget_exposure_percentage":{"type":"integer","default":100},"filler_sentences":{"items":{"$ref":"#/components/schemas/FillerSentenceResponse"},"type":"array","default":[]},"configuration_error":{"type":"boolean","description":"True when one or more stored config blobs could not be deserialised.","default":false},"configuration_error_fields":{"items":{"type":"string"},"type":"array","description":"Names of the config fields that failed validation and were withheld from this response (e.g. ['custom_schema_config'])."}},"type":"object","required":["name","greeting_text","system_prompt","id","user_id","organization_id","created_at","updated_at","llm_provider","llm_model","llm_temperature","llm_max_tokens","tts_provider","tts_voice_id","tts_voice_name","tts_model","tts_locale","tts_tempo","tts_variance","tts_temperature","tts_seed","tts_speaking_rate","voice_instructions","stt_provider","stt_model","stt_language","vad_stop_secs","vad_confidence","enable_rag","knowledge_base_id","rag_retrieval_k","rag_embeddings_model","add_ack","enable_smart_ack","enable_nikud_replacement","enable_transcripts","enable_recordings","notification_email","acknowledgments","transfer_enabled","transfer_options","allow_human_transfer"],"description":"Schema for agent response."},"ActiveExecutionsResponse":{"properties":{"executions_by_kb":{"additionalProperties":{"$ref":"#/components/schemas/ActiveExecutionStatus"},"type":"object"}},"type":"object","required":["executions_by_kb"],"description":"Schema for active executions response - grouped by KB."},"DownloadUrlsResponse":{"properties":{"files":{"items":{"$ref":"#/components/schemas/DocumentDownloadInfo"},"type":"array"},"total_count":{"type":"integer"},"total_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"type":"object","required":["files","total_count"],"description":"Response containing pre-signed download URLs."},"FixSuggestionsResponse":{"properties":{"diagnosis":{"type":"string"},"root_cause":{"type":"string","enum":["prompt","test_expectation","kb_content","kb_enrichment","retrieval_gap","document_structure","question_ambiguity","agent_behavior","unknown"]},"contributing_causes":{"items":{"type":"string","enum":["prompt","test_expectation","kb_content","kb_enrichment","retrieval_gap","document_structure","question_ambiguity","agent_behavior","unknown"]},"type":"array"},"suggestions":{"items":{"oneOf":[{"$ref":"#/components/schemas/TestFixSuggestion"},{"$ref":"#/components/schemas/PromptFixSuggestion"},{"$ref":"#/components/schemas/ChunkFixSuggestion"},{"$ref":"#/components/schemas/SavedQAFixSuggestion"},{"$ref":"#/components/schemas/DocumentFixSuggestion"}],"discriminator":{"propertyName":"type","mapping":{"add_saved_qa":"#/components/schemas/SavedQAFixSuggestion","restructure_document":"#/components/schemas/DocumentFixSuggestion","update_chunk":"#/components/schemas/ChunkFixSuggestion","update_prompt":"#/components/schemas/PromptFixSuggestion","update_test":"#/components/schemas/TestFixSuggestion"}}},"type":"array"},"context_notes":{"items":{"type":"string"},"type":"array"},"generated_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"cached":{"type":"boolean","default":false}},"type":"object","required":["diagnosis","root_cause"]},"SessionDataConfig":{"properties":{"enabled":{"type":"boolean","description":"Whether to extract session data as flow variables","default":false},"fields":{"items":{"$ref":"#/components/schemas/SessionDataFieldDefinition"},"type":"array","description":"Fields to extract from session_data"}},"type":"object","description":"Configuration for session data extraction from widget/API."},"DocumentDownloadInfo":{"properties":{"url":{"type":"string","description":"Pre-signed download URL or data URL"},"filename":{"type":"string","description":"Safe filename for the document"},"key":{"type":"string","description":"Original S3 key or document ID"},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":""},"folder":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Folder name for organizing exports in ZIP"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"File size in bytes"},"is_inline":{"type":"boolean","description":"If true, content is inline (data URL)","default":false}},"type":"object","required":["url","filename","key"],"description":"Download information for a single document."},"Body_upload_jwt_key_api_v1_tools_jwt_key_upload_post":{"properties":{"private_key_file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"description":"PEM private key file (.pem, .key, .p8)"},"private_key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"PEM private key text (alternative to file upload)"},"passphrase":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Passphrase for an encrypted PEM private key"},"algorithm":{"type":"string","description":"Signing algorithm (e.g. RS256)","default":"RS256"}},"type":"object"},"DocumentResponse":{"properties":{"id":{"type":"string"},"filename":{"type":"string"},"file_type":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"document_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"status":{"type":"string","default":"completed"},"processing_stage":{"type":"string","default":"completed"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"processed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"chunk_count":{"anyOf":[{"type":"integer"},{"type":"null"}]},"processing_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"file_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}]},"source_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]}},"type":"object","required":["id","filename","file_type","created_at"],"description":"Schema for document response."},"_PreviewResponse":{"properties":{"conversation_id":{"type":"string"},"total_messages":{"type":"integer"},"messages":{"items":{"$ref":"#/components/schemas/_PreviewMessage"},"type":"array"}},"type":"object","required":["conversation_id","total_messages","messages"]},"ConversationExportJobResponse":{"properties":{"id":{"type":"string"},"status":{"type":"string","description":"pending | running | completed | failed | expired"},"format":{"type":"string"},"layout":{"type":"string"},"total_rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Matching-row count at accept time; null when the count failed."},"rows_written":{"type":"integer","default":0},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}]},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"type":"object","required":["id","status","format","layout","created_at"],"description":"Status of one background export, as polled by the dashboard."},"ConversationFixRequest":{"properties":{"message_index":{"type":"integer","minimum":0.0},"selected_text":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"source":{"type":"string","enum":["selection","feedback"],"default":"selection"}},"type":"object","required":["message_index"],"description":""},"VariableValuesResponse":{"properties":{"values":{"items":{"type":"string"},"type":"array"},"has_more":{"type":"boolean"}},"type":"object","required":["values","has_more"],"description":"Response schema for distinct variable values endpoint."},"NodePatchRequest":{"properties":{"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Node data fields to merge (prompt, tools, kb_mode, etc.)"},"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Update the node's display name"},"position":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"description":"Update node position {x, y}"}},"type":"object","description":"Request to update a single node within an agent's flow graph.\n\nSupports partial updates - only provided fields are merged into the node."},"GenerateKBToolDescriptionRequest":{"properties":{"kb_name":{"type":"string","maxLength":255,"minLength":1,"description":"Name of the knowledge base this tool searches"},"kb_description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"description":"The KB entity's own description, if any"},"current_description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"description":"Existing tool description to improve (empty = generate from scratch)"},"other_kbs":{"items":{"$ref":"#/components/schemas/KBSiblingInfo"},"type":"array","description":"Sibling KBs on the same agent \u2014 output must be discriminative against these"},"agent_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"agent_description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"tweak_instruction":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Optional user instruction for how to tweak the generation (e.g., 'make it shorter')"}},"type":"object","required":["kb_name"],"description":"Request to AI-generate the LLM-facing description of a per-KB search tool.\n\nUsed by the split-KB-tools feature (AgentFlow."},"PresignedUrlResponse":{"properties":{"document_id":{"type":"string"},"filename":{"type":"string"},"upload_url":{"type":"string"},"storage_key":{"type":"string"},"upload_headers":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object","required":["document_id","filename","upload_url","storage_key"],"description":"Response with presigned upload URL."},"ModelsResponse":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/ProviderResponse"},"type":"array"},"rerank_models":{"items":{"$ref":"#/components/schemas/RerankModelInfo"},"type":"array","default":[]},"embedding_models":{"items":{"$ref":"#/components/schemas/EmbeddingModelInfo"},"type":"array","default":[]},"default":{"$ref":"#/components/schemas/DefaultModelInfo"},"defaults":{"$ref":"#/components/schemas/DefaultsInfo"}},"type":"object","required":["providers","default","defaults"],"description":"Response containing all available models."},"AgentCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"description":"Human-readable agent name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Brief description of the agent's purpose"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Assigned phone number in E.164 format (for voice agents)"},"greeting_text":{"type":"string","description":"Initial greeting message sent at conversation start"},"system_prompt":{"type":"string","description":"Main system prompt defining agent personality and behavior"},"security_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Security guidelines prompt for content filtering"},"security_enabled":{"type":"boolean","description":"Whether security evaluation is enabled for this agent","default":true},"security_confidence_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Minimum confidence to block a message (0.5-1.0)"},"security_block_message":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Message shown when input is blocked by security checks"},"security_check_input_enabled":{"type":"boolean","description":"Evaluate user messages for policy violations","default":true},"security_check_output_enabled":{"type":"boolean","description":"Evaluate agent responses for policy violations","default":false},"security_check_injection_enabled":{"type":"boolean","description":"Detect prompt injection attempts","default":true},"security_fail_policy":{"type":"string","description":"What happens when security evaluation fails: 'open' or 'closed'","default":"open"},"security_injection_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"Known phrases used in prompt injection attacks"},"security_passive_message":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Additional instruction appended to system prompt for passive security"},"security_tail_message":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Custom security reminder appended at end of system prompt (null = use default)"},"security_evaluation_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Custom prompt template for security evaluation LLM"},"security_llm_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"LLM provider for security evaluation"},"security_llm_model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"LLM model for security evaluation"},"security_inject_to_prompt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether to inject passive security instruction into system prompt (default True)"},"is_active":{"type":"boolean","description":"Whether the agent is active and can receive conversations","default":true},"is_live":{"type":"boolean","description":"Whether the agent is live in production (tracking flag only)","default":false},"llm_provider":{"type":"string"},"llm_model":{"type":"string","default":"gpt-5.5"},"llm_temperature":{"type":"number","default":0},"llm_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"tts_provider":{"type":"string","default":"elevenlabs"},"tts_voice_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"tts_voice_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"tts_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"tts_locale":{"type":"string"},"tts_tempo":{"anyOf":[{"type":"number"},{"type":"null"}]},"tts_variance":{"anyOf":[{"type":"number"},{"type":"null"}]},"tts_temperature":{"anyOf":[{"type":"number"},{"type":"null"}]},"tts_seed":{"anyOf":[{"type":"integer"},{"type":"null"}]},"tts_speaking_rate":{"type":"number","default":1.0},"voice_instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"tts_voice_gender":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"description":"Voice gender for Hebrew grammar (male/female)"},"stt_provider":{"type":"string","default":"aws"},"stt_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"stt_language":{"type":"string"},"soniox_vad_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"soniox_guard_window_ms":{"anyOf":[{"type":"integer","maximum":1500.0,"minimum":0.0},{"type":"null"}],"description":"Endpoint continuation guard window in milliseconds"},"vad_stop_secs":{"type":"number","default":0.2},"vad_confidence":{"type":"number","default":0.7},"enable_rag":{"type":"boolean","default":false},"knowledge_base_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"rag_retrieval_k":{"type":"integer","default":7},"rag_embeddings_model":{"type":"string","default":"text-embedding-3-large"},"enable_hybrid_search":{"type":"boolean","default":true},"enable_reranking":{"type":"boolean","default":false},"hybrid_search_alpha":{"type":"integer","maximum":100.0,"minimum":0.0,"description":"Hybrid search weight (0=keyword, 100=semantic)","default":50},"reranking_top_k":{"type":"integer","maximum":100.0,"minimum":5.0,"description":"Initial retrieval count before reranking","default":20},"reranking_final_k":{"type":"integer","maximum":50.0,"minimum":1.0,"description":"Final results after reranking","default":5},"reranking_max_doc_length":{"type":"integer","minimum":1.0,"description":"Max characters per document for LLM reranking prompt","default":500},"rag_include_conversation_context":{"type":"boolean","description":"Include conversation context in RAG query for better retrieval","default":true},"rag_context_turns":{"type":"integer","maximum":10.0,"minimum":0.0,"description":"Number of conversation turns (user + assistant pairs) to include in RAG queries","default":1},"rag_mode":{"type":"string","enum":["auto","tool","auto_tool","disabled"],"description":"RAG mode: auto (always retrieve), tool (agent decides), auto_tool (tool search every message), disabled","default":"auto"},"kb_search_trigger_message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Fast reply message shown while searching KB (tool mode only)"},"kb_fast_reply_mode":{"anyOf":[{"type":"string","enum":["auto","predefined","off"]},{"type":"null"}],"description":"KB search fast reply mode: auto (LLM generates), predefined (use trigger message), off (no fast reply)"},"add_ack":{"type":"boolean","default":true},"enable_smart_ack":{"type":"boolean","default":true},"ack_threshold_ms":{"type":"integer","maximum":5000.0,"minimum":100.0,"description":"Smart ack threshold in milliseconds","default":800},"ack_response_gap_ms":{"type":"integer","maximum":500.0,"minimum":0.0,"description":"Silence gap between ack and response audio in milliseconds","default":250},"enable_nikud_replacement":{"type":"boolean","default":true},"enable_transcripts":{"type":"boolean","default":true},"enable_recordings":{"type":"boolean","default":true},"notification_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"acknowledgments":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}]},"transfer_enabled":{"type":"boolean","default":false},"transfer_options":{"anyOf":[{},{"type":"null"}]},"allow_human_transfer":{"type":"boolean","default":false},"send_sms_enabled":{"type":"boolean","default":false},"sms_recipient_variable":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Variable name containing recipient phone number (e.g., 'system__caller_id')","default":"system__caller_id"},"sms_message_mode":{"type":"string","enum":["llm","scripted"],"description":"Message mode: 'llm' for AI-generated messages, 'scripted' for predefined template","default":"llm"},"sms_message_template":{"anyOf":[{"type":"string","maxLength":480},{"type":"null"}],"description":"SMS message template with {{variable}} placeholders (used in scripted mode)"},"sms_sender_name":{"anyOf":[{"type":"string","maxLength":11},{"type":"null"}],"description":"Per-agent alphanumeric SMS sender. null => inherit organization.default_sms_sender_name."},"sms_per_conversation_limit":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"description":"Max successful sms-queued events per conversation. null => no limit.","default":3},"show_confirmation_use_yes_no_labels":{"type":"boolean","default":false},"data_retention_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}]},"data_retention_mode":{"type":"string","enum":["delete","anonymize"],"default":"anonymize"},"mask_pii":{"type":"boolean","default":false},"pii_mask_config":{"anyOf":[{"$ref":"#/components/schemas/PIIMaskConfig"},{"type":"null"}]},"conversation_timeout_seconds":{"type":"integer","maximum":86400.0,"minimum":60.0,"description":"Conversation timeout in seconds (1 min to 24 hours, default 4 hours)","default":14400},"topic_classification_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"description":"Per-agent above-threshold cutoff for topic classification (0-1, default 0.6)","default":0.6},"topics_enabled":{"type":"boolean","description":"Explicit per-agent on/off toggle for topic classification (spec \u00a76.4).","default":true},"qa_tracker_enabled":{"type":"boolean","description":"Explicit per-agent on/off toggle for Q&A Tracker (spec \u00a77.5).","default":true},"qa_answered_confidence_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"description":"Confidence cutoff for the 'is_answered' judgement surfaced in the widget (0-1, default 0.6).","default":0.6},"qa_routing_similarity_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"description":"Cosine-similarity cutoff for streaming nearest-centroid routing (0-1, default 0.7).","default":0.7},"google_calendar_enabled":{"type":"boolean","default":false},"google_calendar_timeframe_days":{"type":"integer","default":10},"google_calendar_slot_duration":{"type":"integer","default":45},"show_preview_bubble":{"type":"boolean","default":true},"widget_icon_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"description":"Custom icon/image URL for chat widget button"},"bot_icon_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"description":"Custom icon/image URL for bot avatar in chat messages"},"widget_primary_color":{"type":"string","maxLength":7,"description":"Primary color for chat widget (hex color code)","default":"#0f172a"},"widget_header_text_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"description":"Header text color for chat widget (hex color code)","default":"#ffffff"},"widget_title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Custom widget header title (defaults to agent name if null)"},"widget_button_style":{"anyOf":[{"type":"string","enum":["circle","rounded-square","soft-square","pill"]},{"type":"null"}],"description":"Widget button shape/style","default":"circle"},"widget_button_scale":{"anyOf":[{"type":"integer","enum":[75,100,125,150,200]},{"type":"null"}],"description":"Launcher button size as percent of default","default":100},"widget_button_text":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"description":"Custom button text for pill style (defaults to 'Chat')"},"widget_button_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"description":"Option button background colour (hex)"},"widget_submit_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"description":"Submit button background colour (hex)"},"widget_bot_bubble_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"description":"Bot message bubble background colour (hex)"},"widget_suggestion_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"description":"Suggested question button background colour (hex)"},"widget_draggable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Allow users to drag and reposition the widget button","default":true},"widget_show_header":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Show/hide chat widget header","default":true},"widget_show_refresh_button":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Show/hide refresh button in chat header","default":true},"widget_show_end_conversation_rating":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Show/hide end conversation & rate button in chat widget","default":true},"widget_show_message_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Show/hide per-message thumbs up/down feedback in chat widget","default":false},"widget_show_avatar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Show/hide the bot avatar next to messages","default":true},"widget_show_branding":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"","default":true},"widget_fullscreen_mode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Open chat in fullscreen mode without card layout","default":false},"show_tool_activity":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Show tool usage indicators (e.g. 'Used X tool') to end users in the chat widget","default":false},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"List of domains allowed to embed this widget (null = allow all domains). Use *.example.com to allow a domain and all its subdomains"},"access_mode":{"type":"string","enum":["public","magic_link_only"],"description":"Access mode: 'public' (normal) or 'magic_link_only' (requires valid magic link token)","default":"public"},"magic_link_required_message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Custom message shown when accessing without a magic link"},"magic_link_expired_message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Custom message shown when magic link is expired or invalid"},"legal_disclaimer":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"description":"Legal disclaimer text shown in chat widget (supports HTML for links)"},"disclaimer_display_mode":{"type":"string","enum":["full","expandable"],"description":"How the legal disclaimer is displayed: 'full' shows all text, 'expandable' truncates with a 'more' link","default":"expandable"},"agent_mode":{"type":"string","enum":["simple","builder"],"default":"simple"},"channel":{"anyOf":[{"type":"string","enum":["voice","chat"]},{"type":"null"}]},"agent_language":{"type":"string","default":"en-US"},"timezone":{"type":"string","maxLength":50,"description":"IANA timezone for system date/time variables (e.g., 'America/New_York', 'Asia/Jerusalem')","default":"UTC"},"flow_definition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"capabilities":{"items":{"type":"string","enum":["text","voice"]},"type":"array","description":"Modalities this agent supports: text (chat/sms/email), voice (phone)","default":["text"]},"enabled_channels":{"items":{"type":"string","enum":["chat","voice","email","whatsapp","api","sms"]},"type":"array","description":"Specific source channels enabled for this agent","default":["chat"]},"custom_css":{"anyOf":[{"type":"string","maxLength":50000},{"type":"null"}],"description":"Custom CSS for widget (Enterprise feature, max 50KB)"},"session_data_config":{"anyOf":[{"$ref":"#/components/schemas/SessionDataConfig"},{"type":"null"}],"description":"Configuration for extracting session data as flow variables"},"custom_schema_config":{"anyOf":[{"$ref":"#/components/schemas/CustomSchemaConfig"},{"type":"null"}],"description":"Configuration for custom API request/response schema transformation"},"async_callback_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Async callback configuration for external API"},"impression_tracking_enabled":{"type":"boolean","description":"Enable/disable widget impression tracking","default":true},"visitor_cookie_ttl_hours":{"type":"integer","maximum":8760.0,"minimum":1.0,"description":"Visitor cookie TTL in hours (default 24h, max 1 year)","default":24},"widget_enabled":{"type":"boolean","description":"Master toggle - widget won't render when False","default":true},"widget_exposure_percentage":{"type":"integer","maximum":100.0,"minimum":0.0,"description":"Percentage of visitors who see the widget (0-100, for A/B testing)","default":100}},"type":"object","required":["name","greeting_text","system_prompt","tts_locale","stt_language"],"description":"Schema for creating a new AI agent.\n\nCreates an agent with the specified configuration."},"PromptFixSuggestion":{"properties":{"title":{"type":"string"},"rationale":{"type":"string"},"type":{"type":"string","const":"update_prompt","default":"update_prompt"},"agent_id":{"type":"string"},"node_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"node_label":{"anyOf":[{"type":"string"},{"type":"null"}]},"current_value":{"anyOf":[{"type":"string"},{"type":"null"}]},"proposed_value":{"type":"string"}},"type":"object","required":["title","rationale","agent_id","proposed_value"],"description":"A prompt gap caused the failure \u2014 fix global or node prompt."},"FixVerifyResponse":{"properties":{"resolved":{"type":"boolean"},"reasoning":{"type":"string"},"new_answer":{"anyOf":[{"type":"string"},{"type":"null"}]},"verified_conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object","required":["resolved","reasoning"],"description":"Result of replaying the flagged question against the draft agent."},"NodeDeleteResponse":{"properties":{"agent_id":{"type":"string"},"node_id":{"type":"string"},"flow_version":{"type":"integer"},"exits_removed":{"type":"integer"},"variables_removed":{"type":"integer"}},"type":"object","required":["agent_id","node_id","flow_version","exits_removed","variables_removed"],"description":"Response after deleting a node from the flow."},"PositionBatchResponse":{"properties":{"agent_id":{"type":"string"},"nodes_updated":{"type":"integer"},"updated_at":{"type":"string"}},"type":"object","required":["agent_id","nodes_updated","updated_at"],"description":"Response after batch-updating node positions."},"MCPTestConnectionResponse":{"properties":{"success":{"type":"boolean"},"tools":{"items":{"$ref":"#/components/schemas/MCPDiscoveredToolInfo"},"type":"array"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"response_time_ms":{"type":"integer","default":0},"server_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Server name from MCP initialize.serverInfo"},"server_version":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Server version from MCP initialize.serverInfo"}},"type":"object","required":["success"],"description":"Response schema for MCP test connection."},"DashboardSummaryResponse":{"properties":{"days":{"type":"integer"},"date_range_start":{"type":"string","format":"date-time"},"date_range_end":{"type":"string","format":"date-time"},"totals":{"$ref":"#/components/schemas/DashboardTotals"},"per_agent":{"items":{"$ref":"#/components/schemas/DashboardPerAgent"},"type":"array"}},"type":"object","required":["days","date_range_start","date_range_end","totals","per_agent"],"description":"Response envelope for ``GET /api/v1/conversations/dashboard-summary``."},"TranscriptExportRequest":{"properties":{"conversation_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"format":{"type":"string","default":"json"},"include_tools":{"type":"boolean","default":true},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"agent_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentiment":{"anyOf":[{"type":"string"},{"type":"null"}]},"conversation_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"tz":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object","description":"Request schema for bulk transcript export."},"SemanticSearchResponse":{"properties":{"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"total":{"type":"integer"}},"type":"object","required":["results","total"],"description":"Response model for semantic search."},"KBSearchResponse":{"properties":{"query":{"type":"string"},"results":{"items":{"$ref":"#/components/schemas/KBSearchResultChunk"},"type":"array"},"total_results":{"type":"integer"}},"type":"object","required":["query","results","total_results"],"description":"Schema for knowledge base search response."},"DashboardTotals":{"properties":{"total_conversations":{"type":"integer","minimum":0.0},"average_duration_seconds":{"type":"number","minimum":0.0,"description":"Weighted by per-agent conversation count"},"transfers":{"$ref":"#/components/schemas/app__schemas__dashboard_summary__TransferMetrics"}},"type":"object","required":["total_conversations","average_duration_seconds","transfers"],"description":"Org-wide totals across all agents in the requested window."},"EmbeddingModelInfo":{"properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dimension":{"type":"integer"},"litellm_name":{"type":"string"},"is_new":{"type":"boolean","default":false},"eol_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"eol_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"eol_replacement":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider_id":{"type":"string"},"provider_label":{"type":"string"},"provider_icon":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object","required":["id","label","dimension","litellm_name","provider_id","provider_label"],"description":"An embedding model from the admin registry (model_type='embedding')."},"AgentUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"greeting_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"security_prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"security_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"security_confidence_threshold":{"anyOf":[{"type":"number"},{"type":"null"}]},"security_block_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"security_check_input_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"security_check_output_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"security_check_injection_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"security_fail_policy":{"anyOf":[{"type":"string"},{"type":"null"}]},"security_injection_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"security_passive_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"security_tail_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"security_evaluation_prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"security_llm_provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"security_llm_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"security_inject_to_prompt":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"llm_provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"llm_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"llm_temperature":{"anyOf":[{"type":"number"},{"type":"null"}]},"llm_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"tts_provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"tts_voice_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"tts_voice_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"tts_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"tts_locale":{"anyOf":[{"type":"string"},{"type":"null"}]},"tts_tempo":{"anyOf":[{"type":"number"},{"type":"null"}]},"tts_variance":{"anyOf":[{"type":"number"},{"type":"null"}]},"tts_temperature":{"anyOf":[{"type":"number"},{"type":"null"}]},"tts_seed":{"anyOf":[{"type":"integer"},{"type":"null"}]},"tts_speaking_rate":{"anyOf":[{"type":"number"},{"type":"null"}]},"voice_instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"tts_voice_gender":{"anyOf":[{"type":"string"},{"type":"null"}]},"stt_provider":{"anyOf":[{"type":"string"},{"type":"null"}]},"stt_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"stt_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"soniox_vad_timeout_ms":{"anyOf":[{"type":"integer"},{"type":"null"}]},"soniox_guard_window_ms":{"anyOf":[{"type":"integer","maximum":1500.0,"minimum":0.0},{"type":"null"}],"description":"Endpoint continuation guard window in milliseconds"},"vad_stop_secs":{"anyOf":[{"type":"number"},{"type":"null"}]},"vad_confidence":{"anyOf":[{"type":"number"},{"type":"null"}]},"enable_rag":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"knowledge_base_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"rag_retrieval_k":{"anyOf":[{"type":"integer"},{"type":"null"}]},"rag_embeddings_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"enable_hybrid_search":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"enable_reranking":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"hybrid_search_alpha":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}]},"reranking_top_k":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":5.0},{"type":"null"}]},"reranking_final_k":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}]},"reranking_max_doc_length":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"description":"Max characters per document for LLM reranking prompt"},"rag_include_conversation_context":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"rag_context_turns":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":0.0},{"type":"null"}],"description":"Number of conversation turns (user + assistant pairs) to include in RAG queries"},"rag_mode":{"anyOf":[{"type":"string","enum":["auto","tool","auto_tool","disabled"]},{"type":"null"}]},"kb_search_trigger_message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Fast reply message shown while searching KB (tool mode only)"},"kb_fast_reply_mode":{"anyOf":[{"type":"string","enum":["auto","predefined","off"]},{"type":"null"}]},"add_ack":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"enable_smart_ack":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"ack_threshold_ms":{"anyOf":[{"type":"integer","maximum":5000.0,"minimum":100.0},{"type":"null"}],"description":"Smart ack threshold in milliseconds"},"ack_response_gap_ms":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":0.0},{"type":"null"}],"description":"Silence gap between ack and response audio in milliseconds"},"enable_nikud_replacement":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"enable_transcripts":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"enable_recordings":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"notification_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"acknowledgments":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}]},"transfer_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"transfer_options":{"anyOf":[{},{"type":"null"}]},"allow_human_transfer":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"send_sms_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"sms_recipient_variable":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Variable name containing recipient phone number (e.g., 'system__caller_id')"},"sms_message_mode":{"anyOf":[{"type":"string","enum":["llm","scripted"]},{"type":"null"}],"description":"Message mode: 'llm' for AI-generated messages, 'scripted' for predefined template"},"sms_message_template":{"anyOf":[{"type":"string","maxLength":480},{"type":"null"}],"description":"SMS message template with {{variable}} placeholders (used in scripted mode)"},"sms_sender_name":{"anyOf":[{"type":"string","maxLength":11},{"type":"null"}],"description":"Per-agent alphanumeric SMS sender. null => inherit organization.default_sms_sender_name."},"sms_per_conversation_limit":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"description":"Max successful sms-queued events per conversation. null => no limit (no change vs current value)."},"show_confirmation_use_yes_no_labels":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"data_retention_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}]},"data_retention_mode":{"anyOf":[{"type":"string","enum":["delete","anonymize"]},{"type":"null"}]},"mask_pii":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"pii_mask_config":{"anyOf":[{"$ref":"#/components/schemas/PIIMaskConfig"},{"type":"null"}]},"conversation_timeout_seconds":{"anyOf":[{"type":"integer","maximum":86400.0,"minimum":60.0},{"type":"null"}],"description":"Conversation timeout in seconds (1 min to 24 hours)"},"topic_classification_threshold":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"description":"Per-agent above-threshold cutoff for topic classification (0-1)"},"topics_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Explicit per-agent on/off toggle for topic classification (spec \u00a76.4)."},"qa_tracker_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Explicit per-agent on/off toggle for Q&A Tracker (spec \u00a77.5)."},"qa_answered_confidence_threshold":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"description":"Confidence cutoff for the 'is_answered' judgement surfaced in the widget (0-1)."},"qa_routing_similarity_threshold":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"description":"Cosine-similarity cutoff for streaming nearest-centroid routing (0-1)."},"google_calendar_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"google_calendar_timeframe_days":{"anyOf":[{"type":"integer"},{"type":"null"}]},"google_calendar_slot_duration":{"anyOf":[{"type":"integer"},{"type":"null"}]},"show_preview_bubble":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"widget_icon_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"description":"Custom icon/image URL for chat widget button"},"bot_icon_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"description":"Custom icon/image URL for bot avatar in chat messages"},"widget_primary_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"description":"Primary color for chat widget (hex color code)"},"widget_header_text_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"description":"Header text color for chat widget (hex color code)"},"widget_title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Custom widget header title (defaults to agent name if null)"},"widget_button_style":{"anyOf":[{"type":"string","enum":["circle","rounded-square","soft-square","pill"]},{"type":"null"}],"description":"Widget button shape/style"},"widget_button_scale":{"anyOf":[{"type":"integer","enum":[75,100,125,150,200]},{"type":"null"}],"description":"Launcher button size as percent of default"},"widget_button_text":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"description":"Custom button text for pill style (defaults to 'Chat')"},"widget_button_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"description":"Option button background colour (hex)"},"widget_submit_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"description":"Submit button background colour (hex)"},"widget_bot_bubble_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"description":"Bot message bubble background colour (hex)"},"widget_suggestion_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"description":"Suggested question button background colour (hex)"},"widget_draggable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Allow users to drag and reposition the widget button"},"widget_show_header":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Show/hide chat widget header"},"widget_show_refresh_button":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Show/hide refresh button in chat header"},"widget_show_end_conversation_rating":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Show/hide end conversation & rate button in chat widget"},"widget_show_message_feedback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Show/hide per-message thumbs up/down feedback in chat widget"},"widget_show_avatar":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Show/hide the bot avatar next to messages"},"widget_show_branding":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":""},"widget_fullscreen_mode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Open chat in fullscreen mode without card layout"},"show_tool_activity":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Show tool usage indicators (e.g. 'Used X tool') to end users in the chat widget"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"List of domains allowed to embed this widget (null = allow all domains). Use *.example.com to allow a domain and all its subdomains"},"access_mode":{"anyOf":[{"type":"string","enum":["public","magic_link_only"]},{"type":"null"}],"description":"Access mode: 'public' (normal) or 'magic_link_only' (requires valid magic link token)"},"magic_link_required_message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Custom message shown when accessing without a magic link"},"magic_link_expired_message":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Custom message shown when magic link is expired or invalid"},"illustration_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"description":"Website URL used for live illustration/mockup"},"illustration_generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the illustration was last generated"},"legal_disclaimer":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"description":"Legal disclaimer text shown in chat widget (supports HTML for links)"},"disclaimer_display_mode":{"anyOf":[{"type":"string","enum":["full","expandable"]},{"type":"null"}],"description":"How the legal disclaimer is displayed: 'full' shows all text, 'expandable' truncates with a 'more' link"},"agent_mode":{"anyOf":[{"type":"string","enum":["simple","builder"]},{"type":"null"}]},"channel":{"anyOf":[{"type":"string","enum":["voice","chat"]},{"type":"null"}]},"agent_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"IANA timezone for system date/time variables (e.g., 'America/New_York', 'Asia/Jerusalem')"},"flow_definition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"capabilities":{"anyOf":[{"items":{"type":"string","enum":["text","voice"]},"type":"array"},{"type":"null"}],"description":"Modalities this agent supports: text (chat/sms/email), voice (phone)"},"enabled_channels":{"anyOf":[{"items":{"type":"string","enum":["chat","voice","email","whatsapp","api","sms"]},"type":"array"},{"type":"null"}],"description":"Specific source channels enabled for this agent"},"custom_css":{"anyOf":[{"type":"string","maxLength":50000},{"type":"null"}],"description":"Custom CSS for widget (Enterprise feature, max 50KB)"},"session_data_config":{"anyOf":[{"$ref":"#/components/schemas/SessionDataConfig"},{"type":"null"}],"description":"Configuration for extracting session data as flow variables"},"custom_schema_config":{"anyOf":[{"$ref":"#/components/schemas/CustomSchemaConfig"},{"type":"null"}],"description":"Configuration for custom API request/response schema transformation"},"async_callback_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Async callback configuration for external API"},"impression_tracking_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Enable/disable widget impression tracking"},"visitor_cookie_ttl_hours":{"anyOf":[{"type":"integer","maximum":8760.0,"minimum":1.0},{"type":"null"}],"description":"Visitor cookie TTL in hours"},"widget_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Master toggle - widget won't render when False"},"widget_exposure_percentage":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"description":"Percentage of visitors who see the widget (0-100)"}},"type":"object","description":"Schema for updating an agent."},"ComparisonPeriod":{"properties":{"start_date":{"type":"string","description":"Previous window start (ISO)"},"end_date":{"type":"string","description":"Previous window end (ISO) \u2014 equals the current window's start"}},"type":"object","required":["start_date","end_date"],"description":""},"UpdateChunkingResponse":{"properties":{"message":{"type":"string"},"kb_id":{"type":"string"},"new_chunk_size":{"type":"integer"},"new_chunk_overlap":{"type":"integer"},"new_chunking_strategy":{"type":"string"},"documents_to_rechunk":{"type":"integer"},"rechunking_status":{"type":"string"}},"type":"object","required":["message","kb_id","new_chunk_size","new_chunk_overlap","new_chunking_strategy","documents_to_rechunk","rechunking_status"],"description":"Response schema for chunking settings update operation."},"KBSearchRequest":{"properties":{"query":{"type":"string","minLength":1,"description":"Search query"},"top_k":{"type":"integer","maximum":20.0,"minimum":1.0,"description":"Number of results to return","default":5},"threshold":{"type":"number","maximum":1.0,"minimum":0.0,"description":"Minimum similarity threshold (0-1)","default":0.5},"use_hybrid":{"type":"boolean","description":"Use hybrid search (vector + keyword)","default":true}},"type":"object","required":["query"],"description":"Schema for knowledge base search request."},"ChunkResponse":{"properties":{"id":{"type":"string"},"document_id":{"type":"string"},"document_filename":{"anyOf":[{"type":"string"},{"type":"null"}]},"chunk_index":{"type":"integer"},"chunk_text":{"type":"string"},"enriched_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"enrichment_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"enriched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"chunk_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"chunk_type":{"type":"string"}},"type":"object","required":["id","document_id","chunk_index","chunk_text","chunk_type"],"description":"Response schema for a single KB chunk."},"EnhancePromptWithContextResponse":{"properties":{"enhanced_prompt":{"type":"string","description":"The enhanced prompt text"}},"type":"object","required":["enhanced_prompt"],"description":"Response with enhanced prompt."},"PIIDecryptResponse":{"properties":{"original_value":{"type":"string"},"entity_type":{"type":"string"}},"type":"object","required":["original_value","entity_type"],"description":"Response with decrypted PII value."},"ToolTestChainStepResult":{"properties":{"index":{"type":"integer"},"name":{"type":"string"},"success":{"type":"boolean"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}]},"status_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"response_time_ms":{"type":"integer","default":0},"body":{"anyOf":[{},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"recovered":{"type":"boolean","default":false},"extracted_variables":{"additionalProperties":true,"type":"object","default":{}}},"type":"object","required":["index","name","success"],"description":"Result of a single step within a chain test."},"ProviderResponse":{"properties":{"id":{"type":"string"},"label":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"models":{"items":{"$ref":"#/components/schemas/ModelResponse"},"type":"array"}},"type":"object","required":["id","label","models"],"description":"Provider info returned to frontend."},"ToolTestResponse":{"properties":{"success":{"type":"boolean"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}]},"status_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"headers":{"additionalProperties":{"type":"string"},"type":"object","default":{}},"body":{"anyOf":[{},{"type":"null"}]},"body_raw":{"anyOf":[{"type":"string"},{"type":"null"}]},"response_time_ms":{"type":"integer"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"extracted_variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"extraction_results":{"anyOf":[{"items":{"$ref":"#/components/schemas/ExtractionResult"},"type":"array"},{"type":"null"}]}},"type":"object","required":["success","response_time_ms"],"description":"Response schema for tool test results"},"Body_upload_certificate_api_v1_tools_certificates_upload_post":{"properties":{"certificate_format":{"type":"string","description":"Format: 'pem' or 'pfx'"},"certificate_file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"description":"PEM certificate file (.pem, .crt)"},"private_key_file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"description":"PEM private key file (.pem, .key)"},"private_key_password":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Password for encrypted PEM private key"},"pfx_file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"description":"PFX/P12 file (.pfx, .p12)"},"pfx_password":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Password for PFX file"}},"type":"object","required":["certificate_format"]},"DocumentTagsResponse":{"properties":{"document_id":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"chunks_total":{"type":"integer"},"chunks_updated":{"type":"integer"}},"type":"object","required":["document_id","tags","chunks_total","chunks_updated"],"description":"Result of a document-level tag edit."},"ConversationRestoreResponse":{"properties":{"success":{"type":"boolean"},"message":{"type":"string"},"restored_to_sequence":{"type":"integer"},"remaining_interactions":{"type":"integer"},"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"type":"object","required":["success","message","restored_to_sequence","remaining_interactions","messages"],"description":"Schema for conversation restore response."},"ConversationsListQueryBody":{"properties":{"widget_conditions":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Custom Widget drill-down payload (a WidgetDrillPayload JSON)."}},"type":"object","description":""},"AgentGraphPatchRequest":{"properties":{"nodes":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"description":"List of nodes to add or update in the flow. Each node must have an 'id' and 'type' field."},"exits":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"description":"List of exits (edges) to add to the flow. Each exit must have 'source_node_id' and 'target_node_id'."},"fields":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"description":"List of field/variable definitions to add or update. Each field must have a 'name' and 'type'."},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"description":"List of custom API tools to add or update. Each tool must have 'name', 'function_definition', and 'execution_config'."}},"type":"object","description":"Request schema for incremental updates to agent flow graphs."},"TriggerEnrichmentRequest":{"properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"LLM model for enrichment (default: gpt-5-chat)"},"max_budget_usd":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.1},{"type":"null"}],"description":"Maximum budget in USD for the enrichment run","default":5.0},"force":{"type":"boolean","description":"Force re-enrichment even if already completed","default":false},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Language for enrichment output (e.g., 'he', 'en', 'es'). If not set, auto-detected from documents."},"enrich_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Enrichment mode: 'all' to enrich every chunk, 'new_only' to enrich only un-enriched chunks","default":"all"}},"type":"object","description":"Request to trigger agentic indexing enrichment for a KB."},"TesterNoteCreateRequest":{"properties":{"selected_text":{"type":"string","maxLength":2000,"minLength":1},"comment":{"type":"string","maxLength":2000,"minLength":1},"message_index":{"anyOf":[{"type":"integer"},{"type":"null"}]},"role":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","default":"voice_browser_test"}},"type":"object","required":["selected_text","comment"],"description":"Schema for creating a tester note on an existing conversation.\n\nUsed by the \"mark text + comment\" flow in the agent builder voice test panel."},"KBSearchResultChunk":{"properties":{"content":{"type":"string"},"score":{"type":"number"},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"document_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]}},"type":"object","required":["content","score"],"description":"Schema for a single search result chunk."},"VersionLifecycleResponse":{"properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"version":{"type":"integer"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"created_by_user_id":{"type":"string"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_display":{"anyOf":[{"type":"string"},{"type":"null"}]},"major_version":{"anyOf":[{"type":"integer"},{"type":"null"}]},"minor_version":{"anyOf":[{"type":"integer"},{"type":"null"}]},"patch_version":{"anyOf":[{"type":"integer"},{"type":"null"}]},"status":{"type":"string","enum":["draft","pending_approval","published","archived"]},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"approval_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"approved_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"approved_by_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"approval_comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_live":{"type":"boolean","description":"Whether this is the currently published version","default":false},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source of version creation: manual, assistant, autosave"}},"type":"object","required":["id","agent_id","version","name","description","created_at","created_by_user_id","status"],"description":"Extended version response with lifecycle information."},"RawDocumentUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"description":"Document title"},"content":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Document content in markdown"}},"type":"object","description":"Schema for updating a raw document."},"DocumentUploadResponse":{"properties":{"upload_url":{"type":"string","description":"Presigned URL for PUT upload"},"upload_headers":{"additionalProperties":{"type":"string"},"type":"object","description":"Headers the client MUST send on the PUT request. Backend-specific \u2014 e.g."},"s3_key":{"type":"string","description":"S3 key where the file will be stored"},"expires_in":{"type":"integer","description":"Seconds until the presigned URL expires","default":3600}},"type":"object","required":["upload_url","s3_key"],"description":"Response containing presigned URL for document upload."},"FlatBubbleResponse":{"properties":{"id":{"type":"string"},"role":{"type":"string"},"text":{"type":"string"},"message_ids":{"items":{"type":"string"},"type":"array"}},"type":"object","required":["id","role","text","message_ids"],"description":""},"VersionApproveRequest":{"properties":{"comment":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Approval comment"}},"type":"object","description":"Approve a pending version."},"SemanticSearchRequest":{"properties":{"query":{"type":"string"},"limit":{"type":"integer","default":30},"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]}},"type":"object","required":["query"],"description":"Request model for semantic search."},"AgentGraphResponse":{"properties":{"agent_id":{"type":"string","description":"ID of the agent"},"start_node_id":{"type":"string","description":"ID of the entry point node"},"nodes":{"additionalProperties":true,"type":"object","description":"Map of node ID to node definition. Each node has 'id', 'type', 'name', 'data', and optionally 'position'."},"exits":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"List of exits (edges) defining transitions between nodes. Each exit has 'source_node_id', 'target_node_id', and 'condition'."},"fields":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"List of field/variable definitions. Each field has 'name', 'type', and optional 'description', 'required', etc."},"tools":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"List of custom API tools. Each tool has 'id', 'name', 'function_definition', 'execution_config', etc."},"total_nodes":{"type":"integer","description":"Total number of nodes in the flow"},"total_exits":{"type":"integer","description":"Total number of exits in the flow"},"total_fields":{"type":"integer","description":"Total number of fields/variables in the flow"},"total_tools":{"type":"integer","description":"Total number of custom API tools","default":0}},"type":"object","required":["agent_id","start_node_id","nodes","exits","fields","total_nodes","total_exits","total_fields"],"description":"Response schema for retrieving an agent's flow graph."},"ValidateUIToolResponse":{"properties":{"valid":{"type":"boolean"},"errors":{"items":{"type":"string"},"type":"array","default":[]},"spec":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]}},"type":"object","required":["valid"]},"CrawlMapImportRequest":{"properties":{"version":{"type":"integer"},"entries":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"sources":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"type":"object","required":["version"],"description":""},"BuildFlowRequest":{"properties":{"description":{"type":"string","minLength":10,"description":"Free-form description of the conversation flow the user wants to build"}},"type":"object","required":["description"],"description":"Schema for building a flow from a natural language description."},"IdleHangupRequest":{"properties":{"farewell_text":{"type":"string","maxLength":500,"minLength":1,"description":"Final farewell line spoken before hangup."},"idle_seconds":{"type":"integer","maximum":600.0,"minimum":1.0},"attempts":{"type":"integer","maximum":10.0,"minimum":1.0,"description":"Number of reprompts attempted before giving up."}},"type":"object","required":["farewell_text","idle_seconds","attempts"],"description":"Voice-side signal that the call is ending due to user-idle timeout."},"KnowledgeBaseCreateRequest":{"properties":{"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"chunk_size":{"type":"integer","maximum":8000.0,"minimum":100.0,"description":"Characters per chunk (100-8000)","default":1500},"chunk_overlap":{"type":"integer","maximum":2000.0,"minimum":0.0,"description":"Overlap between chunks (0-2000, ~15% recommended)","default":225},"chunking_strategy":{"$ref":"#/components/schemas/ChunkingStrategy","description":"","default":"markdown_headings"},"embedding_model":{"type":"string","description":"Embedding model in LiteLLM format. Default: 'azure/text-embedding-3-large' (Azure, 3072d).","default":"azure/text-embedding-3-large"},"synonym_map":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"description":"Synonym mapping for query expansion. Format: {'abbreviation': ['full_term1', 'full_term2']}"}},"type":"object","required":["name"],"description":"Schema for creating a knowledge base."},"CrawlMapImportResponse":{"properties":{"inserted":{"type":"integer"},"updated":{"type":"integer"},"sources_created":{"type":"integer","default":0}},"type":"object","required":["inserted","updated"],"description":"Result of a crawl-map import \u2014 rows inserted vs updated, websites recreated."},"ChunkUpdateRequest":{"properties":{"chunk_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"enriched_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"enrichment_tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]}},"type":"object","description":"Request to update a single KB chunk's text or enrichment."},"ActiveExecutionStatus":{"properties":{"execution_id":{"type":"string"},"execution_type":{"type":"string"},"kb_id":{"type":"string"},"status":{"type":"string"},"urls_crawled":{"anyOf":[{"type":"integer"},{"type":"null"}]},"urls_succeeded":{"anyOf":[{"type":"integer"},{"type":"null"}]},"urls_failed":{"anyOf":[{"type":"integer"},{"type":"null"}]},"documents_total":{"anyOf":[{"type":"integer"},{"type":"null"}]},"documents_processed":{"anyOf":[{"type":"integer"},{"type":"null"}]},"documents_indexed":{"anyOf":[{"type":"integer"},{"type":"null"}]},"documents_failed":{"anyOf":[{"type":"integer"},{"type":"null"}]},"documents_uploaded":{"anyOf":[{"type":"integer"},{"type":"null"}]},"indexing_phase":{"anyOf":[{"type":"string"},{"type":"null"}]},"chunks_total":{"anyOf":[{"type":"integer"},{"type":"null"}]},"chunks_processed":{"anyOf":[{"type":"integer"},{"type":"null"}]},"images_extracted":{"anyOf":[{"type":"integer"},{"type":"null"}]},"images_total":{"anyOf":[{"type":"integer"},{"type":"null"}]},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"type":"object","required":["execution_id","execution_type","kb_id","status","created_at"],"description":"Schema for active execution status (crawl, upload, or connector sync).\n\nAll three flow through the same UI status pill."},"DocumentFixSuggestion":{"properties":{"title":{"type":"string"},"rationale":{"type":"string"},"type":{"type":"string","const":"restructure_document","default":"restructure_document"},"kb_id":{"type":"string"},"document_id":{"type":"string"},"document_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"applyable":{"type":"boolean","default":false},"current_value":{"anyOf":[{"type":"string"},{"type":"null"}]},"proposed_value":{"type":"string"}},"type":"object","required":["title","rationale","kb_id","document_id","proposed_value"],"description":""},"ChangeEmbeddingModelRequest":{"properties":{"embedding_model":{"type":"string","description":"New embedding model in LiteLLM format. Examples: 'gemini/gemini-embedding-001' (Google, 768d), 'openai/text-embedding-3-large' (OpenAI, 3072d), 'azure/text-embe\u2026"}},"type":"object","required":["embedding_model"],"description":"Request schema for changing the embedding model of a KB."},"ActiveDiscoveryResponse":{"properties":{"job_id":{"type":"string"},"status":{"type":"string"},"source_root_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object","required":["job_id","status"],"description":"The in-flight discovery run for a KB, returned by ``GET /{kb_id}/crawl/active``."},"DashboardPerAgent":{"properties":{"agent_id":{"type":"string"},"total_conversations":{"type":"integer","minimum":0.0},"average_duration_seconds":{"type":"number","minimum":0.0},"transfers":{"$ref":"#/components/schemas/app__schemas__dashboard_summary__TransferMetrics"}},"type":"object","required":["agent_id","total_conversations","average_duration_seconds","transfers"],"description":"Per-agent aggregates inside the dashboard summary."},"VersionRejectRequest":{"properties":{"comment":{"type":"string","maxLength":1000,"minLength":1,"description":"Rejection reason (required)"}},"type":"object","required":["comment"],"description":"Reject a pending version."},"GenerateKBToolDescriptionResponse":{"properties":{"description":{"type":"string","description":"The generated LLM-facing tool description"}},"type":"object","required":["description"],"description":"Response with the generated tool description."},"FlattenedTranscriptResponse":{"properties":{"bubbles":{"items":{"$ref":"#/components/schemas/FlatBubbleResponse"},"type":"array"},"flattening_version":{"type":"integer"}},"type":"object","required":["bubbles","flattening_version"],"description":""},"PresignedUrlRequest":{"properties":{"filename":{"type":"string"},"content_type":{"type":"string"},"file_size_bytes":{"type":"integer","exclusiveMinimum":0.0,"description":"File size must be positive"}},"type":"object","required":["filename","content_type","file_size_bytes"],"description":"Request for presigned upload URLs."},"DefaultModelInfo":{"properties":{"model_id":{"type":"string"},"provider_id":{"type":"string"}},"type":"object","required":["model_id","provider_id"],"description":"Information about a default model."},"ConversationFilterOptionsResponse":{"properties":{"flow_variables":{"items":{"$ref":"#/components/schemas/VariableOption"},"type":"array"},"custom_fields":{"items":{"$ref":"#/components/schemas/VariableOption"},"type":"array"},"extracted_fields":{"items":{"$ref":"#/components/schemas/VariableOption"},"type":"array","default":[]},"live_fields":{"items":{"$ref":"#/components/schemas/VariableOption"},"type":"array","default":[]},"all_variables":{"items":{"$ref":"#/components/schemas/UnifiedVariableOption"},"type":"array","default":[]},"from_numbers":{"items":{"type":"string"},"type":"array","default":[]},"to_numbers":{"items":{"type":"string"},"type":"array","default":[]}},"type":"object","required":["flow_variables","custom_fields"],"description":"Response schema for conversation filter options endpoint."},"MarkLiveRequest":{"properties":{"acknowledge_untested":{"type":"boolean","default":false}},"type":"object","description":""},"GeneratePhonemeRequest":{"properties":{"word":{"type":"string","maxLength":255,"minLength":1,"description":"The word or phrase the pronunciation rule targets"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Plain-language meaning, used to pick between homographs"},"locale":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"Agent's TTS locale (e.g. 'he-IL') \u2014 the language spoken"},"alphabet":{"type":"string","enum":["ipa","cmu"],"description":"Target notation. Cartesia supports IPA only","default":"ipa"},"provider":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"description":"Agent's TTS provider. Cartesia consumes a pipe-separated, stress-free IPA that other providers reject, so the output format depends on this as well as the alpha\u2026"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional, for Langfuse attribution only \u2014 nothing is read or written"}},"type":"object","required":["word"],"description":""},"AgentToolResponse":{"properties":{"id":{"type":"string","format":"uuid"},"agent_id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string"},"function_definition":{"additionalProperties":true,"type":"object"},"execution_config":{"additionalProperties":true,"type":"object"},"instance_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"enabled":{"type":"boolean"},"order_index":{"type":"integer"},"custom_instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"trigger_messages":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"disable_interruptions":{"type":"boolean","default":false},"expects_response":{"type":"boolean","default":true},"execution_mode":{"type":"string","default":"sync"},"response_timeout_secs":{"type":"integer","default":30},"mock_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"assignments":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}]},"is_system_tool":{"type":"boolean","default":false},"system_tool_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"llm_direct_params":{"type":"boolean","default":false}},"type":"object","required":["id","agent_id","name","description","category","type","function_definition","execution_config","instance_config","enabled","order_index","custom_instructions"]},"AgentToolCreate":{"properties":{"name":{"type":"string","description":"Tool name (used in function calls)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable description of what the tool does"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Category for organizing tools (e.g., 'crm', 'inventory')"},"type":{"type":"string","description":"Tool type: 'http_api' for REST API tools, 'mcp_server' for MCP server connections","default":"http_api"},"function_definition":{"additionalProperties":true,"type":"object","description":"OpenAI function definition schema with name, description, and parameters"},"execution_config":{"additionalProperties":true,"type":"object","description":"HTTP request configuration: url, method, headers, body_template"},"instance_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Instance-specific configuration overrides"},"custom_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Additional instructions for the LLM when using this tool"},"trigger_messages":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Fast reply messages: {on_trigger: 'Looking up...', on_success: 'Found it!', on_fail: 'Sorry, not found', on_delay: [{delay_ms, text}, ...]}"},"disable_interruptions":{"type":"boolean","description":"Prevent user interruptions while tool executes","default":false},"expects_response":{"type":"boolean","description":"Whether the tool returns a response for the agent to use","default":true},"execution_mode":{"type":"string","enum":["sync","async","pre_speech"],"description":"Execution mode: sync (wait), async (fire-and-forget), pre_speech (before TTS)","default":"sync"},"response_timeout_secs":{"type":"integer","maximum":300.0,"minimum":1.0,"description":"Timeout for HTTP request in seconds","default":30},"mock_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Mock configuration for testing: {enabled: true, response: {...}}"},"assignments":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"description":"Map response fields to variables: [{response_path: 'data.status', variable_name: 'order_status'}]"},"is_system_tool":{"type":"boolean","description":"Reserved for system tools (end_call, transfer_to_human)","default":false},"system_tool_type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System tool type identifier"},"llm_direct_params":{"type":"boolean","description":"When enabled, auto-injects {{placeholder}} variables from execution_config into function parameters so the LLM provides them directly (no save_fields needed).","default":false}},"type":"object","required":["name","function_definition","execution_config"],"description":"Schema for creating a custom API tool for an agent.\n\nTools allow agents to call external HTTP APIs during conversations."},"WidgetFlowResult":{"properties":{"stages":{"items":{"$ref":"#/components/schemas/FlowStage"},"type":"array","default":[]},"links":{"items":{"$ref":"#/components/schemas/FlowLink"},"type":"array","default":[]},"paths":{"items":{"$ref":"#/components/schemas/FlowPath"},"type":"array","default":[]},"paths_truncated":{"type":"boolean","default":false},"total":{"type":"integer","default":0}},"type":"object","description":""},"ChangeEmbeddingModelResponse":{"properties":{"message":{"type":"string"},"kb_id":{"type":"string"},"new_embedding_model":{"type":"string"},"new_embedding_dimension":{"type":"integer"},"documents_to_reindex":{"type":"integer"},"reindexing_status":{"type":"string"}},"type":"object","required":["message","kb_id","new_embedding_model","new_embedding_dimension","documents_to_reindex","reindexing_status"],"description":"Response schema for embedding model change operation."},"VersionUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Version name"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Version description"}},"type":"object","description":"Request to update version metadata (name, description)."},"DiscoveryCancelResponse":{"properties":{"job_id":{"type":"string"},"status":{"type":"string"}},"type":"object","required":["job_id","status"],"description":""},"VersionDiffEdgeChange":{"properties":{"edge_id":{"type":"string"},"change_type":{"type":"string","enum":["added","removed","modified"]},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"target":{"anyOf":[{"type":"string"},{"type":"null"}]},"old_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"new_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]}},"type":"object","required":["edge_id","change_type"],"description":"Flow edge change in version diff."},"TransferResultRequest":{"properties":{"status":{"type":"string","enum":["success","failure"]},"transfer_method":{"type":"string","default":"bridge"},"destination_suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Last 4 digits of the human number (PII-safe)."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Failure reason: no_answer | busy | failed | timeout | error."}},"type":"object","required":["status"],"description":""},"FlowPath":{"properties":{"key":{"items":{"type":"integer"},"type":"array"},"count":{"type":"integer"}},"type":"object","required":["key","count"],"description":""},"BuildAgentRequest":{"properties":{"description":{"type":"string","minLength":10,"description":"Free-form description of the agent the user wants to build"}},"type":"object","required":["description"],"description":"Schema for building an agent from a description."},"VersionPublishRequest":{"properties":{"comment":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"Optional publish comment"},"bypass_approval":{"type":"boolean","description":"Skip approval check (admin only)","default":false},"acknowledge_untested":{"type":"boolean","description":"Proceed with publish despite tests not run/passing","default":false},"acknowledge_missing_stt_context":{"type":"boolean","description":"Proceed with publish despite a missing Soniox STT context","default":false}},"type":"object","description":"Request to publish a version."},"Body_upload_illustration_api_v1_agents__agent_id__illustration_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream"}},"type":"object","required":["file"]},"DiscoveryJobResponse":{"properties":{"job_id":{"type":"string"},"status":{"type":"string","default":"running"},"source_root_url":{"type":"string"}},"type":"object","required":["job_id","source_root_url"],"description":""},"FlowLink":{"properties":{"stage":{"type":"integer"},"source":{"type":"integer"},"target":{"type":"integer"},"count":{"type":"integer"}},"type":"object","required":["stage","source","target","count"],"description":""},"app__schemas__conversation__MessageResponse":{"properties":{"id":{"type":"string"},"conversation_id":{"type":"string"},"role":{"type":"string"},"content":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"node_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"turn_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"audio_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"feedback_comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"rag_chunks":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}]},"tool_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"nikud_replacements":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}]},"delivery":{"anyOf":[{"type":"string"},{"type":"null"}]},"generated_content":{"anyOf":[{"type":"string"},{"type":"null"}]},"spoken_ratio":{"anyOf":[{"type":"number"},{"type":"null"}]},"turn_events":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"unheard_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"langfuse_observation_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object","required":["id","conversation_id","role","content","timestamp","audio_s3_key"],"description":"Schema for message response (alias for ConversationMessageResponse)."},"MessageFeedbackRequest":{"properties":{"message_id":{"type":"string"},"feedback":{"type":"string"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object","required":["message_id","feedback"],"description":"Schema for submitting message feedback (positive/negative) with optional comment."},"OpenAIChatCompletionRequest":{"properties":{"model":{"type":"string","description":"Agent ID in format 'agent:uuid' or just UUID"},"messages":{"items":{"$ref":"#/components/schemas/OpenAIMessage"},"type":"array"},"stream":{"type":"boolean","default":true},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}]},"max_tokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}]},"top_p":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}]},"frequency_penalty":{"anyOf":[{"type":"number","maximum":2.0,"minimum":-2.0},{"type":"null"}]},"presence_penalty":{"anyOf":[{"type":"number","maximum":2.0,"minimum":-2.0},{"type":"null"}]},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"user":{"anyOf":[{"type":"string"},{"type":"null"}]},"session_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Session data from voice service (e.g. auto-mapped SIP X-headers)"},"magic_link_token":{"anyOf":[{"type":"string"},{"type":"null"}],"description":""},"landing_session":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":""}},"type":"object","required":["model","messages"],"description":"OpenAI-compatible chat completion request.\n\nThe model field should contain the agent ID in format 'agent:uuid'."},"ModelResponse":{"properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"latency":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_new":{"type":"boolean","default":false},"supports_temperature":{"type":"boolean","default":true},"supports_vision":{"type":"boolean","default":true},"supports_low_latency":{"type":"boolean","default":false},"supports_reasoning":{"type":"boolean","default":false},"eol_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"eol_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"eol_replacement":{"anyOf":[{"type":"string"},{"type":"null"}]},"eol_voice_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"eol_voice_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"fallback_models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]}},"type":"object","required":["id","label"],"description":"Model info returned to frontend."},"RefineUIToolRequest":{"properties":{"spec":{"additionalProperties":true,"type":"object"},"instruction":{"type":"string","maxLength":2000,"minLength":3}},"type":"object","required":["spec","instruction"]},"RerankModelInfo":{"properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"latency":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_new":{"type":"boolean","default":false},"provider_id":{"type":"string"},"provider_label":{"type":"string"},"provider_icon":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object","required":["id","label","provider_id","provider_label"],"description":"A reranker model from the admin registry (model_type='rerank')."},"AgentListResponse":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/AgentResponse"},"type":"array"},"total":{"type":"integer"},"pinned_agent_ids":{"items":{"type":"string"},"type":"array"}},"type":"object","required":["agents","total"],"description":"Schema for listing agents."},"FillerSentenceResponse":{"properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"text":{"type":"string"},"filler_type":{"type":"string"},"use_case":{"anyOf":[{"type":"string"},{"type":"null"}]},"index":{"anyOf":[{"type":"integer"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"}},"type":"object","required":["id","agent_id","text","filler_type","use_case","index","created_at"],"description":"Schema for filler sentence response."},"_PreviewMessage":{"properties":{"role":{"type":"string"},"content":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}},"type":"object","required":["role","content","timestamp"]},"RecordingConfirmRequest":{"properties":{"s3_key":{"type":"string"}},"type":"object","required":["s3_key"]},"KnowledgeBaseUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"chunk_size":{"anyOf":[{"type":"integer","maximum":8000.0,"minimum":100.0},{"type":"null"}]},"chunk_overlap":{"anyOf":[{"type":"integer","maximum":2000.0,"minimum":0.0},{"type":"null"}]},"chunking_strategy":{"anyOf":[{"$ref":"#/components/schemas/ChunkingStrategy"},{"type":"null"}]},"synonym_map":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"description":"Synonym mapping for query expansion. Format: {'abbreviation': ['full_term1', 'full_term2']}"}},"type":"object","description":"Schema for updating a knowledge base."},"JwtKeyUploadResponse":{"properties":{"jwt_key":{"type":"string"},"jwt_passphrase":{"anyOf":[{"type":"string"},{"type":"null"}]},"jwt_key_fingerprint":{"type":"string"},"algorithm":{"type":"string"}},"type":"object","required":["jwt_key","jwt_key_fingerprint","algorithm"],"description":""},"ConversationListResponse":{"properties":{"conversations":{"items":{"$ref":"#/components/schemas/ConversationResponse"},"type":"array","default":[]},"records":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}]},"total":{"type":"integer"},"aggregate_value":{"anyOf":[{"type":"number"},{"type":"null"}]},"aggregate_prev_value":{"anyOf":[{"type":"number"},{"type":"null"}]},"aggregate_trend_pct":{"anyOf":[{"type":"number"},{"type":"null"}]},"share_numerator":{"anyOf":[{"type":"number"},{"type":"null"}]},"share_denominator":{"anyOf":[{"type":"number"},{"type":"null"}]},"comparison_period":{"anyOf":[{"$ref":"#/components/schemas/ComparisonPeriod"},{"type":"null"}]},"grouped_rows":{"anyOf":[{"items":{"$ref":"#/components/schemas/GroupedAggregateRow"},"type":"array"},{"type":"null"}]},"group_total":{"anyOf":[{"type":"integer"},{"type":"null"}]},"grouped_truncated":{"type":"boolean","default":false},"series":{"anyOf":[{"items":{"$ref":"#/components/schemas/TimeSeriesPoint"},"type":"array"},{"type":"null"}]},"time_granularity":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow":{"anyOf":[{"$ref":"#/components/schemas/WidgetFlowResult"},{"type":"null"}]},"query_sql":{"anyOf":[{"type":"string"},{"type":"null"}]},"child_measure_values":{"anyOf":[{"additionalProperties":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"object"},"type":"object"},{"type":"null"}]}},"type":"object","required":["total"],"description":"Schema for list of conversations."},"CertificateUploadResponse":{"properties":{"certificate_pem":{"anyOf":[{"type":"string"},{"type":"null"}]},"private_key_pem":{"anyOf":[{"type":"string"},{"type":"null"}]},"pfx_data":{"anyOf":[{"type":"string"},{"type":"null"}]},"pfx_password":{"anyOf":[{"type":"string"},{"type":"null"}]},"certificate_cn":{"type":"string"},"certificate_expiry":{"type":"string"},"certificate_format":{"type":"string","enum":["pem","pfx"]}},"type":"object","required":["certificate_cn","certificate_expiry","certificate_format"],"description":"Response from certificate upload containing encrypted data and metadata."},"FixVerifyRequest":{"properties":{"message_index":{"type":"integer","minimum":0.0}},"type":"object","required":["message_index"],"description":""},"ToolTestChainRequest":{"properties":{"request_chain":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"stop_at_index":{"type":"integer"},"timeout_secs":{"type":"integer","default":30}},"type":"object","required":["request_chain","stop_at_index"],"description":""},"AgentExport":{"properties":{"metadata":{"$ref":"#/components/schemas/AgentExportMetadata"},"agent":{"additionalProperties":true,"type":"object","description":"Agent metadata (name, description, channel, mode, etc.)"},"flow_definition":{"title":"Flow Definition","description":"Complete flow definition - validated AgentFlow or raw dict if validation failed"},"tools":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"Custom tool definitions (not just IDs)"},"filler_sentences":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"Voice filler sentences configuration"},"nikud_replacements":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"Hebrew nikud replacement rules"},"elevenlabs_pronunciation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":""},"pdf_template":{"anyOf":[{"$ref":"#/components/schemas/PdfTemplateData"},{"type":"null"}],"description":"Legacy single PDF template binary (base64). Kept for importers predating pdf_templates; mirrors the first pdf_templates entry."},"pdf_templates":{"items":{"$ref":"#/components/schemas/PdfTemplateData"},"type":"array","description":""},"async_callback_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Async callback configuration for external API"},"session_data_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Session data extraction configuration (field mapping rules)"},"custom_schema_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Custom API request/response schema configuration"},"testing_personas":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"Testing personas linked to this agent"},"testing_test_cases":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"Testing test cases linked to this agent"},"testing_test_suites":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"Testing test suites linked to this agent"},"testing_question_sets":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"Testing Q&A sets linked to this agent"},"knowledge_base_data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"Deprecated \u2014 kept empty for backward compat. Use kb_references instead."},"kb_references":{"items":{"$ref":"#/components/schemas/KBReference"},"type":"array","description":"Minimal KB references (id + name) for display in import wizard"},"topics":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"description":""},"gate_composition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":""}},"type":"object","required":["metadata","agent","flow_definition"],"description":"Complete agent export format for portability.\n\nWhen validation_status is 'success', flow_definition is a validated AgentFlow."},"DocumentMergeRequest":{"properties":{"variable_name":{"type":"string","maxLength":100,"minLength":1,"description":"Name of the document variable to populate with the merged PDF"},"parts":{"items":{"$ref":"#/components/schemas/DocumentMergePart"},"type":"array","maxItems":20,"minItems":1,"description":""}},"type":"object","required":["variable_name","parts"],"description":"Request to merge several uploaded files into a single document variable.\n\nUsed by ``multi_file`` document fields on collect nodes."},"KnowledgeBaseInfo":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"document_count":{"type":"integer","default":0},"chunk_size":{"type":"integer","default":4096},"chunk_overlap":{"type":"integer","default":614},"chunking_strategy":{"type":"string","default":"recursive"},"embedding_model":{"type":"string","default":"google"},"embedding_dimension":{"type":"integer","default":768},"synonym_map":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}]},"index_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"total_chunks":{"type":"integer","default":0},"index_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"failed_document_count":{"type":"integer","default":0},"processing_document_count":{"type":"integer","default":0},"reindexing_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"reindexing_total_docs":{"anyOf":[{"type":"integer"},{"type":"null"}]},"reindexing_completed_docs":{"anyOf":[{"type":"integer"},{"type":"null"}]},"reindexing_failed_docs":{"anyOf":[{"type":"integer"},{"type":"null"}]},"purge_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"purge_total_docs":{"anyOf":[{"type":"integer"},{"type":"null"}]},"purge_source_root_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"purge_source_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"purge_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentic_indexing_enabled":{"type":"boolean","default":false},"agentic_indexing_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentic_indexing_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"agentic_indexing_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"agentic_indexing_total_chunks":{"anyOf":[{"type":"integer"},{"type":"null"}]},"agentic_indexing_completed_chunks":{"anyOf":[{"type":"integer"},{"type":"null"}]},"agentic_indexing_failed_chunks":{"anyOf":[{"type":"integer"},{"type":"null"}]},"agentic_indexing_total_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}]},"agentic_indexing_total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"agentic_indexing_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentic_indexing_language":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentic_indexing_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"custom_enrichment_prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"default_enrichment_prompt_template":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object","required":["id","name","description","created_at"],"description":"Schema for knowledge base info."},"MCPDiscoveredToolInfo":{"properties":{"name":{"type":"string"},"description":{"type":"string","default":""},"input_schema":{"additionalProperties":true,"type":"object"}},"type":"object","required":["name"],"description":"Schema for a discovered MCP tool."},"CrawlRequest":{"properties":{"url":{"type":"string"},"deep":{"type":"boolean","default":false}},"type":"object","required":["url"],"description":"Schema for crawl request."},"DocumentTagsUpdateRequest":{"properties":{"tags":{"items":{"type":"string"},"type":"array","description":"The document's complete tag set. Replaces what is there now."}},"type":"object","required":["tags"],"description":""},"ToolTestRequest":{"properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"url":{"type":"string"},"headers":{"additionalProperties":{"type":"string"},"type":"object","default":{}},"query_params":{"additionalProperties":{"type":"string"},"type":"object","default":{}},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"body_format":{"type":"string","enum":["json","form-data","x-www-form-urlencoded","xml","file_chunked"],"default":"json"},"chunk_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}]},"auth_config":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"timeout_secs":{"type":"integer","default":30},"extractions":{"items":{"$ref":"#/components/schemas/ToolAssignment"},"type":"array","default":[]},"extractOnError":{"type":"boolean","default":false}},"type":"object","required":["method","url"],"description":"Request schema for testing a tool API call"},"AgentSummaryListResponse":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/AgentSummary"},"type":"array"},"total":{"type":"integer"},"active":{"type":"integer"},"with_phone":{"type":"integer"}},"type":"object","required":["agents","total","active","with_phone"],"description":"Response for GET /api/v1/agents?fields=summary.\n\n`total`, `active`, `with_phone` are tenant-wide aggregates over\nnon-deleted agents in the current organization."},"AgentImportResponse":{"properties":{"agent_id":{"type":"string"},"name":{"type":"string"},"message":{"type":"string"},"warnings":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version ID when importing into an existing agent"},"version_display":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version display string (e.g. '1.2.0') when importing into an existing agent"}},"type":"object","required":["agent_id","name","message"],"description":"Response after importing an agent."},"ExtractionResult":{"properties":{"variable_name":{"type":"string"},"response_path":{"type":"string"},"extraction_type":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"success":{"type":"boolean"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"type":"object","required":["variable_name","response_path","extraction_type","success"],"description":"Result of evaluating a single extraction"},"ConversationDetailResponse":{"properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"caller_phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"call_duration":{"anyOf":[{"type":"integer"},{"type":"null"}]},"started_at":{"type":"string","format":"date-time"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"transcript_detailed":{"anyOf":[{"type":"string"},{"type":"null"}]},"messages":{"items":{"$ref":"#/components/schemas/app__schemas__conversation__MessageResponse"},"type":"array"},"source":{"type":"string","default":"production"},"document_field_values":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}]},"tester_notes":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}]},"anonymized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"llm_fallback":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"end_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"transferred_to_human":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false},"transfer_destination":{"anyOf":[{"type":"string"},{"type":"null"}]},"transfer_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"transfer_method":{"anyOf":[{"type":"string"},{"type":"null"}]},"transfer_target_value":{"anyOf":[{"type":"string"},{"type":"null"}]},"transfer_sip_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}]},"transfer_initiated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"flow_version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"flow_version_display":{"anyOf":[{"type":"string"},{"type":"null"}]},"flattened":{"anyOf":[{"$ref":"#/components/schemas/FlattenedTranscriptResponse"},{"type":"null"}]},"sms_activity":{"items":{"$ref":"#/components/schemas/SmsActivityEntryResponse"},"type":"array","default":[]}},"type":"object","required":["id","agent_id","caller_phone","call_duration","started_at","ended_at","transcript_detailed","messages"],"description":"Schema for detailed conversation with messages."},"SuggestUIToolsResponse":{"properties":{"suggestions":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"type":"object","required":["suggestions"]},"ConversationCreate":{"properties":{"caller_phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"call_duration":{"anyOf":[{"type":"integer"},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"session_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"production"}},"type":"object","description":"Schema for creating a conversation."},"ChunkFixSuggestion":{"properties":{"title":{"type":"string"},"rationale":{"type":"string"},"type":{"type":"string","const":"update_chunk","default":"update_chunk"},"kb_id":{"type":"string"},"chunk_id":{"type":"string"},"document_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"field":{"type":"string","enum":["enriched_text","enrichment_tags","chunk_text"]},"current_value":{"anyOf":[{"type":"string"},{"type":"null"}]},"proposed_value":{"type":"string"},"usage_conversations_30d":{"anyOf":[{"type":"integer"},{"type":"null"}]},"usage_passing_tests":{"anyOf":[{"type":"integer"},{"type":"null"}]},"source_synced":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"type":"object","required":["title","rationale","kb_id","chunk_id","field","proposed_value"],"description":"KB chunk data/enrichment is wrong or incomplete."},"AgentToolUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"function_definition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"execution_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"instance_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"custom_instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"trigger_messages":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"disable_interruptions":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"expects_response":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"execution_mode":{"anyOf":[{"type":"string"},{"type":"null"}]},"response_timeout_secs":{"anyOf":[{"type":"integer"},{"type":"null"}]},"mock_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"assignments":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}]},"is_system_tool":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"system_tool_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"llm_direct_params":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"type":"object"},"AgentVersionResponse":{"properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"version":{"type":"integer"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"created_by_user_id":{"type":"string"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"version_display":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent_version_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","pending_approval","published","archived"],"default":"draft"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"type":"object","required":["id","agent_id","version","name","description","created_at","created_by_user_id"],"description":"Schema for agent version response (without snapshot)."},"PIIDecryptRequest":{"properties":{"encrypted_value":{"type":"string"},"entity_type":{"type":"string"},"agent_id":{"type":"string"}},"type":"object","required":["encrypted_value","entity_type","agent_id"],"description":"Request to decrypt a single PII value."},"DocumentMergePart":{"properties":{"s3_key":{"type":"string","minLength":1,"description":"S3 key of the uploaded part (must live under this conversation's prefix)"},"filename":{"type":"string","maxLength":255,"minLength":1,"description":"Original filename, used for ordering feedback and error messages"},"content_type":{"type":"string","maxLength":100,"minLength":1,"description":"MIME type of the part (PDF, Word .docx, or an image \u2014 non-PDF parts are converted before the merge)"},"file_size_bytes":{"type":"integer","minimum":0.0,"description":"Size of the part in bytes"}},"type":"object","required":["s3_key","filename","content_type","file_size_bytes"],"description":""},"TimeSeriesPoint":{"properties":{"bucket_start":{"type":"string","format":"date-time"},"bucket_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"value":{"type":"number","default":0.0},"series_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"series_value":{"title":"Series Value"},"is_other":{"type":"boolean","default":false}},"type":"object","required":["bucket_start"],"description":""},"MCPTestConnectionRequest":{"properties":{"server_url":{"type":"string","description":"MCP server URL"},"transport":{"type":"string","enum":["sse","streamable_http"],"description":"Transport type: 'sse' (legacy) or 'streamable_http' (current MCP spec)","default":"sse"},"auth":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Auth config: {type: 'none'|'bearer'|'api_key', token?: str, api_key?: str, header_name?: str}"},"timeout_secs":{"type":"integer","maximum":60.0,"minimum":1.0,"description":"Connection timeout in seconds","default":15}},"type":"object","required":["server_url"],"description":"Request schema for testing an MCP server connection."},"FlowStage":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodes":{"items":{"$ref":"#/components/schemas/FlowStageNode"},"type":"array","default":[]}},"type":"object","description":""},"RawDocumentCreate":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"description":"Document title"},"content":{"type":"string","minLength":1,"description":"Document content in markdown"}},"type":"object","required":["title","content"],"description":"Schema for creating a raw document from markdown editor."},"InitiateUploadResponse":{"properties":{"execution_id":{"type":"string"},"kb_id":{"type":"string"},"presigned_urls":{"items":{"$ref":"#/components/schemas/PresignedUrlResponse"},"type":"array"}},"type":"object","required":["execution_id","kb_id","presigned_urls"],"description":"Response with execution ID and presigned URLs for all files."},"UnifiedVariableOption":{"properties":{"name":{"type":"string"},"type":{"type":"string"},"source":{"type":"string"},"source_agents":{"items":{"type":"string"},"type":"array"}},"type":"object","required":["name","type","source","source_agents"],"description":"Variable option with source type for unified variable filter."},"SmsActivityEntryResponse":{"properties":{"event_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}]},"message_sid":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"skip_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"trigger_source":{"anyOf":[{"type":"string"},{"type":"null"}]},"queued_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"message_ids":{"items":{"type":"string"},"type":"array","default":[]},"delivery_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"delivery_error_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"delivery_error_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"delivery_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"type":"object","required":["state"],"description":""},"ChatCompletionRequest":{"properties":{"organization_id":{"type":"string","format":"uuid","description":"Organization (tenant) ID"},"agent_id":{"type":"string","format":"uuid","description":"Agent ID to use for the conversation"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Existing conversation ID. If omitted, creates new conversation."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User message content. If empty/None, returns only the greeting from start node."},"channel":{"type":"string","enum":["voice","chat"],"description":"[DEPRECATED] Use source_channel. Conversation modality for backward compatibility.","default":"chat"},"source_channel":{"anyOf":[{"type":"string","enum":["chat","voice","email","whatsapp","api","sms","landing_page","form_widget"]},{"type":"null"}],"description":"Source channel where conversation originated. If not provided, derived from 'channel' field."},"page_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the page where chat was initiated"},"magic_link_token":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Magic link token for pre-configured session access. Required when agent access_mode is 'magic_link_only'."},"landing_session":{"type":"boolean","description":"","default":false},"session_data":{"additionalProperties":true,"type":"object","description":"Session data from embedding page (user_id, account_tier, etc.) - extracted as flow variables based on agent config"},"source":{"type":"string","enum":["production","test","simulated","benchmark","benchmark_draft"],"description":"Conversation source: production (real users), test (debug panel), simulated (simulation runs), benchmark/benchmark_draft (internal security benchmark)","default":"production"},"benchmark_token":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HMAC token for internal benchmark requests. Allows bypassing published-version check."},"form_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Structured form data from interactive form submission. Keys=field names, values=field values or DocumentFieldValue dicts."},"interaction_type":{"anyOf":[{"type":"string","enum":["form_submit","button_click","widget_collect"]},{"type":"null"}],"description":""},"collect_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"description":""},"voice_turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Voice service turn ID for deduplication. Same ID is reused when STT guard detects continuation and retries."},"voice_turn_withdrawn":{"type":"boolean","description":"The previous request under voice_turn_id was withdrawn by the voice service's continuation guard before the caller heard any of it: its turn is dropped and the\u2026","default":false},"model_override":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Override the agent's configured LLM model for this request. Used by security benchmark to test different models."},"received_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":""}},"type":"object","required":["organization_id","agent_id"],"description":"Request schema for chat completions endpoint.\n\nPOST /api/chat/completions"},"GeneratePhonemeResponse":{"properties":{"phoneme":{"type":"string","description":"The transcription, delimiters stripped; empty when unsupported"},"unsupported":{"type":"boolean","description":"True when the target alphabet cannot represent the word \u2014 e.g. a Hebrew word in ARPABET, which has phones for English only","default":false}},"type":"object","required":["phoneme"],"description":"Response with the generated transcription."},"BuildFlowResponse":{"properties":{"flow_definition":{"additionalProperties":true,"type":"object","description":"Generated flow definition (React-Flow nodes + edges)"}},"type":"object","required":["flow_definition"],"description":""},"TesterNoteCreateResponse":{"properties":{"status":{"type":"string"},"notes_count":{"type":"integer"}},"type":"object","required":["status","notes_count"],"description":"Response schema for tester note creation."},"CustomSchemaConfig":{"properties":{"enabled":{"type":"boolean","description":"Whether to use custom schema for API requests/responses","default":false},"request_template":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON template with {{variable}} placeholders for incoming requests"},"response_template":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON template with {{variable}} placeholders for outgoing responses"},"session_data_mode":{"type":"string","enum":["object","spread"],"description":"How session_data is mapped in request template: 'object' for whole {{session_data}}, 'spread' for individual {{session_data.field}} placeholders","default":"object"}},"type":"object","description":"Configuration for custom API request/response schema transformation."},"PIIMaskConfig":{"properties":{"enabled_types":{"items":{"type":"string"},"type":"array","description":"List of Presidio entity types to detect"},"storage_mode":{"type":"string","enum":["encrypt","delete"],"description":"What to do with detected PII at write time.","default":"encrypt"},"reveal_mode":{"type":"string","enum":["never","revealable"],"description":"Whether masked PII can be revealed in dashboard. Only meaningful when storage_mode='encrypt'.","default":"never"},"reveal_min_role":{"type":"string","enum":["owner","admin","member"],"description":"Minimum role required to reveal PII in dashboard. Uses hierarchy: owner > admin > member","default":"admin"},"mask_agent_responses":{"type":"boolean","description":"","default":true},"custom_types":{"items":{"$ref":"#/components/schemas/CustomPIIType"},"type":"array","maxItems":25,"description":""}},"type":"object","description":"Schema for PII masking configuration using Microsoft Presidio.\n\nSimple list of enabled PII types to detect."},"app__schemas__dashboard_summary__TransferMetrics":{"properties":{"total":{"type":"integer","minimum":0.0,"description":"Number of conversations transferred to a human"},"rate":{"type":"number","maximum":100.0,"minimum":0.0,"description":"Transfer rate as a percentage (0-100), rounded to 2 dp"}},"type":"object","required":["total","rate"],"description":"Transfer-to-human counts + rate."},"EnhancePromptWithContextRequest":{"properties":{"current_prompt":{"type":"string","description":"The current prompt text to enhance (can be empty for initial generation)","default":""},"prompt_context":{"$ref":"#/components/schemas/PromptContext","description":"Context about where this prompt is used"},"flow_context":{"$ref":"#/components/schemas/FlowContext","description":"Full flow context for the agent"},"tweak_instruction":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Optional user instruction for how to tweak the enhancement (e.g., 'make it more concise')"}},"type":"object","required":["prompt_context","flow_context"],"description":"Request to enhance a prompt with full flow context."},"AgentVersionCreate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"User-provided name for the version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional description of what changed in this version"}},"type":"object","description":"Schema for creating a new agent version."},"OpenAIMessageRole":{"type":"string","enum":["system","user","assistant","tool"],"description":"Valid roles for OpenAI messages."},"FlowContext":{"properties":{"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the agent (for tracing)"},"agent_name":{"type":"string","description":"Name of the agent"},"agent_description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Description of the agent"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the organization (for tracing)"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the organization (for tracing)"},"channel":{"anyOf":[{"type":"string","enum":["voice","chat"]},{"type":"null"}],"description":"DEPRECATED: Agent channel type. Use capabilities instead."},"capabilities":{"items":{"type":"string"},"type":"array","description":"Agent capabilities: text, voice, or both","default":["text"]},"system_prompt":{"type":"string","description":"The agent's main system prompt"},"llm_model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"LLM model being used"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"LLM temperature setting"},"nodes_summary":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"Summary of flow nodes: [{id, type, name, prompt_preview}]"},"exits_summary":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"Summary of exit conditions: [{source, target, condition_type, name}]"},"enabled_tools":{"items":{"type":"string"},"type":"array","description":"List of enabled tool IDs (e.g., end_call, transfer_to_human, knowledge_search)"},"knowledge_base_enabled":{"type":"boolean","description":"Whether knowledge base/RAG is enabled","default":false},"knowledge_base_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"KB mode: auto, tool, or disabled"},"variables":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","description":"Available variables: [{name, type, description}]"}},"type":"object","required":["agent_name","system_prompt"],"description":"Serialized flow context for prompt enhancement."},"DefaultsInfo":{"properties":{"conversation":{"$ref":"#/components/schemas/DefaultModelInfo"},"analytics":{"$ref":"#/components/schemas/DefaultModelInfo"},"simulation":{"$ref":"#/components/schemas/DefaultModelInfo"}},"type":"object","required":["conversation","analytics","simulation"],"description":"Default models for different use cases."},"DocumentConfirmRequest":{"properties":{"variable_name":{"type":"string","maxLength":100,"minLength":1,"description":"Name of the document variable to update"},"s3_key":{"type":"string","minLength":1,"description":"S3 key where the document was uploaded"},"filename":{"type":"string","maxLength":255,"minLength":1,"description":"Original filename"},"content_type":{"type":"string","maxLength":100,"minLength":1,"description":"MIME type of the file"},"file_size_bytes":{"type":"integer","minimum":0.0,"description":"Size of the file in bytes"}},"type":"object","required":["variable_name","s3_key","filename","content_type","file_size_bytes"],"description":"Request to confirm a document upload and persist it in conversation state."},"DocumentUploadRequest":{"properties":{"field_name":{"type":"string","maxLength":100,"minLength":1,"description":"Name of the document field being uploaded"},"filename":{"type":"string","maxLength":255,"minLength":1,"description":"Original filename"},"content_type":{"type":"string","maxLength":100,"minLength":1,"description":"MIME type of the file"},"file_size":{"type":"integer","minimum":1.0,"description":"Size of the file in bytes"}},"type":"object","required":["field_name","filename","content_type","file_size"],"description":"Request to get a presigned URL for document upload."},"VersionDiffResponse":{"properties":{"from_version":{"$ref":"#/components/schemas/VersionDiffSummary"},"to_version":{"$ref":"#/components/schemas/VersionDiffSummary"},"total_changes":{"type":"integer","default":0},"nodes_added":{"type":"integer","default":0},"nodes_removed":{"type":"integer","default":0},"nodes_modified":{"type":"integer","default":0},"edges_added":{"type":"integer","default":0},"edges_removed":{"type":"integer","default":0},"setting_changes":{"items":{"$ref":"#/components/schemas/VersionDiffFieldChange"},"type":"array","default":[]},"node_changes":{"items":{"$ref":"#/components/schemas/VersionDiffNodeChange"},"type":"array","default":[]},"edge_changes":{"items":{"$ref":"#/components/schemas/VersionDiffEdgeChange"},"type":"array","default":[]},"raw_diff":{"additionalProperties":true,"type":"object","default":{}},"unified_diff":{"type":"string","default":""},"from_flow":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"to_flow":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]}},"type":"object","required":["from_version","to_version"],"description":"Complete diff result between two versions."}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key for programmatic access. Get your key from Settings \u2192 API Keys."},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":""},"HTTPBearer":{"type":"http","scheme":"bearer","description":"JWT or API key as Bearer token (used by FastAPI endpoints)"}},"parameters":{"XOrganizationID":{"name":"X-Organization-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"skip":{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0}},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100}},"fields":{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"const":"summary","type":"string"},{"type":"null"}],"description":"Projection mode. 'summary' returns id/name/phone_number/is_active/is_live + tenant-wide aggregate counters and skips heavy fields, JOINs, and version diff lookups. Default is the full agent payload."},"description":"Projection mode. 'summary' returns id/name/phone_number/is_active/is_live + tenant-wide aggregate counters and skips heavy fields, JOINs, and version diff lookups. Default is the full agent payload."},"create_version":{"name":"create_version","in":"query","required":false,"schema":{"type":"boolean","description":"Create a version snapshot before updating","default":false},"description":"Create a version snapshot before updating"},"version_name":{"name":"version_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name for the new version"},"description":"Name for the new version"},"switch_to_version":{"name":"switch_to_version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Version number to switch to (for restoring previous versions)"},"description":"Version number to switch to (for restoring previous versions)"},"expected_flow_version":{"name":"expected_flow_version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Expected flow version for optimistic locking"},"description":"Expected flow version for optimistic locking"},"since":{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO timestamp \u2014 only entries after this time"},"description":"ISO timestamp \u2014 only entries after this time"},"source":{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source: manual, import"},"description":"Filter by source: manual, import"},"limit_f515a628":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200}},"start_date":{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO date (YYYY-MM-DD) \u2014 inclusive"},"description":"ISO date (YYYY-MM-DD) \u2014 inclusive"},"end_date":{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO date (YYYY-MM-DD) \u2014 inclusive (end of day)"},"description":"ISO date (YYYY-MM-DD) \u2014 inclusive (end of day)"},"source_9f55468b":{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"'production' | 'test' | 'all' \u2014 defaults to production","default":"production"},"description":"'production' | 'test' | 'all' \u2014 defaults to production"},"limit_c97d13e6":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum number of conversations to return","default":50},"description":"Maximum number of conversations to return"},"offset":{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of conversations to skip","default":0},"description":"Number of conversations to skip"},"website_url":{"name":"website_url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"from_version_id":{"name":"from_version_id","in":"query","required":true,"schema":{"type":"string","description":"ID of the base version"},"description":"ID of the base version"},"to_version_id":{"name":"to_version_id","in":"query","required":true,"schema":{"type":"string","description":"ID of the version to compare against"},"description":"ID of the version to compare against"},"status":{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status"},"description":"Filter by status"},"limit_cae63f62":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50}},"version_id":{"name":"version_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export a specific version's snapshot instead of the current agent state"},"description":"Export a specific version's snapshot instead of the current agent state"},"include_tools":{"name":"include_tools","in":"query","required":false,"schema":{"type":"boolean","description":"Deprecated \u2014 tools are always exported. Kept for backward compat.","default":true},"description":"Deprecated \u2014 tools are always exported. Kept for backward compat."},"include_tests":{"name":"include_tests","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Backward-compat alias: if false, excludes all testing entities"},"description":"Backward-compat alias: if false, excludes all testing entities"},"include_fillers":{"name":"include_fillers","in":"query","required":false,"schema":{"type":"boolean","description":"Deprecated \u2014 fillers are always exported. Kept for backward compat.","default":true},"description":"Deprecated \u2014 fillers are always exported. Kept for backward compat."},"include_test_personas":{"name":"include_test_personas","in":"query","required":false,"schema":{"type":"boolean","description":"Include testing personas in the export","default":true},"description":"Include testing personas in the export"},"include_test_cases":{"name":"include_test_cases","in":"query","required":false,"schema":{"type":"boolean","description":"Include test cases in the export","default":true},"description":"Include test cases in the export"},"include_test_suites":{"name":"include_test_suites","in":"query","required":false,"schema":{"type":"boolean","description":"Include test suites in the export","default":true},"description":"Include test suites in the export"},"include_question_sets":{"name":"include_question_sets","in":"query","required":false,"schema":{"type":"boolean","description":"Include question sets in the export","default":true},"description":"Include question sets in the export"},"test_persona_ids":{"name":"test_persona_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated persona IDs to include (if omitted, include all)"},"description":"Comma-separated persona IDs to include (if omitted, include all)"},"test_case_ids":{"name":"test_case_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated test case IDs to include (if omitted, include all)"},"description":"Comma-separated test case IDs to include (if omitted, include all)"},"test_suite_ids":{"name":"test_suite_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated test suite IDs to include (if omitted, include all)"},"description":"Comma-separated test suite IDs to include (if omitted, include all)"},"question_set_ids":{"name":"question_set_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated question set IDs to include (if omitted, include all)"},"description":"Comma-separated question set IDs to include (if omitted, include all)"},"include_kb_content":{"name":"include_kb_content","in":"query","required":false,"schema":{"type":"boolean","description":"Admin-only: when True, mark kb_references with has_content=True so the export wizard assembles full KB content from the KB export endpoints.","default":false},"description":"Admin-only: when True, mark kb_references with has_content=True so the export wizard assembles full KB content from the KB export endpoints."},"include_embeddings":{"name":"include_embeddings","in":"query","required":false,"schema":{"type":"boolean","description":"When include_kb_content=True, whether to include pre-computed embeddings in the KB chunk stream (affects the size estimate, not this response).","default":true},"description":"When include_kb_content=True, whether to include pre-computed embeddings in the KB chunk stream (affects the size estimate, not this response)."},"include_audio":{"name":"include_audio","in":"query","required":false,"schema":{"type":"boolean","description":"Export Agent","default":false},"description":"Export Agent"},"via_mcp":{"name":"via_mcp","in":"query","required":false,"schema":{"type":"boolean","description":"Set by the MCP so the draft version's change-name is tagged '(via MCP)'.","default":false},"description":"Set by the MCP so the draft version's change-name is tagged '(via MCP)'."},"XSessionToken":{"name":"X-Session-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"XInputTimestamp":{"name":"X-Input-Timestamp","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"organization_id":{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},"offset_f52e6b45":{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0}},"include_debug":{"name":"include_debug","in":"query","required":false,"schema":{"type":"boolean","default":false}},"XConversationID":{"name":"X-Conversation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"XSessionData":{"name":"X-Session-Data","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"XIsTestNumber":{"name":"X-Is-Test-Number","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"XVoiceTurnID":{"name":"X-Voice-Turn-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"XVoiceTurnWithdrawn":{"name":"X-Voice-Turn-Withdrawn","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"XPregenId":{"name":"X-Pregen-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"XUndeliveredTurnId":{"name":"X-Undelivered-Turn-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"XVoiceServiceAPIKey":{"name":"X-Voice-Service-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"download":{"name":"download","in":"query","required":false,"schema":{"type":"boolean","default":false}},"source_root":{"name":"source_root","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to one crawl source root"},"description":"Filter to one crawl source root"},"status_001a15fc":{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by curation status"},"description":"Filter by curation status"},"source_root_1f0d3709":{"name":"source_root","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export only this crawl source root"},"description":"Export only this crawl source root"},"limit_b5156385":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50}},"offset_70739c5c":{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}},"chunk_type":{"name":"chunk_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter: all, enriched, golden_example, not_enriched"},"description":"Filter: all, enriched, golden_example, not_enriched"},"document_id":{"name":"document_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"search":{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"agent_ids":{"name":"agent_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated agent IDs to scope options"},"description":"Comma-separated agent IDs to scope options"},"variable_name":{"name":"variable_name","in":"query","required":true,"schema":{"type":"string","description":"Variable name to get distinct values for"},"description":"Variable name to get distinct values for"},"variable_source":{"name":"variable_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(flow_variable|session_data|extracted_field|live_extracted_field|column)$"},{"type":"null"}],"description":"Get Variable Values"},"description":"Get Variable Values"},"agent_ids_2739a8d0":{"name":"agent_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated agent IDs to scope"},"description":"Comma-separated agent IDs to scope"},"limit_4881f7f3":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max distinct values to return","default":50},"description":"Max distinct values to return"},"search_31d1902d":{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ILIKE prefix filter on values"},"description":"ILIKE prefix filter on values"},"limit_9e56a301":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":15}},"sort_by":{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(duration|message_count|date|thumbs_up|thumbs_down)$"},{"type":"null"}],"description":"Sort by: duration, message_count, date (default), thumbs_up, or thumbs_down"},"description":"Sort by: duration, message_count, date (default), thumbs_up, or thumbs_down"},"sort_direction":{"name":"sort_direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(asc|desc)$"},{"type":"null"}],"description":"Sort direction: asc or desc (default: desc)","default":"desc"},"description":"Sort direction: asc or desc (default: desc)"},"include_caller_stats":{"name":"include_caller_stats","in":"query","required":false,"schema":{"type":"boolean","description":"Include returning caller statistics (is_returning_caller, call_count_last_week) for voice conversations","default":false},"description":"Include returning caller statistics (is_returning_caller, call_count_last_week) for voice conversations"},"start_date_b4821dbd":{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"end_date_8cacdc68":{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"call_type":{"name":"call_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(inbound|outbound)$"},{"type":"null"}]}},"conversation_type":{"name":"conversation_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(voice|chat)$"},{"type":"null"}]}},"source_2d59cfdd":{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(production|test|simulated)$"},{"type":"null"}],"description":"Filter by conversation source"},"description":"Filter by conversation source"},"include_test":{"name":"include_test","in":"query","required":false,"schema":{"type":"boolean","description":"Include test conversations. When False (default), only production conversations are shown.","default":false},"description":"Include test conversations. When False (default), only production conversations are shown."},"include_simulated":{"name":"include_simulated","in":"query","required":false,"schema":{"type":"boolean","description":"Deprecated \u2014 use include_test. Kept for backward compatibility.","default":false},"description":"Deprecated \u2014 use include_test. Kept for backward compatibility."},"source_channel":{"name":"source_channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(phone|chat_widget|whatsapp|sms|email|api|slack|form_widget|landing_page)$"},{"type":"null"}],"description":"Filter by source channel"},"description":"Filter by source channel"},"agent_ids_d408e484":{"name":"agent_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated agent IDs to filter by"},"description":"Comma-separated agent IDs to filter by"},"min_duration":{"name":"min_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Minimum duration in seconds"},"description":"Minimum duration in seconds"},"max_duration":{"name":"max_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum duration in seconds"},"description":"Maximum duration in seconds"},"min_message_count":{"name":"min_message_count","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Minimum user message count"},"description":"Minimum user message count"},"max_message_count":{"name":"max_message_count","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum user message count"},"description":"Maximum user message count"},"include_no_user_message":{"name":"include_no_user_message","in":"query","required":false,"schema":{"type":"boolean","description":"List All Conversations","default":false},"description":"List All Conversations"},"star_rating":{"name":"star_rating","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by star rating (1-5)"},"description":"Filter by star rating (1-5)"},"has_rating":{"name":"has_rating","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter conversations with or without ratings"},"description":"Filter conversations with or without ratings"},"has_transfer":{"name":"has_transfer","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter conversations with (True) or without (False) transfers"},"description":"Filter conversations with (True) or without (False) transfers"},"has_governance_incidents":{"name":"has_governance_incidents","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter conversations with (True) or without (False) governance incidents"},"description":"Filter conversations with (True) or without (False) governance incidents"},"sentiment":{"name":"sentiment","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(Positive|Neutral|Negative)$"},{"type":"null"}],"description":"Filter by sentiment (Positive, Neutral, or Negative)"},"description":"Filter by sentiment (Positive, Neutral, or Negative)"},"status_80f3cace":{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(active|completed|failed)$"},{"type":"null"}],"description":"Filter by conversation status (active, completed, or failed)"},"description":"Filter by conversation status (active, completed, or failed)"},"outcome_classification":{"name":"outcome_classification","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(success|failure|churn|unclear)$"},{"type":"null"}],"description":"Filter by LLM-classified outcome (success, failure, churn, unclear). Independent of the structural `status` column."},"description":"Filter by LLM-classified outcome (success, failure, churn, unclear). Independent of the structural `status` column."},"needs_attention":{"name":"needs_attention","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter conversations flagged as needs_attention by the outcome classifier."},"description":"Filter conversations flagged as needs_attention by the outcome classifier."},"resolution_bucket":{"name":"resolution_bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(completed|transferred|disconnected|other)$"},{"type":"null"}],"description":"List All Conversations"},"description":"List All Conversations"},"custom_field_filters":{"name":"custom_field_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON string of custom field filters, e.g., '{\"doctor_name\": \"Dr. Smith\", \"user_type\": \"premium\"}'"},"description":"JSON string of custom field filters, e.g., '{\"doctor_name\": \"Dr. Smith\", \"user_type\": \"premium\"}'"},"flow_variable_filters":{"name":"flow_variable_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON string of flow variable filters, e.g., '{\"phone_number\": \"555-1234\", \"order_id\": \"12345\"}'"},"description":"JSON string of flow variable filters, e.g., '{\"phone_number\": \"555-1234\", \"order_id\": \"12345\"}'"},"variable_filters":{"name":"variable_filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON string of unified variable filters that search across flow variables, session data, and extracted fields"},"description":"JSON string of unified variable filters that search across flow variables, session data, and extracted fields"},"search_2bd2f7b2":{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text search across message content and flow variables (case-insensitive)"},"description":"Free text search across message content and flow variables (case-insensitive)"},"from_number":{"name":"from_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated caller phone numbers for exact match filtering"},"description":"Comma-separated caller phone numbers for exact match filtering"},"to_number":{"name":"to_number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated recipient phone numbers for exact match filtering"},"description":"Comma-separated recipient phone numbers for exact match filtering"},"external_id":{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact match on conversation external_id (client/Commbox session id, e.g. Meitav's initiatingChannelSessionId)"},"description":"Exact match on conversation external_id (client/Commbox session id, e.g. Meitav's initiatingChannelSessionId)"},"conversation_id":{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"List All Conversations"},"description":"List All Conversations"},"node":{"name":"node","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter conversations that passed through this flow node ID"},"description":"Filter conversations that passed through this flow node ID"},"dropped":{"name":"dropped","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"When used with 'node', filter to conversations that were abandoned at that specific node"},"description":"When used with 'node', filter to conversations that were abandoned at that specific node"},"dropped_nodes":{"name":"dropped_nodes","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated additional node IDs for drop-off filter (hidden nodes whose drops were absorbed by the primary node)"},"description":"Comma-separated additional node IDs for drop-off filter (hidden nodes whose drops were absorbed by the primary node)"},"fv_id":{"name":"fv_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter conversations by flow version ID (from Sankey drill-down)"},"description":"Filter conversations by flow version ID (from Sankey drill-down)"},"nvm":{"name":"nvm","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Minimum number of times the conversation must have visited the flow node (for revisited nodes in Sankey drill-down)"},"description":"Minimum number of times the conversation must have visited the flow node (for revisited nodes in Sankey drill-down)"},"nvx":{"name":"nvx","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Maximum number of times the conversation visited the flow node (for drop-off at exact visit count)"},"description":"Maximum number of times the conversation visited the flow node (for drop-off at exact visit count)"},"top_n":{"name":"top_n","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Top-N path filter \u2014 restricts results to conversations in the top-N most common flow paths (requires node + fv_id + agent)"},"description":"Top-N path filter \u2014 restricts results to conversations in the top-N most common flow paths (requires node + fv_id + agent)"},"visited_node_id":{"name":"visited_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to conversations where at least one message has this node_id (node traversal drill-down). Accepts a single ID or a comma-separated list \u2014 conversations matching ANY of the listed node IDs are returned."},"description":"Filter to conversations where at least one message has this node_id (node traversal drill-down). Accepts a single ID or a comma-separated list \u2014 conversations matching ANY of the listed node IDs are returned."},"ended_node_id":{"name":"ended_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"List All Conversations"},"description":"List All Conversations"},"av":{"name":"av","in":"query","required":false,"schema":{"type":"boolean","description":"All-versions mode \u2014 matches Sankey cache key when drill-down spans all flow versions","default":false},"description":"All-versions mode \u2014 matches Sankey cache key when drill-down spans all flow versions"},"edge_from":{"name":"edge_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"List All Conversations"},"description":"List All Conversations"},"edge_to":{"name":"edge_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"List All Conversations"},"description":"List All Conversations"},"gbg":{"name":"gbg","in":"query","required":false,"schema":{"type":"boolean","description":"List All Conversations","default":false},"description":"List All Conversations"},"agg_rev":{"name":"agg_rev","in":"query","required":false,"schema":{"type":"boolean","description":"List All Conversations","default":false},"description":"List All Conversations"},"topic_node_id":{"name":"topic_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"List All Conversations"},"description":"List All Conversations"},"topic_includes_secondary":{"name":"topic_includes_secondary","in":"query","required":false,"schema":{"type":"boolean","description":"When True, include both primary and secondary classifications under topic_node_id; when False (default), only primary tags.","default":false},"description":"When True, include both primary and secondary classifications under topic_node_id; when False (default), only primary tags."},"topic_subtree":{"name":"topic_subtree","in":"query","required":false,"schema":{"type":"boolean","description":"List All Conversations","default":false},"description":"List All Conversations"},"qa_cluster_id":{"name":"qa_cluster_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"List All Conversations"},"description":"List All Conversations"},"qa_pair_id":{"name":"qa_pair_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restrict to the conversation owning this specific Q&A pair. Narrows within qa_cluster_id."},"description":"Restrict to the conversation owning this specific Q&A pair. Narrows within qa_cluster_id."},"widget_conditions":{"name":"widget_conditions","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"List All Conversations"},"description":"List All Conversations"},"include_no_user_message_55e5b033":{"name":"include_no_user_message","in":"query","required":false,"schema":{"type":"boolean","description":"Query All Conversations","default":false},"description":"Query All Conversations"},"resolution_bucket_73903fd0":{"name":"resolution_bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(completed|transferred|disconnected|other)$"},{"type":"null"}],"description":"Query All Conversations"},"description":"Query All Conversations"},"conversation_id_dc141130":{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Query All Conversations"},"description":"Query All Conversations"},"ended_node_id_cbf02b1e":{"name":"ended_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Query All Conversations"},"description":"Query All Conversations"},"edge_from_69103fe6":{"name":"edge_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Query All Conversations"},"description":"Query All Conversations"},"edge_to_c7350b72":{"name":"edge_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Query All Conversations"},"description":"Query All Conversations"},"gbg_ecebe4ea":{"name":"gbg","in":"query","required":false,"schema":{"type":"boolean","description":"Query All Conversations","default":false},"description":"Query All Conversations"},"agg_rev_4f397087":{"name":"agg_rev","in":"query","required":false,"schema":{"type":"boolean","description":"Query All Conversations","default":false},"description":"Query All Conversations"},"topic_node_id_277b2d6f":{"name":"topic_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Query All Conversations"},"description":"Query All Conversations"},"topic_subtree_bba684b4":{"name":"topic_subtree","in":"query","required":false,"schema":{"type":"boolean","description":"Query All Conversations","default":false},"description":"Query All Conversations"},"qa_cluster_id_59fa155f":{"name":"qa_cluster_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Query All Conversations"},"description":"Query All Conversations"},"widget_conditions_a2f76214":{"name":"widget_conditions","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Query All Conversations"},"description":"Query All Conversations"},"format":{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(csv|xlsx)$","description":"Export format: csv or xlsx","default":"csv"},"description":"Export format: csv or xlsx"},"agent_id":{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Single-agent filter (deprecated \u2014 use agent_ids for multi-select; both are accepted and merged)."},"description":"Single-agent filter (deprecated \u2014 use agent_ids for multi-select; both are accepted and merged)."},"tz":{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations"},"description":"Export Conversations"},"include_no_user_message_103ea6d7":{"name":"include_no_user_message","in":"query","required":false,"schema":{"type":"boolean","description":"Export Conversations","default":false},"description":"Export Conversations"},"resolution_bucket_49cfec01":{"name":"resolution_bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(completed|transferred|disconnected|other)$"},{"type":"null"}],"description":"Export Conversations"},"description":"Export Conversations"},"conversation_id_d75ee9aa":{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations"},"description":"Export Conversations"},"ended_node_id_0b64981b":{"name":"ended_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations"},"description":"Export Conversations"},"edge_from_cbf2c3c7":{"name":"edge_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations"},"description":"Export Conversations"},"edge_to_95a6cb23":{"name":"edge_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations"},"description":"Export Conversations"},"gbg_f7ac7dc9":{"name":"gbg","in":"query","required":false,"schema":{"type":"boolean","description":"Export Conversations","default":false},"description":"Export Conversations"},"agg_rev_763a8aa1":{"name":"agg_rev","in":"query","required":false,"schema":{"type":"boolean","description":"Export Conversations","default":false},"description":"Export Conversations"},"topic_node_id_2db9dc8f":{"name":"topic_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations"},"description":"Export Conversations"},"topic_subtree_4f8e1387":{"name":"topic_subtree","in":"query","required":false,"schema":{"type":"boolean","description":"Export Conversations","default":false},"description":"Export Conversations"},"qa_cluster_id_b973de04":{"name":"qa_cluster_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations"},"description":"Export Conversations"},"widget_conditions_06fa19fd":{"name":"widget_conditions","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations"},"description":"Export Conversations"},"agent_id_9d9859ed":{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Single-agent filter (merged with agent_ids, mirrors the GET)."},"description":"Single-agent filter (merged with agent_ids, mirrors the GET)."},"tz_477f7e21":{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"IANA timezone for exported timestamps; invalid/omitted falls back to UTC."},"description":"IANA timezone for exported timestamps; invalid/omitted falls back to UTC."},"include_no_user_message_5f82a442":{"name":"include_no_user_message","in":"query","required":false,"schema":{"type":"boolean","description":"Export Conversations With Columns","default":false},"description":"Export Conversations With Columns"},"resolution_bucket_be745123":{"name":"resolution_bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(completed|transferred|disconnected|other)$"},{"type":"null"}],"description":"Export Conversations With Columns"},"description":"Export Conversations With Columns"},"conversation_id_d1e8bb22":{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations With Columns"},"description":"Export Conversations With Columns"},"ended_node_id_9282b2b3":{"name":"ended_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations With Columns"},"description":"Export Conversations With Columns"},"edge_from_380bf297":{"name":"edge_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations With Columns"},"description":"Export Conversations With Columns"},"edge_to_a0dd4003":{"name":"edge_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations With Columns"},"description":"Export Conversations With Columns"},"gbg_60a34871":{"name":"gbg","in":"query","required":false,"schema":{"type":"boolean","description":"Export Conversations With Columns","default":false},"description":"Export Conversations With Columns"},"agg_rev_2de8cca6":{"name":"agg_rev","in":"query","required":false,"schema":{"type":"boolean","description":"Export Conversations With Columns","default":false},"description":"Export Conversations With Columns"},"topic_node_id_e9143983":{"name":"topic_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations With Columns"},"description":"Export Conversations With Columns"},"topic_subtree_b2aab5f6":{"name":"topic_subtree","in":"query","required":false,"schema":{"type":"boolean","description":"Export Conversations With Columns","default":false},"description":"Export Conversations With Columns"},"qa_cluster_id_b2f58589":{"name":"qa_cluster_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations With Columns"},"description":"Export Conversations With Columns"},"widget_conditions_8a676fc8":{"name":"widget_conditions","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversations With Columns"},"description":"Export Conversations With Columns"},"agent_id_bed03356":{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Single-agent filter (merged with agent_ids, mirrors /export)."},"description":"Single-agent filter (merged with agent_ids, mirrors /export)."},"tz_74cbf382":{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Feedback Report"},"description":"Export Feedback Report"},"include_no_user_message_dd41162e":{"name":"include_no_user_message","in":"query","required":false,"schema":{"type":"boolean","description":"Export Feedback Report","default":false},"description":"Export Feedback Report"},"resolution_bucket_a97f59bc":{"name":"resolution_bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(completed|transferred|disconnected|other)$"},{"type":"null"}],"description":"Export Feedback Report"},"description":"Export Feedback Report"},"conversation_id_322e2ed1":{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Feedback Report"},"description":"Export Feedback Report"},"ended_node_id_0d43dc30":{"name":"ended_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Feedback Report"},"description":"Export Feedback Report"},"edge_from_d6e913ab":{"name":"edge_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Feedback Report"},"description":"Export Feedback Report"},"edge_to_2a552a05":{"name":"edge_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Feedback Report"},"description":"Export Feedback Report"},"gbg_882655c4":{"name":"gbg","in":"query","required":false,"schema":{"type":"boolean","description":"Export Feedback Report","default":false},"description":"Export Feedback Report"},"agg_rev_189f22ac":{"name":"agg_rev","in":"query","required":false,"schema":{"type":"boolean","description":"Export Feedback Report","default":false},"description":"Export Feedback Report"},"topic_node_id_785340de":{"name":"topic_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Feedback Report"},"description":"Export Feedback Report"},"topic_subtree_9bba5b51":{"name":"topic_subtree","in":"query","required":false,"schema":{"type":"boolean","description":"Export Feedback Report","default":false},"description":"Export Feedback Report"},"qa_cluster_id_5e4a8cb8":{"name":"qa_cluster_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Feedback Report"},"description":"Export Feedback Report"},"widget_conditions_cc028709":{"name":"widget_conditions","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Feedback Report"},"description":"Export Feedback Report"},"include":{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Get Conversation"},"description":"Get Conversation"},"download_49f05320":{"name":"download","in":"query","required":false,"schema":{"type":"boolean","description":"If true, force download instead of inline display","default":false},"description":"If true, force download instead of inline display"},"s3_key":{"name":"s3_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"S3 key if document was just uploaded and not yet persisted"},"description":"S3 key if document was just uploaded and not yet persisted"},"filename":{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filename for the download"},"description":"Filename for the download"},"content_type":{"name":"content_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Content type of the file"},"description":"Content type of the file"},"days":{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30}},"limit_bd9bdc19":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":6}},"config_id":{"name":"config_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},"format_99aaef8a":{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|text)$","description":"Export format: json or text","default":"json"},"description":"Export format: json or text"},"include_tools_a3be1cb4":{"name":"include_tools","in":"query","required":false,"schema":{"type":"boolean","description":"Include tool outputs and RAG chunks (Full) or exclude them (Clean)","default":true},"description":"Include tool outputs and RAG chunks (Full) or exclude them (Clean)"},"tz_3b01eea3":{"name":"tz","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Export Conversation Transcript"},"description":"Export Conversation Transcript"},"agent_id_ac5bdf63":{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Single-agent filter (merged with agent_ids, mirrors the export endpoints)."},"description":"Single-agent filter (merged with agent_ids, mirrors the export endpoints)."},"include_no_user_message_8dba6fc1":{"name":"include_no_user_message","in":"query","required":false,"schema":{"type":"boolean","description":"Create Conversation Export Job","default":false},"description":"Create Conversation Export Job"},"resolution_bucket_c2f08cf0":{"name":"resolution_bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(completed|transferred|disconnected|other)$"},{"type":"null"}],"description":"Create Conversation Export Job"},"description":"Create Conversation Export Job"},"conversation_id_cf612bbb":{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Create Conversation Export Job"},"description":"Create Conversation Export Job"},"ended_node_id_283ca92d":{"name":"ended_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Create Conversation Export Job"},"description":"Create Conversation Export Job"},"edge_from_8a3388a5":{"name":"edge_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Create Conversation Export Job"},"description":"Create Conversation Export Job"},"edge_to_297e2a72":{"name":"edge_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Create Conversation Export Job"},"description":"Create Conversation Export Job"},"gbg_075811ec":{"name":"gbg","in":"query","required":false,"schema":{"type":"boolean","description":"Create Conversation Export Job","default":false},"description":"Create Conversation Export Job"},"agg_rev_9c65a851":{"name":"agg_rev","in":"query","required":false,"schema":{"type":"boolean","description":"Create Conversation Export Job","default":false},"description":"Create Conversation Export Job"},"topic_node_id_07a5636e":{"name":"topic_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Create Conversation Export Job"},"description":"Create Conversation Export Job"},"topic_subtree_7413e456":{"name":"topic_subtree","in":"query","required":false,"schema":{"type":"boolean","description":"Create Conversation Export Job","default":false},"description":"Create Conversation Export Job"},"qa_cluster_id_27fa135b":{"name":"qa_cluster_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Create Conversation Export Job"},"description":"Create Conversation Export Job"},"widget_conditions_27796d51":{"name":"widget_conditions","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Create Conversation Export Job"},"description":"Create Conversation Export Job"}},"responses":{"ValidationError":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}