{"openapi":"3.1.0","info":{"title":"🤖 Automatos AI API","description":"\n    ## 🚀 Comprehensive API for Automatos AI Platform\n    \n    > **World's Most Advanced Multi-Agent AI Orchestration Platform**\n    \n    ### 🎯 Core Features & Capabilities\n    \n    #### 🤖 **Agent Management**\n    - **Agent Types**: Custom, System, and Specialized agents\n    - **Agent Configuration**: Dynamic configuration with performance metrics\n    - **Skills Integration**: Cognitive, technical, and communication skills\n    - **Pattern Recognition**: Coordination, communication, and decision patterns\n    \n    #### 👥 **Multi-Agent Systems** \n    - **Collaborative Reasoning**: Consensus mechanisms & conflict resolution\n    - **Agent Coordination**: Sequential, parallel, hierarchical, mesh, and adaptive strategies\n    - **Behavior Monitoring**: Real-time emergent behavior analysis\n    - **System Optimization**: Multi-objective performance optimization\n    \n    #### 🌐 **Field Theory Integration**\n    - **Field Representations**: Scalar, vector, and tensor fields\n    - **Field Propagation**: Gradient-based influence propagation\n    - **Context Interactions**: Mathematical field-based modeling\n    - **Dynamic Management**: Real-time field evolution and optimization\n    \n    #### 🔄 **Workflow Orchestration**\n    - **Workflow Design**: Visual workflow creation and management\n    - **Execution Engine**: Robust workflow execution with monitoring\n    - **Agent Assignment**: Dynamic agent allocation to workflow tasks\n    - **Progress Tracking**: Real-time execution monitoring\n    \n    #### 📄 **Document Processing**\n    - **RAG Integration**: Retrieval-Augmented Generation systems\n    - **Document Analysis**: Advanced text analysis and processing\n    - **Knowledge Extraction**: Intelligent information extraction\n    - **Multi-format Support**: PDF, DOC, TXT, and more\n    \n    #### 🧠 **Context Engineering**\n    - **Information Theory**: Shannon entropy, mutual information\n    - **Vector Operations**: Embeddings, similarity, clustering\n    - **Mathematical Foundations**: Probability theory, graph theory, optimization\n    - **Statistical Analysis**: Advanced statistical modeling and analysis\n    \n    #### 📊 **Evaluation & Analytics**\n    - **Performance Metrics**: Multi-dimensional agent evaluation\n    - **Quality Assessment**: Comprehensive quality scoring\n    - **Emergence Tracking**: Emergent capability monitoring\n    - **System Analytics**: Real-time system performance analytics\n    \n    #### 🧩 **Memory Systems**\n    - **Hierarchical Memory**: Multi-level memory architectures\n    - **Memory Management**: Intelligent memory allocation and retrieval\n    - **Context Storage**: Long-term context preservation\n    - **Memory Optimization**: Efficient memory usage strategies\n    \n    ### 🔗 **API Endpoints Overview**\n    \n    | Endpoint Group | Base URL | Description |\n    |---|---|---|\n    | 🤖 **Agents** | `/api/agents` | Agent lifecycle management |\n    | 🌐 **Field Theory** | `/api/field-theory` | Context field management |\n    | 🔄 **Workflows** | `/api/workflows` | Workflow orchestration |\n    | 📄 **Documents** | `/api/documents` | Document processing |\n    | 🧠 **Context Engineering** | `/api/context-engineering` | Mathematical foundations |\n    | 📊 **Evaluation** | `/api/evaluation` | System evaluation |\n    | ⚙️ **System** | `/api/system` | System configuration |\n    \n    ### 🔌 **Real-time Features**\n    - **WebSocket Endpoint**: `/ws` - Real-time communication\n    - **Live Notifications**: System-wide event streaming\n    \n    ### 🎛️ **Quick Start**\n    1. **Health Check**: `GET /health` - Verify system status\n    2. **Create Agent**: `POST /api/agents` - Create your first agent\n    3. **Add Skills**: `POST /api/agents/{id}/skills` - Enhance agent capabilities\n    4. **Create Workflow**: `POST /api/workflows` - Design workflow\n    5. **Execute**: `POST /api/workflows/{id}/execute` - Run workflow\n    \n    ### 📚 **Authentication**\n    - **API Key**: Include `X-API-Key` header for authenticated requests\n    - **Session-based**: WebSocket connections support session authentication\n    \n    ### ⚡ **Performance & Scaling**\n    - **Load Balancing**: Automatic agent load balancing\n    - **Horizontal Scaling**: Multi-instance support\n    - **Caching**: Intelligent result caching\n    - **Rate Limiting**: Configurable rate limits per endpoint\n    \n    ### 📝 **Response Formats**\n    All endpoints return consistent JSON responses with:\n    - `status`: Success/error status\n    - `data`: Response payload\n    - `message`: Human-readable description\n    - `timestamp`: ISO 8601 timestamp\n    \n    ---\n    \n    **🌟 Ready to build the future of AI? Start exploring the endpoints below!**\n    ","contact":{"name":"Automatos AI Development Team","url":"https://github.com/AutomatosAI/automatos-ai","email":"support@automatos.ai"},"license":{"name":"Apache License 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0"},"version":"dev"},"servers":[{"url":"http://localhost:8000","description":"Development server"},{"url":"http://localhost:8000","description":"Production server"}],"paths":{"/api/agents/types":{"get":{"tags":["agents"],"summary":"Get Agent Types","description":"Get available agent types","operationId":"get_agent_types_api_agents_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agents/stats":{"get":{"tags":["agents"],"summary":"Get Agent Stats","description":"Get comprehensive agent statistics","operationId":"get_agent_stats_api_agents_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agents/bulk":{"post":{"tags":["agents"],"summary":"Create Agents Bulk","description":"Create multiple agents at once","operationId":"create_agents_bulk_api_agents_bulk_post","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentCreate"},"type":"array","title":"Agents"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentResponse"},"type":"array","title":"Response Create Agents Bulk Api Agents Bulk Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/":{"post":{"tags":["agents"],"summary":"Create Agent","description":"Create a new agent with enhanced fields; it starts on the workspace's default model (PRD-287 D23).","operationId":"create_agent_api_agents__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agents"],"summary":"List Agents","description":"List agents with enhanced filtering and pagination","operationId":"list_agents_api_agents__get","parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentStatus"},{"type":"null"}],"title":"Status"}},{"name":"agent_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentType"},{"type":"null"}],"title":"Agent Type"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"include_workspace_system","in":"query","required":false,"schema":{"type":"boolean","description":"When true, include the workspace's system agents (e.g. Auto) in the result set. Used by task assignee pickers so Auto can be assigned work without being shown in the main Roster.","default":false,"title":"Include Workspace System"},"description":"When true, include the workspace's system agents (e.g. Auto) in the result set. Used by task assignee pickers so Auto can be assigned work without being shown in the main Roster."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentResponse"},"title":"Response List Agents Api Agents  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/org-chart":{"get":{"tags":["agents"],"summary":"Get Org Chart","description":"Get agents organized as an org-chart hierarchy tree.\n\nReturns nodes (one per agent), edges (reports_to relationships),\nand a distinct team list for grouping in the UI.","operationId":"get_org_chart_api_agents_org_chart_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agents/{agent_id}/status":{"get":{"tags":["agents"],"summary":"Get Agent Status","description":"Get current status of a specific agent","operationId":"get_agent_status_api_agents__agent_id__status_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}":{"get":{"tags":["agents"],"summary":"Get Agent","description":"An agent with skills, tools and its session tool groups; ``?groups=a,b`` previews others (#942)","operationId":"get_agent_api_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"groups","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Groups"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["agents"],"summary":"Update Agent","description":"Update an existing agent","operationId":"update_agent_api_agents__agent_id__put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agents"],"summary":"Delete Agent","description":"Delete an agent and all related records","operationId":"delete_agent_api_agents__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/skills":{"get":{"tags":["agents"],"summary":"Get Agent Skills","description":"Get skills for a specific agent","operationId":"get_agent_skills_api_agents__agent_id__skills_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agents"],"summary":"Add Agent Skills","description":"Add skills to an agent","operationId":"add_agent_skills_api_agents__agent_id__skills_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"},"title":"Skill Ids"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/skills/{skill_id}":{"delete":{"tags":["agents"],"summary":"Remove Agent Skill","description":"Remove a single skill from an agent","operationId":"remove_agent_skill_api_agents__agent_id__skills__skill_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"skill_id","in":"path","required":true,"schema":{"type":"integer","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/reindex-embeddings":{"post":{"tags":["agents"],"summary":"Reindex Embeddings","description":"Re-embed all active agents in the workspace for semantic routing.\n\nUse ``force=true`` to regenerate even when the semantic text hash has not changed.","operationId":"reindex_embeddings_api_agents_reindex_embeddings_post","parameters":[{"name":"force","in":"query","required":false,"schema":{"type":"boolean","description":"Force re-embed even if text unchanged","default":false,"title":"Force"},"description":"Force re-embed even if text unchanged"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/execute":{"post":{"tags":["agents"],"summary":"Execute Agent","description":"Files the run as a ticket assigned to the agent and answers with its id; the board runs it.\nA repeat of a request with the same ``Idempotency-Key`` answers with the run it started.","operationId":"execute_agent_api_agents__agent_id__execute_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Execute Agent Api Agents  Agent Id  Execute Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/memory/end-users/{end_user_id}":{"put":{"tags":["End-user memory"],"summary":"Record Consent","description":"Records (or updates) the product's consent and retention for one end user. A new end user of a product's\nworkspace recorded with no ``retention_days`` gets the product's default (PRD-274 W5e, decision 28). An\nupdate changes their retention only when it sends ``retention_days`` (an explicit ``null``: kept until\nerased), so a consent refresh in the same shape keeps what they were told.","operationId":"record_consent_api_memory_end_users__end_user_id__put","parameters":[{"name":"end_user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"The product's own id for the person (letters, digits and . _ : @ -)","title":"End User Id"},"description":"The product's own id for the person (letters, digits and . _ : @ -)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserConsent"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Record Consent Api Memory End Users  End User Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["End-user memory"],"summary":"Erase End User","description":"Erases the end user (GDPR): every memory in their namespace, their conversations' sessions, their\nconversations, then their consent record. Any step that fails is a 503 that keeps the record and its\nerase mark, so the next erase finishes it; nothing is reported erased until all of it is.","operationId":"erase_end_user_api_memory_end_users__end_user_id__delete","parameters":[{"name":"end_user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"The product's own id for the person (letters, digits and . _ : @ -)","title":"End User Id"},"description":"The product's own id for the person (letters, digits and . _ : @ -)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Erase End User Api Memory End Users  End User Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/memory/end-users/{end_user_id}/memories":{"post":{"tags":["End-user memory"],"summary":"Store End User Memory","description":"Stores one fact about the end user; their consent must be on record, and the write is made as\ntheirs (``end_user_turn``): tagged with their subject, and taken back if their erase starts meanwhile.","operationId":"store_end_user_memory_api_memory_end_users__end_user_id__memories_post","parameters":[{"name":"end_user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"The product's own id for the person (letters, digits and . _ : @ -)","title":"End User Id"},"description":"The product's own id for the person (letters, digits and . _ : @ -)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Store End User Memory Api Memory End Users  End User Id  Memories Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["End-user memory"],"summary":"List End User Memories","description":"The end user's own facts.","operationId":"list_end_user_memories_api_memory_end_users__end_user_id__memories_get","parameters":[{"name":"end_user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"The product's own id for the person (letters, digits and . _ : @ -)","title":"End User Id"},"description":"The product's own id for the person (letters, digits and . _ : @ -)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List End User Memories Api Memory End Users  End User Id  Memories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/memory/end-users/{end_user_id}/memories/search":{"get":{"tags":["End-user memory"],"summary":"Search End User Memories","description":"The end user's facts and the workspace's, never another end user's (§5.5).","operationId":"search_end_user_memories_api_memory_end_users__end_user_id__memories_search_get","parameters":[{"name":"end_user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"The product's own id for the person (letters, digits and . _ : @ -)","title":"End User Id"},"description":"The product's own id for the person (letters, digits and . _ : @ -)"},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Search End User Memories Api Memory End Users  End User Id  Memories Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/memory/end-users/{end_user_id}/resume":{"get":{"tags":["End-user memory"],"summary":"Resume End User","description":"Where the end user left off (§5.7, \"where were we\"): their recent conversations with each one's\ncheckpoint, and the decisions, open loops and next steps in their facts and the workspace's, never\nanother end user's. The workspace's are read as the other routes read them (``_readable``); for a key,\nneither theirs nor the workspace's includes anything an audience limits.","operationId":"resume_end_user_api_memory_end_users__end_user_id__resume_get","parameters":[{"name":"end_user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"The product's own id for the person (letters, digits and . _ : @ -)","title":"End User Id"},"description":"The product's own id for the person (letters, digits and . _ : @ -)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resume End User Api Memory End Users  End User Id  Resume Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/memory/end-users/{end_user_id}/memories/{memory_id}":{"delete":{"tags":["End-user memory"],"summary":"Delete End User Memory","description":"Deletes one of the end user's facts, from their namespace only: never another end user's or the\nworkspace's. A member may delete any of them. A key may delete any of them whoever wrote it (the key\nitself, another key, a member, or the platform distilling the end user's own conversation), so a\nproduct can forget what it shows the person; never one an audience limits or one private to anyone\nbut the end user. An id that is no point id is no memory of anyone's: a 404, never sent to the store.","operationId":"delete_end_user_memory_api_memory_end_users__end_user_id__memories__memory_id__delete","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}},{"name":"end_user_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"The product's own id for the person (letters, digits and . _ : @ -)","title":"End User Id"},"description":"The product's own id for the person (letters, digits and . _ : @ -)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete End User Memory Api Memory End Users  End User Id  Memories  Memory Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/dead":{"get":{"tags":["Jobs"],"summary":"List Dead Jobs","description":"A page of the workspace's dead jobs, newest first: what failed and why, never their payloads.\n``total`` counts all of them, so a manager can page through a backlog of any size.","operationId":"list_dead_jobs_api_v1_jobs_dead_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Dead Jobs Api V1 Jobs Dead Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/retry":{"post":{"tags":["Jobs"],"summary":"Retry Dead Job","description":"Re-queues a dead job now, its attempts reset.","operationId":"retry_dead_job_api_v1_jobs__job_id__retry_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Retry Dead Job Api V1 Jobs  Job Id  Retry Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}":{"delete":{"tags":["Jobs"],"summary":"Clear Dead Job","description":"Deletes a dead job.","operationId":"clear_dead_job_api_v1_jobs__job_id__delete","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Clear Dead Job Api V1 Jobs  Job Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/callbacks/signing-secret":{"get":{"tags":["callbacks"],"summary":"Read Signing Secret","description":"The secret this workspace's callbacks are signed with, and how to check one.","operationId":"read_signing_secret_api_v1_callbacks_signing_secret_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Read Signing Secret Api V1 Callbacks Signing Secret Get"}}}}}}},"/api/v1/callbacks/signing-secret/rotate":{"post":{"tags":["callbacks"],"summary":"Rotate Callback Signing Secret","description":"A new secret; callbacks sent from now on are signed with it, so give it to the receiver.","operationId":"rotate_callback_signing_secret_api_v1_callbacks_signing_secret_rotate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Rotate Callback Signing Secret Api V1 Callbacks Signing Secret Rotate Post"}}}}}}},"/api/partner-packs":{"get":{"tags":["partner-packs"],"summary":"List Partner Packs","description":"The packs this workspace has installed, and the tools each one gives an agent that lists it.","operationId":"list_partner_packs_api_partner_packs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Partner Packs Api Partner Packs Get"}}}}}}},"/api/partner-packs/{name}":{"put":{"tags":["partner-packs"],"summary":"Install Partner Pack","description":"Install the pack, or replace the one of its name. 422 says what a pack must change.","operationId":"install_partner_pack_api_partner_packs__name__put","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Install Partner Pack Api Partner Packs  Name  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["partner-packs"],"summary":"Remove Partner Pack","description":"Remove the pack: its tools are offered to no agent from the next turn.","operationId":"remove_partner_pack_api_partner_packs__name__delete","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Partner Pack Api Partner Packs  Name  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/models/platform-default":{"get":{"tags":["models"],"summary":"Get Platform Default Route","description":"The model a new agent, and an Auto that follows the platform default, runs on:\n``{\"provider\", \"model_id\"}`` from ``core/llm/new_agent_model.default_route``\n(system_settings orchestrator_llm, set by a platform admin). A member of the\nworkspace who may read its agents (``agents:read``, which every workspace role\nholds) may read it: the UI pre-fills new agents and Settings > Orchestrator's Reset\nwith it, so no model id is kept in the frontend. A plain ``def``: the settings read is\na synchronous query, run in the threadpool.","operationId":"get_platform_default_route_api_models_platform_default_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Get Platform Default Route Api Models Platform Default Get"}}}}}}},"/api/models/policy":{"get":{"tags":["models"],"summary":"Get Install Model Policy","description":"PRD-284 US-302: install-wide model lock status for Settings and agent pickers.\n\nReturns ``{locked, provider, allowed_models, default_model, system_model,\nembedding_model}`` with no secrets. Protected with ``agents:read`` (same as\n``/platform-default``).\n\nPRD-285 §5.9: a lock on the install's own model server answers the same shape with the provider\n``own_server``, plus ``provider_label`` and ``host`` (the server's scheme, host and port), the\nhost only for a caller who may read the install's settings (``may_see_install_host``: the local\nedition, or a system admin), else null. A Bedrock lock's answer is unchanged.\n\nPRD-293 US-216: locked or not, the answer also carries ``workspace_keys_allowed`` (whether a\nworkspace may hold model keys of its own here) and ``controls``: for each control the policy can\nlock, ``{locked, reason}``, the reason a sentence naming \"the operator\" and the rule\n(``core/llm/model_policy_locks.py``). They say what the server already refuses; nothing changes\nwhat it refuses.","operationId":"get_install_model_policy_api_models_policy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Install Model Policy Api Models Policy Get"}}}}}}},"/api/models/where-calls-go":{"get":{"tags":["models"],"summary":"Get Where Calls Go","description":"PRD-285 US-203 (§5.11, D-11): each model call that chooses its own provider (the\norchestrator and system tiers, memory distilling, the decision engine, the spoken model, the\nblog cover image, embeddings, rerank), where it goes now, and whether that is this install's\nown model server (``core/llm/call_map.py``). Names providers and models only: no key, no\naddress path, nothing from a workspace's own keys. A plain ``def``: it reads settings and the\ndatabase in the threadpool.\nIt lists the install's own settings, so it answers only a caller who may read them\n(``may_see_install_host``: the local edition, or a system admin); anyone else gets a 403.","operationId":"get_where_calls_go_api_models_where_calls_go_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Where Calls Go Api Models Where Calls Go Get"}}}}}}},"/api/models/suggested/{provider}":{"put":{"tags":["models"],"summary":"Set Suggested Model","description":"Make ``body.model_id`` the provider's suggested model; the one before is unmarked.","operationId":"set_suggested_model_api_models_suggested__provider__put","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestedModelIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestedModelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["models"],"summary":"Clear Suggested Model","description":"Put the provider back on this release's suggestion; the answer is the model suggested now, or none.","operationId":"clear_suggested_model_api_models_suggested__provider__delete","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestedModelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/{workflow_id}/status":{"get":{"tags":["widget-workflow-control"],"summary":"Get workflow status with steps","description":"Return the current status of a workflow together with per-stage step\ninformation for the most recent execution.","operationId":"get_workflow_status_api_workflows__workflow_id__status_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/{workflow_id}/pause":{"post":{"tags":["widget-workflow-control"],"summary":"Pause a running workflow","description":"Pause a currently running workflow execution.\n\nOnly executions in ``running`` status can be paused.","operationId":"pause_workflow_api_workflows__workflow_id__pause_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/{workflow_id}/resume":{"post":{"tags":["widget-workflow-control"],"summary":"Resume a paused workflow","description":"Resume a previously paused workflow execution.\n\nOnly executions in ``paused`` status can be resumed.","operationId":"resume_workflow_api_workflows__workflow_id__resume_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/{workflow_id}/cancel":{"post":{"tags":["widget-workflow-control"],"summary":"Cancel a running or paused workflow","description":"Cancel a workflow execution.\n\nExecutions in ``running`` or ``paused`` status can be cancelled.\nTerminal states (completed, failed, cancelled) are rejected.","operationId":"cancel_workflow_api_workflows__workflow_id__cancel_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows":{"get":{"tags":["workflow-enhanced"],"summary":"List Workflows","operationId":"list_workflows_api_workflows_get","parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"owner","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by owner exact match","title":"Owner"},"description":"Filter by owner exact match"},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by tag (contained in tags array)","title":"Tag"},"description":"Filter by tag (contained in tags array)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workflow-enhanced"],"summary":"Create Workflow","description":"Create a new workflow with enhanced validation and error handling","operationId":"create_workflow_api_workflows_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Workflow Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/active":{"get":{"tags":["workflow-enhanced"],"summary":"Get Active Workflows","description":"Get all currently active workflows with live status","operationId":"get_active_workflows_api_workflows_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/workflows/{workflow_id}":{"get":{"tags":["workflow-enhanced"],"summary":"Get Workflow","description":"Get individual workflow by ID","operationId":"get_workflow_api_workflows__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["workflow-enhanced"],"summary":"Update Workflow","description":"Update workflow","operationId":"update_workflow_api_workflows__workflow_id__put","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Workflow Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workflow-enhanced"],"summary":"Delete Workflow","description":"Delete workflow","operationId":"delete_workflow_api_workflows__workflow_id__delete","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/cleanup/old":{"delete":{"tags":["workflow-enhanced"],"summary":"Cleanup Old Workflows","description":"Delete the caller's workspace's workflows older than ``days`` days, with their executions.","operationId":"cleanup_old_workflows_api_workflows_cleanup_old_delete","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":3650,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/{workflow_id}/duplicate":{"post":{"tags":["workflow-enhanced"],"summary":"Duplicate Workflow","description":"Duplicate an existing workflow with optional modifications","operationId":"duplicate_workflow_api_workflows__workflow_id__duplicate_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Duplicate Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/stats/dashboard":{"get":{"tags":["workflow-enhanced"],"summary":"Get Workflow Dashboard Stats","description":"Get comprehensive workflow statistics for dashboard","operationId":"get_workflow_dashboard_stats_api_workflows_stats_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/workflows/{workflow_id}/live-progress":{"get":{"tags":["workflow-enhanced"],"summary":"Get Workflow Live Progress","description":"Get live progress for a specific workflow execution","operationId":"get_workflow_live_progress_api_workflows__workflow_id__live_progress_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/{workflow_id}/execute-advanced":{"post":{"tags":["workflow-enhanced"],"summary":"Execute Workflow Advanced","description":"Execute workflow with advanced options and live progress tracking","operationId":"execute_workflow_advanced_api_workflows__workflow_id__execute_advanced_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Execution Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/executions/":{"get":{"tags":["workflow-enhanced"],"summary":"List Executions","description":"List the caller's workspace's workflow executions, newest first, with filtering","operationId":"list_executions_api_workflows_executions__get","parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/executions/{execution_id}":{"get":{"tags":["workflow-enhanced"],"summary":"Get Execution Status","description":"The status of one of the caller's workspace's workflow executions","operationId":"get_execution_status_api_workflows_executions__execution_id__get","parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"integer","title":"Execution Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/executions/{execution_id}/cancel":{"post":{"tags":["workflow-enhanced"],"summary":"Cancel Execution","description":"Cancel a running or pending execution of the caller's workspace","operationId":"cancel_execution_api_workflows_executions__execution_id__cancel_post","parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"integer","title":"Execution Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/templates/recommended":{"get":{"tags":["workflow-enhanced"],"summary":"Get Recommended Workflow Templates","description":"Recommended workflow templates, built from the caller's workspace's own workflows","operationId":"get_recommended_workflow_templates_api_workflows_templates_recommended_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/workflow-templates":{"get":{"tags":["workflow-templates"],"summary":"List Workflow Templates","description":"List workflow templates with filtering and pagination.\n\nQuery Parameters:\n- is_featured: Show only featured templates\n- is_public: Show only public templates (default: true)\n- search: Search in name and description\n- skip: Number of records to skip for pagination\n- limit: Maximum number of records to return (1-100)\n- sort_by: Sort field (popularity, created_at, use_count, average_rating, name)","operationId":"list_workflow_templates_api_workflow_templates_get","parameters":[{"name":"is_featured","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Featured"}},{"name":"is_public","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"title":"Is Public"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","pattern":"^(popularity|created_at|use_count|average_rating|name)$","default":"popularity","title":"Sort By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workflow-templates"],"summary":"Create Workflow Template","description":"Create a new workflow template.\n\nRequired fields:\n- template_id: Unique identifier (e.g., \"my-custom-template\")\n- name: Display name\n- description: Description of what the template does\n- template_definition: JSON structure with steps, agents, config\n\nOptional fields:\n- tags: Array of tags\n- recommended_agents: Array of agent type names\n- required_tools: Array of tool names\n- is_public: Boolean (default: true)\n- is_featured: Boolean (default: false)","operationId":"create_workflow_template_api_workflow_templates_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Template Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-templates/{template_id}":{"get":{"tags":["workflow-templates"],"summary":"Get Workflow Template","description":"Get a single workflow template by its template_id","operationId":"get_workflow_template_api_workflow_templates__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["workflow-templates"],"summary":"Update Workflow Template","description":"Update an existing workflow template.\nSystem templates cannot be modified.","operationId":"update_workflow_template_api_workflow_templates__template_id__put","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Template Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workflow-templates"],"summary":"Delete Workflow Template","description":"Delete a workflow template.\nSystem templates cannot be deleted.","operationId":"delete_workflow_template_api_workflow_templates__template_id__delete","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-templates/{template_id}/use":{"post":{"tags":["workflow-templates"],"summary":"Record Template Usage","description":"Record that a template was used to create a workflow.\nUpdates use_count and last_used_at.","operationId":"record_template_usage_api_workflow_templates__template_id__use_post","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-templates/categories/list":{"get":{"tags":["workflow-templates"],"summary":"List Template Categories","description":"Get list of all unique tags used across templates","operationId":"list_template_categories_api_workflow_templates_categories_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/workflow-templates/featured/list":{"get":{"tags":["workflow-templates"],"summary":"List Featured Templates","description":"Get featured workflow templates","operationId":"list_featured_templates_api_workflow_templates_featured_list_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes":{"get":{"tags":["workflow-recipes"],"summary":"List Workflow Recipes","description":"List workflow recipes with filtering and pagination.\n\nQuery Parameters:\n- is_featured: Show only featured recipes\n- is_public: Show only public recipes (default: true)\n- search: Search in name and description\n- skip: Number of records to skip for pagination\n- limit: Maximum number of records to return (1-100)\n- sort_by: Sort field (popularity, created_at, use_count, average_rating, name)","operationId":"list_workflow_recipes_api_workflow_recipes_get","parameters":[{"name":"is_featured","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Featured"}},{"name":"is_public","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"title":"Is Public"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","pattern":"^(popularity|created_at|use_count|average_rating|name)$","default":"popularity","title":"Sort By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workflow-recipes"],"summary":"Create Workflow Recipe","description":"Create a new workflow recipe.\n\nRequired fields:\n- template_id: Unique identifier (e.g., \"my-custom-recipe\")\n- name: Display name\n- description: Description of what the recipe does\n- template_definition: JSON structure with steps, agents, config\n- steps: Array of step definitions (required, each step needs step_id, order, agent_id, prompt_template)\n\nOptional fields:\n- tags: Array of tags\n- inputs: Input schema\n- outputs: Output schema\n- execution_config: Runtime behavior config (defaults provided if omitted)\n- schedule_config: Scheduling configuration\n- recommended_agents: Array of agent type names\n- required_tools: Array of tool names\n- is_public: Boolean (default: true)\n- is_featured: Boolean (default: false)","operationId":"create_workflow_recipe_api_workflow_recipes_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Recipe Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes/stats/dashboard":{"get":{"tags":["workflow-recipes"],"summary":"Get Recipe Stats Dashboard","description":"Aggregate dashboard stats across all workspace recipes and their executions.\nReturns overview metrics, execution status breakdown, and top recipes by usage.","operationId":"get_recipe_stats_dashboard_api_workflow_recipes_stats_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/workflow-recipes/{recipe_id}":{"get":{"tags":["workflow-recipes"],"summary":"Get Workflow Recipe","description":"Get a single workflow recipe by its template_id, or by the number the list\nshows (F277). Returns recipe data with agent details populated for each step.","operationId":"get_workflow_recipe_api_workflow_recipes__recipe_id__get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["workflow-recipes"],"summary":"Update Workflow Recipe","description":"Update an existing workflow recipe.\nSystem recipes cannot be modified.","operationId":"update_workflow_recipe_api_workflow_recipes__recipe_id__put","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Recipe Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workflow-recipes"],"summary":"Delete Workflow Recipe","description":"Delete a workflow recipe, by its template id or its number (F277).\nSystem recipes cannot be deleted.","operationId":"delete_workflow_recipe_api_workflow_recipes__recipe_id__delete","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes/{recipe_id}/use":{"post":{"tags":["workflow-recipes"],"summary":"Record Recipe Usage","description":"Record that a recipe was used to create a workflow.\nUpdates use_count and last_used_at.","operationId":"record_recipe_usage_api_workflow_recipes__recipe_id__use_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes/categories/list":{"get":{"tags":["workflow-recipes"],"summary":"List Recipe Categories","description":"Get list of all unique tags used across workspace recipes","operationId":"list_recipe_categories_api_workflow_recipes_categories_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/workflow-recipes/featured/list":{"get":{"tags":["workflow-recipes"],"summary":"List Featured Recipes","description":"Get featured workflow recipes","operationId":"list_featured_recipes_api_workflow_recipes_featured_list_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes/{recipe_id}/execute":{"post":{"tags":["workflow-recipes"],"summary":"Execute Recipe","description":"Execute a recipe directly — step by step, no 9-stage pipeline.\n\nCreates a RecipeExecution record and launches execute_recipe_direct()\nas an async task. Each step calls its assigned agent with filtered\nComposio actions. Results stored in RecipeExecution.step_results.\n\nBody (optional):\n- input_data: Dict matching the recipe's inputs schema\n- wait_for_me: true or false. This run's card waits for the owner's check in\n  Review, or closes itself (F242). Left out, the playbook's own setting decides.\n\n``recipe_id`` is the playbook's template id or its number (F277). A playbook\nwith a step that has no agent is refused before anything runs (F270).","operationId":"execute_recipe_api_workflow_recipes__recipe_id__execute_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"default":{},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes/{recipe_id}/executions/{execution_id}/rerun":{"post":{"tags":["workflow-recipes"],"summary":"Rerun Recipe Execution","description":"PRD-204 S7: rerun a prior execution -- the platform's rerun primitive.\n\nCreates a NEW RecipeExecution copying the original's input_data\n(retry_of lineage, attempt_count+1) with optional per-execution\nstep_overrides; the shared playbook definition is never mutated.\n\nRouted through the workspace approval policy with the ORIGINAL run's\nllm_usage dollar sum as the estimate: auto path launches immediately;\nask path parks a durable ApprovalGrant (approvals inbox) and returns\n202-shaped JSON. A live watch on the original execution follows the\nrerun (same watch, one verdict).\n\nBody (optional):\n- step_overrides: {step_id: {\"prompt_template\": \"...\"}}\n\nThe playbook and the run are found by id or by number (F277); a playbook\nwith a step that has no agent is refused before anything changes (F270).","operationId":"rerun_recipe_execution_api_workflow_recipes__recipe_id__executions__execution_id__rerun_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}},{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"default":{},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes/{recipe_id}/executions/{execution_id}":{"get":{"tags":["workflow-recipes"],"summary":"Get Recipe Execution Detail","description":"Get detailed status of a specific recipe execution.\n\nReturns step-level results, current progress, and overall status.\nUsed by frontend for polling execution progress.","operationId":"get_recipe_execution_detail_api_workflow_recipes__recipe_id__executions__execution_id__get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}},{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes/{recipe_id}/executions/{execution_id}/cancel":{"post":{"tags":["workflow-recipes"],"summary":"Cancel Execution","description":"Cancel a running or pending execution.","operationId":"cancel_execution_api_workflow_recipes__recipe_id__executions__execution_id__cancel_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}},{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes/{recipe_id}/executions/{execution_id}/steps/{step_order}/logs":{"get":{"tags":["workflow-recipes"],"summary":"Get Step Full Logs","description":"Fetch full verbose step log from S3 on demand.\n\nThe DB stores only compact summaries. This endpoint fetches the\nfull agent output, tool call results, and message history from S3.","operationId":"get_step_full_logs_api_workflow_recipes__recipe_id__executions__execution_id__steps__step_order__logs_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}},{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Id"}},{"name":"step_order","in":"path","required":true,"schema":{"type":"integer","title":"Step Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes/{recipe_id}/learn":{"post":{"tags":["workflow-recipes"],"summary":"Analyze Execution Learning","description":"Trigger learning analysis on a completed recipe execution (Stage 6).\n\nBody:\n- execution_id: The execution_id to analyze (required)\n\nReturns patterns, suggestions, and performance_metrics.","operationId":"analyze_execution_learning_api_workflow_recipes__recipe_id__learn_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes/{recipe_id}/assess-quality":{"post":{"tags":["workflow-recipes"],"summary":"Assess Execution Quality","description":"Trigger quality assessment on a recipe execution (Stage 7).\n\nBody:\n- execution_id: The execution_id to assess (required)\n- learnings: Optional learnings dict from /learn endpoint for reliability scoring\n\nReturns quality_score, breakdown, grade, and bottlenecks.","operationId":"assess_execution_quality_api_workflow_recipes__recipe_id__assess_quality_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes/{recipe_id}/suggestions":{"get":{"tags":["workflow-recipes"],"summary":"Get Recipe Suggestions","description":"Get improvement suggestions from the recipe's learning_data.\n\nReturns latest suggestions, patterns, and performance metrics\nextracted from previous learning analyses.","operationId":"get_recipe_suggestions_api_workflow_recipes__recipe_id__suggestions_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes/{recipe_id}/executions":{"get":{"tags":["workflow-recipes"],"summary":"List Recipe Executions","description":"List executions for a recipe with optional status filter.\n\nQuery Parameters:\n- status: Filter by execution status (pending, running, completed, failed, cancelled)\n- skip: Pagination offset\n- limit: Pagination limit (1-100, default 20)\n\nReturns list of executions with quality scores.","operationId":"list_recipe_executions_api_workflow_recipes__recipe_id__executions_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes/submit":{"post":{"tags":["workflow-recipes"],"summary":"Submit Recipe To Marketplace","description":"Submit a workspace recipe to the marketplace for approval.\nTrusted users (5+ approved items) auto-publish; others go to approval queue.\n\nRequired fields:\n- recipe_id: ID of the workspace recipe to submit (template_id)\n- category: Optional marketplace category (uses recipe category if not provided)\n- icon: Optional marketplace icon URL","operationId":"submit_recipe_to_marketplace_api_workflow_recipes_submit_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Recipe Data"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflow-recipes/install/{recipe_id}":{"post":{"tags":["workflow-recipes"],"summary":"Install Recipe From Marketplace","description":"Install a marketplace recipe to the user's workspace.\nAutomatically clones the recipe and handles name collisions.\nOptionally auto-clones referenced agents if available in marketplace.","operationId":"install_recipe_from_marketplace_api_workflow_recipes_install__recipe_id__post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/recipe/{webhook_id}":{"get":{"tags":["webhooks"],"summary":"Recipe Webhook Verify","description":"Verification endpoint — Jira/GitHub/Slack send GET to validate the URL exists.","operationId":"recipe_webhook_verify_api_webhooks_recipe__webhook_id__get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["webhooks"],"summary":"Recipe Webhook","description":"Trigger a recipe execution via webhook.\n\nThe webhook_id is a persistent secret stored in the recipe's\nschedule_config.webhook_id — the URL is the credential floor. When a\nwebhook secret is configured, a valid HMAC signature is also mandatory.\n\nBody (optional):\n- Any JSON payload — passed as input_data to the recipe executor.\n- Also accepts form-encoded payloads (GitHub ping events).","operationId":"recipe_webhook_api_webhooks_recipe__webhook_id__post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/ws/{workspace_key}":{"get":{"tags":["webhooks"],"summary":"Workspace Webhook Verify","description":"Verification endpoint — handles GET validation from external services.\n\nSupports:\n- Meta/WhatsApp webhook verification (hub.mode, hub.verify_token, hub.challenge)\n- Generic URL validation (Jira, GitHub, etc.)","operationId":"workspace_webhook_verify_api_webhooks_ws__workspace_key__get","parameters":[{"name":"workspace_key","in":"path","required":true,"schema":{"type":"string","title":"Workspace Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["webhooks"],"summary":"General Workspace Webhook","description":"General workspace webhook — routes incoming requests to the right agent.\n\nThe workspace_key in the URL is the credential floor (URL-as-secret\npattern). When a webhook secret is configured — or a Slack signing\nsecret has been collected — a valid signature is mandatory on top.\n\nBody (JSON):\n- message / text / content: The message to route\n- agent_id: Optional explicit agent override (Tier-0)\n- source / channel: Optional metadata for routing rules\n- Any other JSON fields are preserved in metadata\n\nPlatform auto-detection:\n- Telegram, Slack, WhatsApp payloads are auto-detected\n- If a bot token is configured in workspace settings, the agent's\n  response is delivered back to the originating chat","operationId":"general_workspace_webhook_api_webhooks_ws__workspace_key__post","parameters":[{"name":"workspace_key","in":"path","required":true,"schema":{"type":"string","title":"Workspace Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/items":{"get":{"tags":["Marketplace"],"summary":"List Items","description":"List marketplace items with filtering.\nReturns only approved items from agents and recipes tables.\nWhen fetching both types (type=None), pagination is applied globally.","operationId":"list_items_api_marketplace_items_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by type: agent, recipe, skill, llm, tool","title":"Type"},"description":"Filter by type: agent, recipe, skill, llm, tool"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or description","title":"Search"},"description":"Search by name or description"},{"name":"featured","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter featured items only","title":"Featured"},"description":"Filter featured items only"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarketplaceItemOut"},"title":"Response List Items Api Marketplace Items Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/items/pending":{"get":{"tags":["Marketplace"],"summary":"Get Pending Items","description":"Get all pending marketplace items awaiting approval. Admin only.","operationId":"get_pending_items_api_marketplace_items_pending_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/marketplace/items/{item_id}":{"get":{"tags":["Marketplace"],"summary":"Get Item","description":"Get detailed information about a marketplace item (agent or playbook)\nincluding dependencies.","operationId":"get_item_api_marketplace_items__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}},{"name":"type","in":"query","required":true,"schema":{"enum":["agent","recipe"],"type":"string","description":"The item's type, as list_items returns it: agent or recipe","title":"Type"},"description":"The item's type, as list_items returns it: agent or recipe"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceItemDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Marketplace"],"summary":"Delete Marketplace Item","description":"Delete a marketplace agent or playbook. Admin only.","operationId":"delete_marketplace_item_api_marketplace_items__item_id__delete","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}},{"name":"type","in":"query","required":true,"schema":{"enum":["agent","recipe"],"type":"string","description":"The item's type, as list_items returns it: agent or recipe","title":"Type"},"description":"The item's type, as list_items returns it: agent or recipe"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/items/{item_id}/install":{"post":{"tags":["Marketplace"],"summary":"Install Item","description":"Clone a marketplace agent to user's workspace.\nAutomatically copies skills and increments install count.","operationId":"install_item_api_marketplace_items__item_id__install_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/featured":{"get":{"tags":["Marketplace"],"summary":"Get Featured","description":"Get featured marketplace items for homepage.","operationId":"get_featured_api_marketplace_featured_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":8,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MarketplaceItemOut"},"title":"Response Get Featured Api Marketplace Featured Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/updates":{"get":{"tags":["Marketplace"],"summary":"Check Updates","description":"Check for updates to installed marketplace items.\nReturns items where installed version < latest version.","operationId":"check_updates_api_marketplace_updates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UpdateInfo"},"type":"array","title":"Response Check Updates Api Marketplace Updates Get"}}}}}}},"/api/marketplace/submit":{"post":{"tags":["Marketplace"],"summary":"Submit Item","description":"Submit a workspace agent to the marketplace for approval.\nTrusted users (5+ approved items) auto-publish; others go to approval queue.","operationId":"submit_item_api_marketplace_submit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/items/{item_id}/approve":{"post":{"tags":["Marketplace"],"summary":"Approve Marketplace Item","description":"Approve a pending marketplace agent or playbook. Admin only.","operationId":"approve_marketplace_item_api_marketplace_items__item_id__approve_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}},{"name":"type","in":"query","required":true,"schema":{"enum":["agent","recipe"],"type":"string","description":"The item's type, as list_items returns it: agent or recipe","title":"Type"},"description":"The item's type, as list_items returns it: agent or recipe"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/items/{item_id}/toggle-featured":{"post":{"tags":["Marketplace"],"summary":"Toggle Featured","description":"Toggle the is_featured flag on a marketplace agent or playbook. Admin only.","operationId":"toggle_featured_api_marketplace_items__item_id__toggle_featured_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}},{"name":"type","in":"query","required":true,"schema":{"enum":["agent","recipe"],"type":"string","description":"The item's type, as list_items returns it: agent or recipe","title":"Type"},"description":"The item's type, as list_items returns it: agent or recipe"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/packages":{"get":{"tags":["Marketplace"],"summary":"List Marketplace Packages","description":"List marketplace packages, showcased first then by name.\n\nEach package carries full detail (members + setup_manifest) so the Packages\ntab's detail popup renders without a second fetch. All tiers see all packages\n(D9) — plan gating is a UI chip, never a filter. The one exception is a feature\nthat is switched off: the Socials package is left out while Socials is off for\nthe workspace (PRD-251B US-B106), and back on the next request once it is on.","operationId":"list_marketplace_packages_api_marketplace_packages_get","parameters":[{"name":"showcase","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter to showcased packages only","title":"Showcase"},"description":"Filter to showcased packages only"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PackageOut"},"title":"Response List Marketplace Packages Api Marketplace Packages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/packages/{slug}":{"get":{"tags":["Marketplace"],"summary":"Get Marketplace Package","description":"Fetch a single package by slug (deep-link / refresh support for the popup).\n\nThe Socials package is not found while Socials is off for the workspace (PRD-251B\nUS-B106): a deep link shows no more than the list does.","operationId":"get_marketplace_package_api_marketplace_packages__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/packages/{slug}/install":{"post":{"tags":["Marketplace"],"summary":"Install Marketplace Package","description":"Install a package's full dependency closure into the workspace (US-005),\nvia the US-006 tool handler so D6/D9 and the returned manifest are byte-for-byte\nthe chat path. Returns the manifest on success, or the honest over-quota /\nonboarding-restriction payload — the CTA renders whatever comes back.","operationId":"install_marketplace_package_api_marketplace_packages__slug__install_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/brand-kit":{"get":{"tags":["document-generation","document-generation"],"summary":"Get Brand Kit Endpoint","description":"Return the workspace brand kit (defaults merged in, every colour role and its source;\nno social handles while Socials is off).","operationId":"get_brand_kit_endpoint_api_documents_brand_kit_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["document-generation","document-generation"],"summary":"Update Brand Kit Endpoint","description":"Update the workspace brand kit (validated, persisted on workspace.settings).\n\nWhile Socials is off for the workspace the social handles are not part of the\nchange (PRD-251B US-B106): the stored ones stay, and the answer leaves them out.\n``if_updated_at`` other than the stored stamp is a 409 that saves nothing (F372).","operationId":"update_brand_kit_endpoint_api_documents_brand_kit_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandKitPut"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/brand-kit/board":{"get":{"tags":["document-generation","document-generation"],"summary":"Get Brand Board","description":"The brand board printed from the caller's own kit, as a PDF or a PNG (page 1).\n\nA plain ``def``: the kit and its stored files are read synchronously, and the\nprint itself runs in a child process under a time limit (``render_board_isolated``),\nnever on the API process.","operationId":"get_brand_board_api_documents_brand_kit_board_get","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"pdf","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/brand-kit/suggestions":{"get":{"tags":["document-generation","document-generation"],"summary":"Get Brand Kit Suggestions","description":"Prefill candidates from the workspace, its business profile and the signed-in user.","operationId":"get_brand_kit_suggestions_api_documents_brand_kit_suggestions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/documents/brand-kit/logo":{"get":{"tags":["document-generation","document-generation"],"summary":"Stream Brand Logo","description":"Stream the stored logo (local file, then object storage).","operationId":"stream_brand_logo_api_documents_brand_kit_logo_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["document-generation","document-generation"],"summary":"Upload Brand Logo","description":"Store a PNG/JPEG logo for the workspace and point the brand kit at it.","operationId":"upload_brand_logo_api_documents_brand_kit_logo_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_brand_logo_api_documents_brand_kit_logo_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["document-generation","document-generation"],"summary":"Delete Brand Logo Endpoint","description":"Remove the stored logo and clear it from the kit.","operationId":"delete_brand_logo_endpoint_api_documents_brand_kit_logo_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/documents/brand-kit/logo-mark":{"get":{"tags":["document-generation","document-generation"],"summary":"Stream Brand Logo Mark","description":"Stream the stored logo mark (local file, then object storage).","operationId":"stream_brand_logo_mark_api_documents_brand_kit_logo_mark_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["document-generation","document-generation"],"summary":"Upload Brand Logo Mark","description":"Store a square PNG/JPEG logo mark (PRD-251 D5) and point the brand kit at it.","operationId":"upload_brand_logo_mark_api_documents_brand_kit_logo_mark_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_brand_logo_mark_api_documents_brand_kit_logo_mark_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["document-generation","document-generation"],"summary":"Delete Brand Logo Mark Endpoint","description":"Remove the stored logo mark and clear it from the kit.","operationId":"delete_brand_logo_mark_endpoint_api_documents_brand_kit_logo_mark_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/documents/brand-kit/logo-dark":{"get":{"tags":["document-generation","document-generation"],"summary":"Stream Brand Logo Dark","description":"Stream the stored logo for dark backgrounds (local file, then object storage).","operationId":"stream_brand_logo_dark_api_documents_brand_kit_logo_dark_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["document-generation","document-generation"],"summary":"Upload Brand Logo Dark","description":"Store the PNG/JPEG logo for dark backgrounds and point the brand kit at it.","operationId":"upload_brand_logo_dark_api_documents_brand_kit_logo_dark_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_brand_logo_dark_api_documents_brand_kit_logo_dark_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["document-generation","document-generation"],"summary":"Delete Brand Logo Dark Endpoint","description":"Remove the stored logo for dark backgrounds and clear it from the kit.","operationId":"delete_brand_logo_dark_endpoint_api_documents_brand_kit_logo_dark_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/documents/brand-kit/logo-mono":{"get":{"tags":["document-generation","document-generation"],"summary":"Stream Brand Logo Mono","description":"Stream the stored one-colour logo (local file, then object storage).","operationId":"stream_brand_logo_mono_api_documents_brand_kit_logo_mono_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["document-generation","document-generation"],"summary":"Upload Brand Logo Mono","description":"Store the one-colour PNG/JPEG logo and point the brand kit at it.","operationId":"upload_brand_logo_mono_api_documents_brand_kit_logo_mono_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_brand_logo_mono_api_documents_brand_kit_logo_mono_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["document-generation","document-generation"],"summary":"Delete Brand Logo Mono Endpoint","description":"Remove the stored one-colour logo and clear it from the kit.","operationId":"delete_brand_logo_mono_endpoint_api_documents_brand_kit_logo_mono_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/documents/brand-kit/fonts":{"post":{"tags":["document-generation","document-generation"],"summary":"Upload Brand Font","description":"Store a woff2 font file for the face it provides; the same face uploaded again replaces it.","operationId":"upload_brand_font_api_documents_brand_kit_fonts_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_brand_font_api_documents_brand_kit_fonts_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/brand-kit/fonts/{font_id}":{"get":{"tags":["document-generation","document-generation"],"summary":"Stream Brand Font","description":"Stream a stored font file (local file, then object storage).","operationId":"stream_brand_font_api_documents_brand_kit_fonts__font_id__get","parameters":[{"name":"font_id","in":"path","required":true,"schema":{"type":"string","title":"Font Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["document-generation","document-generation"],"summary":"Delete Brand Font","description":"Remove a stored font file and take it out of the kit.","operationId":"delete_brand_font_api_documents_brand_kit_fonts__font_id__delete","parameters":[{"name":"font_id","in":"path","required":true,"schema":{"type":"string","title":"Font Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/brand-kit/references":{"get":{"tags":["document-generation","document-generation","document-generation"],"summary":"List Style References","operationId":"list_style_references_api_documents_brand_kit_references_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Style References Api Documents Brand Kit References Get"}}}}}},"post":{"tags":["document-generation","document-generation","document-generation"],"summary":"Upload Style Reference","description":"Store an image as a style reference, with its note and stance (the module docstring).","operationId":"upload_style_reference_api_documents_brand_kit_references_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_style_reference_api_documents_brand_kit_references_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Upload Style Reference Api Documents Brand Kit References Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/brand-kit/references/{ref_id}":{"put":{"tags":["document-generation","document-generation","document-generation"],"summary":"Update Style Reference","operationId":"update_style_reference_api_documents_brand_kit_references__ref_id__put","parameters":[{"name":"ref_id","in":"path","required":true,"schema":{"type":"string","title":"Ref Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Style Reference Api Documents Brand Kit References  Ref Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["document-generation","document-generation","document-generation"],"summary":"Delete Style Reference","operationId":"delete_style_reference_api_documents_brand_kit_references__ref_id__delete","parameters":[{"name":"ref_id","in":"path","required":true,"schema":{"type":"string","title":"Ref Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Style Reference Api Documents Brand Kit References  Ref Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/brand-kit/references/{ref_id}/image":{"get":{"tags":["document-generation","document-generation","document-generation"],"summary":"Stream Style Reference","operationId":"stream_style_reference_api_documents_brand_kit_references__ref_id__image_get","parameters":[{"name":"ref_id","in":"path","required":true,"schema":{"type":"string","title":"Ref Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/brand-kit/style/read":{"post":{"tags":["document-generation","document-generation","document-generation"],"summary":"Read Style Again","description":"Read the references again now; the profile as stored.","operationId":"read_style_again_api_documents_brand_kit_style_read_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Read Style Again Api Documents Brand Kit Style Read Post"}}}}}}},"/api/documents/brand-kit/style":{"put":{"tags":["document-generation","document-generation","document-generation"],"summary":"Update Style Settings","operationId":"update_style_settings_api_documents_brand_kit_style_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleSettings"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Update Style Settings Api Documents Brand Kit Style Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/templates":{"post":{"tags":["document-generation"],"summary":"Create Template","description":"Create a new document template.\n\nPRD-251 S1.2: a social template's composition is checked by the service\n(variables_schema, sizes, the brand rule); it answers 422 naming each problem.","operationId":"create_template_api_documents_templates_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["document-generation"],"summary":"List Templates","description":"List document templates for the workspace.\n\nPRD-242 S2: each entry also says whether it is block-editable\n(``has_blocks``), a platform starter (``is_starter``), and which ``data.*``\nfields an agent must supply (``data_fields``) — the gallery renders those\ninstead of a bare name.","operationId":"list_templates_api_documents_templates_get","parameters":[{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/templates/presets":{"get":{"tags":["document-generation"],"summary":"List Template Presets","description":"The layout each category starts from (PRD-243) — what \"New template → Letter\"\nloads, what the starters are seeded from. Declared BEFORE ``/templates/{id}`` so\nthe literal segment is not swallowed by the UUID path parameter.","operationId":"list_template_presets_api_documents_templates_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/documents/templates/{template_id}":{"get":{"tags":["document-generation"],"summary":"Get Template","description":"Get a single template with full details.","operationId":"get_template_api_documents_templates__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["document-generation"],"summary":"Update Template","description":"Update a document template (a social template's new composition is checked\nby the service, PRD-251 S1.2).","operationId":"update_template_api_documents_templates__template_id__put","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["document-generation"],"summary":"Delete Template","description":"Soft-delete a document template.","operationId":"delete_template_api_documents_templates__template_id__delete","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/templates/{template_id}/preview":{"post":{"tags":["document-generation"],"summary":"Preview Template","description":"Generate a preview from the data sent, else the template's stored sample.\n\nF348: either shape is taken, the data itself or ``{\"data\": {...}}`` (how the\nstarters and the Studio store a sample), and the stored sample is never written to.","operationId":"preview_template_api_documents_templates__template_id__preview_post","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/templates/upload":{"post":{"tags":["document-generation"],"summary":"Upload Docx Template","description":"Upload a .docx template file.","operationId":"upload_docx_template_api_documents_templates_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_docx_template_api_documents_templates_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/generate":{"post":{"tags":["document-generation"],"summary":"Generate Document","description":"Generate a document from data + template.\n\nPRD-242 S4: the file is registered as a Deliverable (it used to vanish\ninto the download link — only agent generations reached the feed), and the\nresponse carries the same links an agent gets: the in-app feed and a\nno-sign-in share link when object storage holds a copy.","operationId":"generate_document_api_documents_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateDocumentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateDocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/variables":{"get":{"tags":["document-generation"],"summary":"List Variables","description":"Return the variable catalog with resolved sample values for this workspace/user.\n\nDrives the editor's variable-chip picker (PRD-167 S3). Each entry carries the\ncatalog label/sample plus the *actual* resolved value where available, so authors\nsee what a chip will render to.","operationId":"list_variables_api_documents_variables_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/documents/preview-blocks":{"post":{"tags":["document-generation"],"summary":"Preview Blocks","description":"Render a block tree to HTML for live preview, without persisting (PRD-167 S5).\n\nReturns the rendered HTML plus the list of unresolved/unknown variable paths so the\neditor can surface inline errors instead of shipping blanks.","operationId":"preview_blocks_api_documents_preview_blocks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewBlocksRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/generated/{filename}":{"get":{"tags":["document-generation"],"summary":"Serve Generated File","description":"Serve a generated document file for download.\n\nTries local filesystem first, then falls back to S3 (containers are ephemeral).","operationId":"serve_generated_file_api_documents_generated__filename__get","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/upload":{"post":{"tags":["documents"],"summary":"Handle Request","description":"Upload and process a document: its checks, a duplicate answered with the document already\nstored, a same-name upload replacing that document (F087), else a new document, ingested now\n(each step in api/document_upload_steps).\n\nPRD-274 §5.2: a member with ``documents:create``, or a product's server key listing\n``documents:write``, which uploads into its own workspace. The key is named as the uploader\n(``sdk:<key id>``). Its upload may not name teams (400: a key writes only documents it can read\nback), never answers with a document it may not read, and is refused (409) where it would\nwrite over one: one of the same name, or a spreadsheet's workspace copy\n(services/document_key_access).","operationId":"handle_request_api_documents_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_handle_request_api_documents_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/core__models__core__DocumentUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{document_id}/download":{"get":{"tags":["documents"],"summary":"Download Document By Id","description":"Download a document of the caller's workspace by ID. Generates a pre-signed S3 URL.\n\nmode=url (default): returns JSON {\"url\": \"...\", \"filename\": \"...\"} — safe for fetch().\nmode=redirect: returns 302 redirect. The request itself needs the caller's auth\nheaders, so a plain <a href> to this route is refused in SaaS: fetch with apiClient.\nA plain ``def``: the lookup and the storage calls are synchronous (threadpool).\n\nF105: the request's session (the permission gate's too) is done once the row is\nread, so its transaction ends there, before object storage is asked and before a\nlocal file streams; FastAPI closes the session only when the response ends.","operationId":"download_document_by_id_api_documents__document_id__download_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}},{"name":"mode","in":"query","required":false,"schema":{"type":"string","description":"'url' returns JSON with pre-signed URL, 'redirect' does 302","default":"url","title":"Mode"},"description":"'url' returns JSON with pre-signed URL, 'redirect' does 302"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/download":{"get":{"tags":["documents"],"summary":"Download Document","description":"Download a file from this workspace's own folder under the documents root\n(``<root>/<workspace_id>/``, services.document_downloads). A path anywhere else,\nreached through ``..`` or a symlink included, answers 404 like a missing file.\n\nF105: ``db`` is the permission gate's own session (FastAPI hands one ``get_db``\nper request); its transaction ends before the file streams, so its pooled\nconnection is not held for the whole download.\n\nReturns:\n    FileResponse with the document","operationId":"download_document_api_documents_download_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Full path to a document in this workspace's folder","title":"Path"},"description":"Full path to a document in this workspace's folder"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/content":{"get":{"tags":["documents"],"summary":"Get Document Content By Path","description":"Get a document's content as text for the artifact viewer, from this workspace's own\nfolder under the documents root (F453, as ``/download``): before, any signed-in caller\nread any workspace's file there. A path anywhere else answers 404 like a missing file.\nA plain ``def``: the read is synchronous (threadpool).\n\nReturns:\n    JSON with document content","operationId":"get_document_content_by_path_api_documents_content_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Full path to a document in this workspace's folder","title":"Path"},"description":"Full path to a document in this workspace's folder"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/analytics":{"get":{"tags":["documents"],"summary":"Get Document Analytics","description":"Get document analytics and statistics\n\nReturns comprehensive analytics including:\n- Total documents by status\n- Total storage used\n- Processing statistics\n- File type distribution\n- Recent upload activity","operationId":"get_document_analytics_api_documents_analytics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/documents/":{"get":{"tags":["documents"],"summary":"List Documents","description":"List documents with filtering and pagination.\n\nAny signed-in member, as before; a product's server key listing ``documents:read`` lists its\nown workspace's, only those it may read (PRD-274 §5.2, services/document_key_access).","operationId":"list_documents_api_documents__get","parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"file_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Type"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"team","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"PRD-158: team scope; normalized server-side","title":"Team"},"description":"PRD-158: team scope; normalized server-side"},{"name":"source_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type"}},{"name":"exclude_source_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exclude Source Type"}},{"name":"content_hash","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentResponse"},"title":"Response List Documents Api Documents  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents":{"get":{"tags":["documents"],"summary":"List Documents","description":"List documents with filtering and pagination.\n\nAny signed-in member, as before; a product's server key listing ``documents:read`` lists its\nown workspace's, only those it may read (PRD-274 §5.2, services/document_key_access).","operationId":"list_documents_api_documents_get","parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"file_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Type"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"team","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"PRD-158: team scope; normalized server-side","title":"Team"},"description":"PRD-158: team scope; normalized server-side"},{"name":"source_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type"}},{"name":"exclude_source_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exclude Source Type"}},{"name":"content_hash","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentResponse"},"title":"Response List Documents Api Documents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/pins":{"get":{"tags":["documents"],"summary":"List Pinned Documents","description":"List the documents pinned to a chat.","operationId":"list_pinned_documents_api_documents_pins_get","parameters":[{"name":"chat_id","in":"query","required":true,"schema":{"type":"string","description":"Chat/conversation id","title":"Chat Id"},"description":"Chat/conversation id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{document_id}/pin":{"post":{"tags":["documents"],"summary":"Pin Document To Chat","description":"Pin a document to a chat so its content is always in that conversation's context.","operationId":"pin_document_to_chat_api_documents__document_id__pin_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}},{"name":"chat_id","in":"query","required":true,"schema":{"type":"string","description":"Chat/conversation id to pin the document to","title":"Chat Id"},"description":"Chat/conversation id to pin the document to"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["documents"],"summary":"Unpin Document From Chat","description":"Unpin a document from a chat.","operationId":"unpin_document_from_chat_api_documents__document_id__pin_delete","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}},{"name":"chat_id","in":"query","required":true,"schema":{"type":"string","description":"Chat/conversation id to unpin the document from","title":"Chat Id"},"description":"Chat/conversation id to unpin the document from"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/team-counts":{"get":{"tags":["documents"],"summary":"Document Team Counts","description":"PRD-158 S3: per-team document counts, aggregated server-side over ALL docs\nin the workspace (not the paginated ≤100 page). Teams are normalized\n(lowercased) so mixed-case team_access collapses into one count.\n\nRegistered before GET /{document_id} so the literal path isn't captured.","operationId":"document_team_counts_api_documents_team_counts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/documents/{document_id}":{"get":{"tags":["documents"],"summary":"Get Document","description":"Get document by ID.\n\nAny signed-in member, as before; a product's server key listing ``documents:read`` gets one\nof its own workspace's it may read. Any other id answers 404, as a missing one does (PRD-274\n§5.2, services/document_key_access).","operationId":"get_document_api_documents__document_id__get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["documents"],"summary":"Delete Document","description":"Delete document: its local file, its chunks, row and vectors (services.document_removal).\n\nA member with ``documents:delete``, as before; or a product's server key listing\n``documents:write`` (delete rides on write, as erasing rides on ``memory:write``), which\ndeletes only a document of its own workspace it may read. Any other id answers 404 and\nnothing is removed (PRD-274 §5.2, services/document_key_access).","operationId":"delete_document_api_documents__document_id__delete","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{document_id}/delete-impact":{"get":{"tags":["documents"],"summary":"Get Delete Impact","description":"Get deletion impact analysis for a document\n\nReturns information about what will be affected by deleting this document:\n- Number of vector chunks\n- Number of embeddings\n- References count\n- Storage freed\n- Affected workflows/dependencies","operationId":"get_delete_impact_api_documents__document_id__delete_impact_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{document_id}/reprocess":{"post":{"tags":["documents"],"summary":"Reprocess Document","description":"Reprocess a document - regenerate chunks and embeddings\n\nNote: This endpoint requires the original document file to still exist.\nFor test documents with fake file paths, this will return an appropriate error.","operationId":"reprocess_document_api_documents__document_id__reprocess_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/{document_id}/content":{"get":{"tags":["documents"],"summary":"Get Document Content By Id","description":"Get document content reconstructed from chunks, with optional highlighting.\n\nIf highlight_chunk_ids provided, wraps matching chunk text in <mark> tags\nso the frontend can scroll to and highlight the relevant section.","operationId":"get_document_content_by_id_api_documents__document_id__content_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}},{"name":"highlight_chunk_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"description":"Chunk IDs to highlight in content","title":"Highlight Chunk Ids"},"description":"Chunk IDs to highlight in content"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/search":{"post":{"tags":["documents"],"summary":"Semantic Search","description":"Semantic search across document chunks using vector similarity.\n\nAccepts its parameters in the JSON body or the query string. Embeddings are\nread from whichever document-vector backend the edition selects — S3 Vectors\non SaaS, pgvector over ``document_chunks.embedding`` locally. What is done\nwith the hits, step by step, is in api/document_search.\n\nPRD-274 §5.2: a member with ``documents:read``, as before; or a product's server key\nlisting ``documents:read``, which searches its own workspace. A key's hit is mapped only\nby its own document id, and only to a document the key may read; a hit with no id is\ndropped, never resolved by its file name (services/document_key_access).","operationId":"semantic_search_api_documents_search_post","parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search query (may also be sent in the JSON body)","title":"Query"},"description":"Search query (may also be sent in the JSON body)"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":50,"minimum":1},{"type":"null"}],"description":"Maximum number of results","title":"Limit"},"description":"Maximum number of results"},{"name":"min_similarity","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"description":"Minimum similarity score","title":"Min Similarity"},"description":"Minimum similarity score"},{"name":"document_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"integer"}},{"type":"null"}],"description":"Optional filter by document IDs","title":"Document Ids"},"description":"Optional filter by document IDs"},{"name":"team","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional team scope (PRD-157 S1); normalized server-side","title":"Team"},"description":"Optional team scope (PRD-157 S1); normalized server-side"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SemanticSearchRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/queue/status":{"get":{"tags":["documents"],"summary":"Get Queue Status","description":"Get real-time processing queue status\n\nReturns information about documents in various processing states:\n- Pending: Documents queued for processing\n- Processing: Currently being processed\n- Failed: Processing failed\n- Queue depth and estimated completion times","operationId":"get_queue_status_api_documents_queue_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/documents/rag/retrieve":{"post":{"tags":["documents"],"summary":"Rag Retrieve","description":"Retrieve optimized RAG context for LLM augmentation\n\nUses the enhanced RAGService with:\n- Query enhancement (HyDE, decomposition)\n- Reciprocal Rank Fusion for hybrid search\n- Knapsack optimization for token budget\n- MMR for diversity\n\nArgs:\n    query: Search query\n    max_chunks: Maximum chunks to return (1-20)\n    max_tokens: Token budget for context (100-8000), defaults to system_settings\n    diversity: 0.0 = max relevance, 1.0 = max diversity, defaults to system_settings\n    min_similarity: Minimum similarity threshold, defaults to system_settings\n    \nReturns:\n    {\n        \"query\": str,\n        \"chunks\": [...],\n        \"context\": str (formatted for LLM),\n        \"total_tokens\": int,\n        \"diversity_score\": float,\n        \"execution_time_ms\": int\n    }","operationId":"rag_retrieve_api_documents_rag_retrieve_post","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","description":"Query string for RAG context retrieval","title":"Query"},"description":"Query string for RAG context retrieval"},{"name":"max_chunks","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Maximum number of chunks to retrieve","default":5,"title":"Max Chunks"},"description":"Maximum number of chunks to retrieve"},{"name":"max_tokens","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":8000,"minimum":100},{"type":"null"}],"description":"Maximum tokens (uses system_settings if not provided)","title":"Max Tokens"},"description":"Maximum tokens (uses system_settings if not provided)"},{"name":"diversity","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"description":"Diversity parameter (uses system_settings if not provided)","title":"Diversity"},"description":"Diversity parameter (uses system_settings if not provided)"},{"name":"min_similarity","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"description":"Minimum similarity (uses system_settings if not provided)","title":"Min Similarity"},"description":"Minimum similarity (uses system_settings if not provided)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/analytics/track":{"post":{"tags":["documents"],"summary":"Track Usage Event","description":"Track document usage events for analytics\n\nEvent types:\n- document_viewed: User viewed a document\n- document_searched: User performed a search\n- chunk_retrieved: Chunk was retrieved for RAG\n- rag_query: RAG context was built","operationId":"track_usage_event_api_documents_analytics_track_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageEventRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/analytics/usage":{"get":{"tags":["documents"],"summary":"Get Usage Analytics","description":"Get aggregated usage analytics\n\nReturns:\n- Total events by type\n- Popular documents\n- Popular search terms\n- Time series data","operationId":"get_usage_analytics_api_documents_analytics_usage_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Time period (24h, 7d, 30d)","default":"7d","title":"Period"},"description":"Time period (24h, 7d, 30d)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/reprocess-all":{"post":{"tags":["documents"],"summary":"Reprocess All Documents","description":"Re-process ALL documents with semantic chunking.\n\n⚠️ Use after:\n- Changing embedding model/dimensions\n- Updating chunking strategy\n- Migrating to new vector store\n\nRuns in background - check status via /status endpoint.","operationId":"reprocess_all_documents_api_documents_reprocess_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/documents/reprocess-status":{"get":{"tags":["documents"],"summary":"Get Reprocess Status","description":"Get status of document re-processing.\n\nShows how many documents are pending, processing, completed.","operationId":"get_reprocess_status_api_documents_reprocess_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/documents/{document_id}/team-access":{"patch":{"tags":["documents"],"summary":"Update Document Team Access","description":"Update team_access on a single document.","operationId":"update_document_team_access_api_documents__document_id__team_access_patch","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_TeamAccessUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documents/bulk-team-access":{"post":{"tags":["documents"],"summary":"Bulk Update Team Access","description":"Update team_access on multiple documents at once.","operationId":"bulk_update_team_access_api_documents_bulk_team_access_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_BulkTeamAccessUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams":{"get":{"tags":["teams"],"summary":"List Workspace Teams","description":"All teams in the caller's workspace (canonical-name order).","operationId":"list_workspace_teams_api_teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TeamResponse"},"type":"array","title":"Response List Workspace Teams Api Teams Get"}}}}}},"post":{"tags":["teams"],"summary":"Create Workspace Team","description":"Create (or return the existing) team for the normalized name.","operationId":"create_workspace_team_api_teams_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog/posts":{"post":{"tags":["Blog"],"summary":"Create Post","description":"Create a new blog post (draft by default).","operationId":"create_post_api_blog_posts_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Blog"],"summary":"List Posts","description":"List all blog posts in workspace (all statuses).","operationId":"list_posts_api_blog_posts_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog/posts/{post_id}":{"get":{"tags":["Blog"],"summary":"Get Post","description":"Get full post detail by ID.","operationId":"get_post_api_blog_posts__post_id__get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Blog"],"summary":"Update Post","description":"Update post fields.","operationId":"update_post_api_blog_posts__post_id__put","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Blog"],"summary":"Delete Post","description":"Archive post (soft delete).","operationId":"delete_post_api_blog_posts__post_id__delete","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog/posts/{post_id}/publish":{"post":{"tags":["Blog"],"summary":"Publish Post","description":"Publish a post.","operationId":"publish_post_api_blog_posts__post_id__publish_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog/posts/{post_id}/unpublish":{"post":{"tags":["Blog"],"summary":"Unpublish Post","description":"Unpublish a post (back to draft).","operationId":"unpublish_post_api_blog_posts__post_id__unpublish_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog/posts/{post_id}/review":{"post":{"tags":["Blog"],"summary":"Mark Post Reviewed","description":"Mark a post reviewed by the caller, who takes editorial responsibility (PRD-264 EUAI-08b).\n\nRecords who, when and the hash of the text they reviewed; the post then reads\n``ai_generated: false`` while its text is unchanged and until an edit clears the\nreview. Only the caller's own workspace's posts are found (404 otherwise).","operationId":"mark_post_reviewed_api_blog_posts__post_id__review_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog/cover-image/upload":{"post":{"tags":["Blog"],"summary":"Upload Cover Image","description":"Upload a user-supplied cover image for a blog post. Saves to the same\nimage store used by platform_generate_cover_image so the URL pattern is\nidentical (/api/generated-images/{image_id}).","operationId":"upload_cover_image_api_blog_cover_image_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_cover_image_api_blog_cover_image_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog/missions":{"post":{"tags":["Blog"],"summary":"Create Blog Mission","description":"Fire a research-and-write blog mission for a topic. Same end-to-end\npipeline whether triggered from the UI button, an agent, or a scheduled\nplaybook — they all converge on this code path.","operationId":"create_blog_mission_api_blog_missions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBlogMissionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/channels":{"get":{"tags":["Socials"],"summary":"List Social Channels","description":"The connected channels, what each can post and (US-207) its copy limits\n(``copy_limits``: ``text``, and ``title`` / ``hashtags`` where it has them; null\nwhen none is known). A plain ``def``: FastAPI runs its synchronous database\nreads in the threadpool (F105).","operationId":"list_social_channels_api_socials_channels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Social Channels Api Socials Channels Get"}}}}}}},"/api/socials/posts/{post_id}/targets":{"put":{"tags":["Socials"],"summary":"Replace Social Post Targets","description":"Replace the post's channels (``set_post_targets``) and answer the post, with its\n``targets``. A plain ``def``: FastAPI runs its synchronous database work in the\nthreadpool (F105).","operationId":"replace_social_post_targets_api_socials_posts__post_id__targets_put","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceSocialPostTargetsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Replace Social Post Targets Api Socials Posts  Post Id  Targets Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/compose":{"post":{"tags":["Socials"],"summary":"Compose Social Post","description":"A draft proposal for ``brief`` (not saved): title, copy (``{\"base\", \"channels\"}``,\nthe shape a save takes), format, template, variables, sources, channels and warnings. A plain\n``def``: its database reads run in the threadpool (F105), and the model call\nruns on the event loop from there. 422 for an unknown format; 502 when the\nmodel's answer cannot be read twice; 504 when it does not answer in time.","operationId":"compose_social_post_api_socials_compose_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Compose Social Post Api Socials Compose Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/campaigns":{"get":{"tags":["Socials"],"summary":"List Social Campaigns","description":"The workspace's campaigns, newest first, each with ``post_count``.","operationId":"list_social_campaigns_api_socials_campaigns_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Social Campaigns Api Socials Campaigns Get"}}}}}},"post":{"tags":["Socials"],"summary":"Create Social Campaign","description":"Create a campaign with no posts (``per_post`` unless ``approval_mode`` says series).","operationId":"create_social_campaign_api_socials_campaigns_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Social Campaign Api Socials Campaigns Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/campaigns/{campaign_id}":{"get":{"tags":["Socials"],"summary":"Get Social Campaign","description":"The campaign with its posts, oldest first, each with its status and content_hash.","operationId":"get_social_campaign_api_socials_campaigns__campaign_id__get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Social Campaign Api Socials Campaigns  Campaign Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Socials"],"summary":"Update Social Campaign","description":"Rename the campaign or change its approval mode.","operationId":"update_social_campaign_api_socials_campaigns__campaign_id__patch","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Social Campaign Api Socials Campaigns  Campaign Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/campaigns/{campaign_id}/posts/{post_id}":{"post":{"tags":["Socials"],"summary":"Add Social Campaign Post","description":"Put the post in the campaign (moving it from another). Its approval is untouched:\na series approval given before it joined does not cover it.","operationId":"add_social_campaign_post_api_socials_campaigns__campaign_id__posts__post_id__post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Social Campaign Post Api Socials Campaigns  Campaign Id  Posts  Post Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Socials"],"summary":"Remove Social Campaign Post","description":"Take the post out of the campaign; a post the campaign does not hold is a 404.","operationId":"remove_social_campaign_post_api_socials_campaigns__campaign_id__posts__post_id__delete","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Social Campaign Post Api Socials Campaigns  Campaign Id  Posts  Post Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/campaigns/{campaign_id}/approve":{"post":{"tags":["Socials"],"summary":"Approve Social Campaign","description":"Approve the posts the approver was shown as a series (D6). 409 unless the\nworkspace's series approval switch is on and the campaign is in series mode.","operationId":"approve_social_campaign_api_socials_campaigns__campaign_id__approve_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveSeriesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Approve Social Campaign Api Socials Campaigns  Campaign Id  Approve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/publish-now":{"post":{"tags":["Socials"],"summary":"Publish Social Post Now","description":"Publish an approved or scheduled post now: 202 with it in ``publishing``. 409\nwhen its approval no longer matches its content, it is not approved or scheduled,\nor another request claimed it first; 409 too when it has no channels.","operationId":"publish_social_post_now_api_socials_posts__post_id__publish_now_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Publish Social Post Now Api Socials Posts  Post Id  Publish Now Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/retry":{"post":{"tags":["Socials"],"summary":"Retry Social Post","description":"Publish again the failed targets of a failed or partially published post: 202\nwith it in ``publishing``. A published target is never run again. 409 unless the\npost's approval still matches its content and one of its targets failed.","operationId":"retry_social_post_api_socials_posts__post_id__retry_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Retry Social Post Api Socials Posts  Post Id  Retry Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/ai-labels":{"get":{"tags":["Socials"],"summary":"Social Post Ai Labels","description":"Each channel's AI label decision for the post (PRD-264 EUAI-05), and its AI media:\n``{\"ai_media\": {...}, \"targets\": [{\"id\", \"toolkit\", \"post_kind\", \"ai_label\", \"at_publish\"}]}``.\n404 for a post outside the caller's workspace.","operationId":"social_post_ai_labels_api_socials_posts__post_id__ai_labels_get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Social Post Ai Labels Api Socials Posts  Post Id  Ai Labels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/ai-label":{"put":{"tags":["Socials"],"summary":"Set Social Post Ai Label","description":"Switch the post's \"Realistic AI people, places, products or voice: label as\nAI-generated\" on or off (PRD-264 EUAI-08a), as the signed-in person; the post as\nsaved. The setting is approved content: an approved or scheduled post goes back for\napproval. 404 for a post outside the caller's workspace; 409 while it renders or\npublishes, or when another write committed first.","operationId":"set_social_post_ai_label_api_socials_posts__post_id__ai_label_put","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiLabelRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Social Post Ai Label Api Socials Posts  Post Id  Ai Label Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/media-tools":{"get":{"tags":["Socials"],"summary":"Get Media Tools","operationId":"get_media_tools_api_socials_media_tools_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Media Tools Api Socials Media Tools Get"}}}}}},"put":{"tags":["Socials"],"summary":"Update Media Tools","description":"New defaults and caps (the module docstring); 422 for a default the workspace is not offered.","operationId":"update_media_tools_api_socials_media_tools_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaToolsChange"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Update Media Tools Api Socials Media Tools Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/ai-options":{"post":{"tags":["Socials"],"summary":"Make Ai Options","description":"Four AI options for one of the template's image slots, made in the background.","operationId":"make_ai_options_api_socials_posts__post_id__ai_options_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionsRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Make Ai Options Api Socials Posts  Post Id  Ai Options Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/ai-options/{slot}":{"put":{"tags":["Socials"],"summary":"Pick Ai Option","description":"The option picked becomes the slot's file (a render setting: an approval stands).","operationId":"pick_ai_option_api_socials_posts__post_id__ai_options__slot__put","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}},{"name":"slot","in":"path","required":true,"schema":{"type":"string","title":"Slot"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PickRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pick Ai Option Api Socials Posts  Post Id  Ai Options  Slot  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/voice-examples":{"get":{"tags":["Socials"],"summary":"List Social Voice Examples","description":"The workspace's voice examples, newest first: ``{examples: [{id, post_id, draft, approved, created_at}]}``.","operationId":"list_social_voice_examples_api_socials_voice_examples_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Social Voice Examples Api Socials Voice Examples Get"}}}}}}},"/api/socials/voice-examples/{example_id}":{"delete":{"tags":["Socials"],"summary":"Delete Social Voice Example","description":"Remove one example: the composer never reads it again.","operationId":"delete_social_voice_example_api_socials_voice_examples__example_id__delete","parameters":[{"name":"example_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Example Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/templates":{"get":{"tags":["Socials"],"summary":"List Social Templates","description":"The workspace's social templates for the gallery (US-B102).","operationId":"list_social_templates_api_socials_templates_get","parameters":[{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A post format: only the templates of its kind","title":"Format"},"description":"A post format: only the templates of its kind"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Social Templates Api Socials Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/music":{"get":{"tags":["Socials"],"summary":"List Social Music","description":"PRD-251B (US-B109): the music library a post may pick from instead of its template's\ntrack, from media-render: each track's id, title, artist, style, length and whether it\nasks for credit. ``available`` is false without a renderer; 503 while it does not\nanswer. No database work: the one await is the renderer's.","operationId":"list_social_music_api_socials_music_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Social Music Api Socials Music Get"}}}}}}},"/api/socials/posts/{post_id}/slot":{"put":{"tags":["Socials"],"summary":"Set Social Post Slot","description":"Set the post's planned slot (the module docstring). A plain ``def`` (F105).","operationId":"set_social_post_slot_api_socials_posts__post_id__slot_put","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlotRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/media":{"post":{"tags":["Socials"],"summary":"Upload Social Post Media","description":"The post's visual becomes the uploaded file, or with ``slot`` the template's photo spot\nholds it (the module docstring). A plain ``def`` (F105).\n\nThe file is optional to FastAPI so the post is looked up first: another workspace's\npost is 404 whatever the request carries.","operationId":"upload_social_post_media_api_socials_posts__post_id__media_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_social_post_media_api_socials_posts__post_id__media_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Social Post Media Api Socials Posts  Post Id  Media Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Socials"],"summary":"List Social Post Media","description":"The caller's post's media as presigned inline links (D9, S3.4): the exact\nfiles the approval view shows, each ``{aspect, deliverable_id, name, url,\ncontent_type, bytes, error}``, living ``SOCIALS_MEDIA_URL_TTL_SECONDS``. A\nfile with no stored object has ``url`` null and says why; 503 when a file\nhas one and there is no storage to link to.","operationId":"list_social_post_media_api_socials_posts__post_id__media_get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/photos/{slot}":{"put":{"tags":["Socials"],"summary":"Put Social Post Photo","description":"A Library picture fills the post's template's photo spot ``slot`` (the module docstring):\ncopied under the post's prefix and recorded as the slot's file. A plain ``def`` (F105).","operationId":"put_social_post_photo_api_socials_posts__post_id__photos__slot__put","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}},{"name":"slot","in":"path","required":true,"schema":{"type":"string","title":"Slot"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Put Social Post Photo Api Socials Posts  Post Id  Photos  Slot  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/retake":{"post":{"tags":["Socials"],"summary":"Retake Social Post","description":"Another take of a post, kept undoable (the module docstring).","operationId":"retake_social_post_api_socials_posts__post_id__retake_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RetakeRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Retake Social Post Api Socials Posts  Post Id  Retake Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/retake/undo":{"post":{"tags":["Socials"],"summary":"Undo Social Post Retake","description":"F378: the take before Auto's last one, restored and rendered again as a retake is;\n409 ``nothing_to_undo`` when the post has no earlier take kept.","operationId":"undo_social_post_retake_api_socials_posts__post_id__retake_undo_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Undo Social Post Retake Api Socials Posts  Post Id  Retake Undo Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans/{plan_id}/topics":{"get":{"tags":["Socials"],"summary":"List Social Plan Topics","operationId":"list_social_plan_topics_api_socials_plans__plan_id__topics_get","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Social Plan Topics Api Socials Plans  Plan Id  Topics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Socials"],"summary":"Add Social Plan Topic","description":"A person's topic in the bank, checked (the module docstring), with a ``warning`` when it is\nclose to what the workspace has: they may repeat on purpose.","operationId":"add_social_plan_topic_api_socials_plans__plan_id__topics_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicFields"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Social Plan Topic Api Socials Plans  Plan Id  Topics Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans/{plan_id}/topics/{topic_id}":{"put":{"tags":["Socials"],"summary":"Update Social Plan Topic","operationId":"update_social_plan_topic_api_socials_plans__plan_id__topics__topic_id__put","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}},{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicFields"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Social Plan Topic Api Socials Plans  Plan Id  Topics  Topic Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Socials"],"summary":"Delete Social Plan Topic","operationId":"delete_social_plan_topic_api_socials_plans__plan_id__topics__topic_id__delete","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}},{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans/{plan_id}/topics/{topic_id}/pin":{"put":{"tags":["Socials"],"summary":"Pin Social Plan Topic","description":"Pin the topic to a day (that day's slots take it first), or unpin it (null).","operationId":"pin_social_plan_topic_api_socials_plans__plan_id__topics__topic_id__pin_put","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}},{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pin Social Plan Topic Api Socials Plans  Plan Id  Topics  Topic Id  Pin Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans/draft":{"post":{"tags":["Socials"],"summary":"Draft Social Plan","description":"A plan drafted from ``body.request`` (not saved): ``{plan, topics, warnings}``.","operationId":"draft_social_plan_api_socials_plans_draft_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanDraftRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Draft Social Plan Api Socials Plans Draft Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans/{plan_id}/batches/{batch_key}/approve":{"post":{"tags":["Socials"],"summary":"Approve Social Plan Batch","description":"Approve the week: ``{plan_id, batch_key, approved, left}`` (the module docstring).","operationId":"approve_social_plan_batch_api_socials_plans__plan_id__batches__batch_key__approve_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}},{"name":"batch_key","in":"path","required":true,"schema":{"type":"string","title":"Batch Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Approve Social Plan Batch Api Socials Plans  Plan Id  Batches  Batch Key  Approve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans/{plan_id}/proposals":{"get":{"tags":["Socials"],"summary":"Get Social Plan Proposals","description":"The plan's proposals: ``{proposals: [{id, kind, title, why, changes}]}``.","operationId":"get_social_plan_proposals_api_socials_plans__plan_id__proposals_get","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Social Plan Proposals Api Socials Plans  Plan Id  Proposals Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans/{plan_id}/health":{"get":{"tags":["Socials"],"summary":"Get Social Plan Health","description":"The plan's health: ``{items: [{id, title, detail, action: {kind, label}}]}``, most pressing first.","operationId":"get_social_plan_health_api_socials_plans__plan_id__health_get","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Social Plan Health Api Socials Plans  Plan Id  Health Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans":{"get":{"tags":["Socials"],"summary":"List Social Plans","description":"The workspace's plans, newest first, each with ``bank`` ({topics, unused}).","operationId":"list_social_plans_api_socials_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Social Plans Api Socials Plans Get"}}}}}},"post":{"tags":["Socials"],"summary":"Create Social Plan","description":"A new active plan (name, starts_on, ends_on, timezone and cadence required).","operationId":"create_social_plan_api_socials_plans_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanFields"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Social Plan Api Socials Plans Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans/{plan_id}":{"get":{"tags":["Socials"],"summary":"Get Social Plan","operationId":"get_social_plan_api_socials_plans__plan_id__get","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Social Plan Api Socials Plans  Plan Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Socials"],"summary":"Update Social Plan","description":"Change any of the plan's fields, each checked; an ended plan is read-only (422).","operationId":"update_social_plan_api_socials_plans__plan_id__put","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanFields"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Social Plan Api Socials Plans  Plan Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Socials"],"summary":"Delete Social Plan","description":"Delete the plan and its content bank; the posts it made stay as ordinary posts, unlinked\n(``plan_store.delete_plan``). No more posts are made for it from the next make tick.","operationId":"delete_social_plan_api_socials_plans__plan_id__delete","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans/{plan_id}/pause":{"post":{"tags":["Socials"],"summary":"Pause Social Plan","description":"Stop making posts (and researching) until resumed; posts already made stay.","operationId":"pause_social_plan_api_socials_plans__plan_id__pause_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pause Social Plan Api Socials Plans  Plan Id  Pause Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans/{plan_id}/resume":{"post":{"tags":["Socials"],"summary":"Resume Social Plan","operationId":"resume_social_plan_api_socials_plans__plan_id__resume_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resume Social Plan Api Socials Plans  Plan Id  Resume Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans/{plan_id}/end":{"post":{"tags":["Socials"],"summary":"End Social Plan","description":"End the plan for good: no more posts are made; it stays readable.","operationId":"end_social_plan_api_socials_plans__plan_id__end_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response End Social Plan Api Socials Plans  Plan Id  End Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans/{plan_id}/slots":{"get":{"tags":["Socials"],"summary":"List Social Plan Slots","description":"The plan's slots in [start, end): ``planned`` ones (with the topic pinned to their\nday) and ``made`` ones (with their post), each with its phase, why and batch (P256-FIX-SOC-5).","operationId":"list_social_plan_slots_api_socials_plans__plan_id__slots_get","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}},{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"ISO datetime with its timezone","title":"Start"},"description":"ISO datetime with its timezone"},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"ISO datetime with its timezone, at most 62 days after start","title":"End"},"description":"ISO datetime with its timezone, at most 62 days after start"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Social Plan Slots Api Socials Plans  Plan Id  Slots Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans/{plan_id}/slots/{slot_key}":{"put":{"tags":["Socials"],"summary":"Move Social Plan Slot","description":"Move a planned slot to ``to``, put it back (``to`` null), or skip it (B208). A slot\nwhose post is made already moves with the post, never here (409).","operationId":"move_social_plan_slot_api_socials_plans__plan_id__slots__slot_key__put","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}},{"name":"slot_key","in":"path","required":true,"schema":{"type":"string","title":"Slot Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlotMoveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Move Social Plan Slot Api Socials Plans  Plan Id  Slots  Slot Key  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/plans/{plan_id}/research":{"post":{"tags":["Socials"],"summary":"Research Social Plan","description":"Research again (US-B204): the plan's research run starts now; its execution id. A missing\nresearch playbook is put back first (US-C102).","operationId":"research_social_plan_api_socials_plans__plan_id__research_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Research Social Plan Api Socials Plans  Plan Id  Research Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}":{"delete":{"tags":["Socials"],"summary":"Delete Social Post","description":"Delete the post (the module docstring): 204; 404 outside the caller's workspace;\n409 while it renders or publishes, or once it went out. A plain ``def`` (F105).","operationId":"delete_social_post_api_socials_posts__post_id__delete","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Socials"],"summary":"Get Social Post","operationId":"get_social_post_api_socials_posts__post_id__get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Socials"],"summary":"Update Social Post","description":"Edit a post (``edit_post``). A content change voids an approval (D6). A\nsource the edit adds or changes must resolve in the workspace (D7); one it\nkeeps as it was is checked again at approval. A voice toolkit the edit names\nmust be one the workspace can speak with now (D11); the voice is a render\nsetting, so changing it alone voids nothing. So is the footage (D12): a slot\nthe edit asks for with its prompt unchanged keeps what a render made for it.\nThe copy keeps the credit lines its media's music asks for (S1.6): an edit\nthat drops one gets it back.","operationId":"update_social_post_api_socials_posts__post_id__patch","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSocialPostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/templates/{template_id}/preview-page":{"post":{"tags":["Socials"],"summary":"Social Template Preview Page","description":"The template as one self-contained page for the words on screen (US-D201).\n\n``html`` is the page and ``fonts_version`` names the kit's faces it expects at its font\nmarker (``GET /brand-kit/preview-fonts``). 404 for a template of another workspace; 422,\nsaying why, for a template that is not a starter the platform ships, or not an image of one\nstill, a value that does not fit its field, a size or a photo spot the template does not\nhave, a look that is not one of its choices, or a composition a render refuses. The look is\napplied as a render applies it (US-D301).","operationId":"social_template_preview_page_api_socials_templates__template_id__preview_page_post","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewPageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Social Template Preview Page Api Socials Templates  Template Id  Preview Page Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/brand-kit/preview-fonts":{"get":{"tags":["Socials"],"summary":"Social Preview Fonts","description":"The kit's font faces as ``@font-face`` rules with data: URIs (US-D201): the uploaded\nfaces and the bundled ones a render stages, for the instant preview's font marker.","operationId":"social_preview_fonts_api_socials_brand_kit_preview_fonts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Social Preview Fonts Api Socials Brand Kit Preview Fonts Get"}}}}}}},"/api/socials/history":{"get":{"tags":["Socials"],"summary":"List Social History","description":"The workspace's history, newest first: ``{posts, total}``.","operationId":"list_social_history_api_socials_history_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"description":"How many days back","title":"Days"},"description":"How many days back"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":200,"minimum":1},{"type":"null"}],"description":"How many posts at most","title":"Limit"},"description":"How many posts at most"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Social History Api Socials History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posted":{"get":{"tags":["Socials"],"summary":"List Social Posted","description":"Posted (PRD-251C US-C408): what went out, newest first: ``{posts, total}``.","operationId":"list_social_posted_api_socials_posted_get","parameters":[{"name":"plan_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only this plan's posts","title":"Plan Id"},"description":"Only this plan's posts"},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}],"description":"Only posts that went out here","title":"Channel"},"description":"Only posts that went out here"},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"Only posts of this format","title":"Format"},"description":"Only posts of this format"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":200,"minimum":1},{"type":"null"}],"description":"How many posts at most","title":"Limit"},"description":"How many posts at most"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Social Posted Api Socials Posted Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts":{"get":{"tags":["Socials"],"summary":"List Social Posts","description":"The workspace's posts, newest first. ``from``/``to`` bound a post's date:\nits slot when scheduled, otherwise when it was created. ``q`` (global search,\nUS-205) keeps those whose title or brief holds it, case-insensitively. ``limit``\nkeeps the newest that many, and ``total`` counts every match (F379: it was ignored).","operationId":"list_social_posts_api_socials_posts_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One status, or several comma-separated","title":"Status"},"description":"One status, or several comma-separated"},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Title or brief holds this","title":"Q"},"description":"Title or brief holds this"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"description":"Only the newest this many","title":"Limit"},"description":"Only the newest this many"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Socials"],"summary":"Create Social Post","description":"Create a draft (``create_post``). Every source must resolve in the\nworkspace (D7). The copy carries the credit lines its media's music asks\nfor (S1.6).","operationId":"create_social_post_api_socials_posts_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSocialPostRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/submit":{"post":{"tags":["Socials"],"summary":"Submit Social Post","operationId":"submit_social_post_api_socials_posts__post_id__submit_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/approve":{"post":{"tags":["Socials"],"summary":"Approve Social Post","description":"Approve the version the reviewer saw (D6). ``content_hash`` differs from the post's → 409 with the\ncurrent hash; an edit another worker commits after the load is caught by the compare-and-set → the same\n409, nothing written. Every source is resolved again first (D7): a claim whose source is gone counts as\nunsourced, and so does a value in a field the post's template marks a claim, flagged or not (F433). Its files\nare then copied to the workspace's socials folders (``workspace_copies``). One Approve (17 Nov 2026): a slot\nahead, or a schedule kept from an edit, schedules it; ``post_now`` publishes one with neither (socials_publish).","operationId":"approve_social_post_api_socials_posts__post_id__approve_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/request-changes":{"post":{"tags":["Socials"],"summary":"Request Changes Social Post","operationId":"request_changes_social_post_api_socials_posts__post_id__request_changes_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestChangesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/reject":{"post":{"tags":["Socials"],"summary":"Reject Social Post","operationId":"reject_social_post_api_socials_posts__post_id__reject_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RejectRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/schedule":{"post":{"tags":["Socials"],"summary":"Schedule Social Post","operationId":"schedule_social_post_api_socials_posts__post_id__schedule_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/unschedule":{"post":{"tags":["Socials"],"summary":"Unschedule Social Post","operationId":"unschedule_social_post_api_socials_posts__post_id__unschedule_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/render":{"post":{"tags":["Socials"],"summary":"Render Social Post","description":"Render the post in the background (``render_post``): 202 with it in ``rendering``.\n\nRefused, with nothing changed, when the post holds an approval or is already\nrendering (409), has no social template (422; one left to \"Let Auto pick\" gets\nAuto's first, F253, and 422 says why when Auto cannot pick), is a chart bound to a report\nthat no longer shows the report's rows or names it (422, saying which row\ndiffers; 503 when the report's file cannot be read), names a voice toolkit the\nworkspace cannot speak with now (422, saying why), the workspace has used\nits render minutes this month, counting those renders in progress hold (429,\nbefore any call to media-render), or there is no storage or renderer to use\n(503). The render ends the post in ``needs_approval`` with the files in\n``media``, or in ``failed`` with the report in ``review_log``: a render whose\nfootage would take the post or the workspace over its media cap submits\nnothing and fails saying why (D13). With ``{\"preview\": true}`` (US-208) it is\nthe composer's half-resolution preview (``api/socials_preview.py``): the post\nkeeps its status, media and hash, and the same quota rule applies.","operationId":"render_social_post_api_socials_posts__post_id__render_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RenderRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/posts/{post_id}/media/{file_name}":{"get":{"tags":["Socials"],"summary":"Get Social Post Media","description":"A rendered file of the caller's post, streamed from storage (D9).\n\nF105: the post's lookup is the request's last use of the database, so its transaction\nends before the file streams. FastAPI closes the ``get_db`` session (the Socials gate's\ntoo) only when the response ends: a long video held a pooled connection idle in\ntransaction for the whole download.","operationId":"get_social_post_media_api_socials_posts__post_id__media__file_name__get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}},{"name":"file_name","in":"path","required":true,"schema":{"type":"string","title":"File Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/usage":{"get":{"tags":["Socials"],"summary":"Get Socials Usage","description":"This month's render minutes used and the plan's quota (``null`` = no quota).","operationId":"get_socials_usage_api_socials_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/socials/voices":{"get":{"tags":["Socials"],"summary":"List Social Voice Sources","description":"What a post can be spoken with (D11, D15): Kokoro, always; each voice\ntoolkit the workspace can speak with (``available``); each allowlisted one it\nhas not connected (``connect``: the Composio connect flow); a connected one\nit cannot use now (``unavailable``, with the reason).","operationId":"list_social_voice_sources_api_socials_voices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/socials/voices/{toolkit}":{"get":{"tags":["Socials"],"summary":"List Social Toolkit Voices","description":"A connected voice toolkit's voices, through its allowlisted ``voices``\naction on the workspace's own connection: 422 when the workspace cannot use\nthe toolkit, 502 when the toolkit does not answer.","operationId":"list_social_toolkit_voices_api_socials_voices__toolkit__get","parameters":[{"name":"toolkit","in":"path","required":true,"schema":{"type":"string","title":"Toolkit"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Only voices whose name holds this","title":"Q"},"description":"Only voices whose name holds this"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/footage":{"get":{"tags":["Socials"],"summary":"List Social Footage Sources","description":"What a post's slots can be filled with here (D12, D15, D16): per kind\n(footage, stills), the connected generation toolkit a render would use or why\nnone can; each generation toolkit ``available``, to ``connect`` (the Composio\nconnect flow) or ``unavailable`` and why; and this month's media spend\nagainst the workspace's monthly media cap (D13).","operationId":"list_social_footage_sources_api_socials_footage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/socials/sources":{"get":{"tags":["Socials"],"summary":"Search Social Sources","description":"What a claim can be bound to (D7), from the caller's workspace only.\n\nDeliverables, reports and documents whose title or summary contains ``q``;\nmetrics whose name does, each with its latest figure and the report it was\nread from; for ``url``, ``q`` itself when it is an http(s) address. Newest\nfirst, at most ``limit`` per kind. A candidate's ``kind``, ``ref`` and\n``as_of`` are the source to store.","operationId":"search_social_sources_api_socials_sources_get","parameters":[{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"deliverable, report, document, url or metric; every kind when omitted","title":"Kind"},"description":"deliverable, report, document, url or metric; every kind when omitted"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/socials/sources/reports/{report_id}/chart":{"get":{"tags":["Socials"],"summary":"Chart Social Source Report","description":"A chart template filled from a report of the caller's workspace (S1.7, D7).\n\nThe report's data table (the first markdown table in its file; its first\ncolumn the labels, ``column`` or its first numeric column the figures) or\nits metrics. The top rows, as many as the template shows, exactly as the\nreport wrote them. ``variables`` and ``sources`` are the post's own shapes:\neach figure shown is a claim bound to the report, every row variable is set\n(past the report's rows, to empty), and the chip names the report as it\nresolves. A render checks the chart still matches the report. 404 when the\nreport is not in the workspace; 422 when its data cannot fill the chart (and\nwhy: no table, no numeric column, figures a bar or a line cannot compare).","operationId":"chart_social_source_report_api_socials_sources_reports__report_id__chart_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}},{"name":"template_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"A chart template of this workspace (one with a data block)","title":"Template Id"},"description":"A chart template of this workspace (one with a data block)"},{"name":"chart","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"bar, line or grid; the template's own when the figures fit it","title":"Chart"},"description":"bar, line or grid; the template's own when the figures fit it"},{"name":"column","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The figures' column, by its header","title":"Column"},"description":"The figures' column, by its header"},{"name":"part","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"table or metrics; the report's table when its file has one","title":"Part"},"description":"table or metrics; the report's table when its file has one"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cache/stats":{"get":{"tags":["cache"],"summary":"Get Cache Stats","description":"Get cache statistics and performance metrics.\n\nShows:\n- Total keys cached\n- Cache hit/miss rates\n- Cost savings (estimated API calls avoided)","operationId":"get_cache_stats_api_cache_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/cache/clear/{namespace}":{"post":{"tags":["cache"],"summary":"Clear Cache Namespace","description":"Clear cache for a specific namespace.\n\nNamespaces:\n- embeddings: Clear all cached embeddings (use after model change)\n- chunks: Clear all cached document chunks\n- cloud_listings: Clear all cloud file listings\n- search: Clear all search results","operationId":"clear_cache_namespace_api_cache_clear__namespace__post","parameters":[{"name":"namespace","in":"path","required":true,"schema":{"type":"string","title":"Namespace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cache/invalidate/cloud/{connection_id}":{"post":{"tags":["cache"],"summary":"Invalidate Cloud Cache","description":"Invalidate all cached cloud listings for a connection.\n\nUse this after:\n- Uploading new files to Google Drive/Dropbox\n- Deleting files from cloud storage\n- Moving/renaming files","operationId":"invalidate_cloud_cache_api_cache_invalidate_cloud__connection_id__post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/config":{"post":{"tags":["system"],"summary":"Create System Config","description":"Create or update system configuration","operationId":"create_system_config_api_system_config_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemConfigCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["system"],"summary":"List System Configs","description":"List system configurations","operationId":"list_system_configs_api_system_config_get","parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SystemConfigResponse"},"title":"Response List System Configs Api System Config Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/config/{config_key}":{"get":{"tags":["system"],"summary":"Get System Config","description":"Get system configuration by key. Returns empty default if not yet created.","operationId":"get_system_config_api_system_config__config_key__get","parameters":[{"name":"config_key","in":"path","required":true,"schema":{"type":"string","title":"Config Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["system"],"summary":"Update System Config","description":"Update or create system configuration (upsert).","operationId":"update_system_config_api_system_config__config_key__put","parameters":[{"name":"config_key","in":"path","required":true,"schema":{"type":"string","title":"Config Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemConfigCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/rag":{"post":{"tags":["system"],"summary":"Create Rag Config","description":"Create RAG configuration","operationId":"create_rag_config_api_system_rag_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/core__models__core__RAGConfigCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RAGConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["system"],"summary":"List Rag Configs","description":"List RAG configurations","operationId":"list_rag_configs_api_system_rag_get","parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RAGConfigResponse"},"title":"Response List Rag Configs Api System Rag Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/rag/{config_id}":{"get":{"tags":["system"],"summary":"Get Rag Config","description":"Get RAG configuration by ID","operationId":"get_rag_config_api_system_rag__config_id__get","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RAGConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/rag/{config_id}/test":{"post":{"tags":["system"],"summary":"Test Rag Config","description":"Test RAG configuration with a query","operationId":"test_rag_config_api_system_rag__config_id__test_post","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}},{"name":"query","in":"query","required":true,"schema":{"type":"string","description":"Test query for RAG system","title":"Query"},"description":"Test query for RAG system"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/health":{"get":{"tags":["system"],"summary":"Get System Health","description":"Get system health status. The component checks live in ``api.system_health_checks``.","operationId":"get_system_health_api_system_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemHealthResponse"}}}}}}},"/api/system/metrics":{"get":{"tags":["statistics"],"summary":"Get System Metrics","description":"Get system performance metrics","operationId":"get_system_metrics_api_system_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemMetrics"}}}}}}},"/api/system/test-route":{"get":{"tags":["system"],"summary":"Test Route","operationId":"test_route_api_system_test_route_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/system/agent-types":{"get":{"tags":["system"],"summary":"Get Agent Types","description":"Get available agent types","operationId":"get_agent_types_api_system_agent_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/system/agent-statistics":{"get":{"tags":["system"],"summary":"Get Item","description":"Get comprehensive agent statistics","operationId":"get_item_api_system_agent_statistics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/system/agent/{agent_id}/status":{"get":{"tags":["system"],"summary":"Get Agent Status","description":"Get current status of a specific agent","operationId":"get_agent_status_api_system_agent__agent_id__status_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/performance-baseline":{"get":{"tags":["system"],"summary":"Get Performance Baseline","description":"## 📊 Get Performance Baseline\n\nRetrieves system performance baseline metrics.","operationId":"get_performance_baseline_api_system_performance_baseline_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/system/learning-state/update":{"post":{"tags":["system"],"summary":"Update Learning State","description":"## 🧠 Update Learning State\n\nUpdates the system's learning state with new information.","operationId":"update_learning_state_api_system_learning_state_update_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/performance-test":{"post":{"tags":["system"],"summary":"Run Performance Test","description":"## 🚀 Run Performance Test\n\nExecutes a comprehensive performance test of the system.","operationId":"run_performance_test_api_system_performance_test_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/performance-comparison":{"get":{"tags":["system"],"summary":"Get Performance Comparison","description":"## 📈 Get Performance Comparison\n\nCompares current performance against baseline or historical data.","operationId":"get_performance_comparison_api_system_performance_comparison_get","parameters":[{"name":"baseline_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Baseline Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/state/summary":{"get":{"tags":["system"],"summary":"Get System State Summary","description":"## 📋 Get System State Summary\n\nProvides a comprehensive summary of the current system state.","operationId":"get_system_state_summary_api_system_state_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/memory/stats/real":{"get":{"tags":["Memory Explorer"],"summary":"Get Real Memory Stats","description":"Get memory statistics — Mem0 first, local DB fallback.","operationId":"get_real_memory_stats_api_v1_memory_stats_real_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Real Memory Stats Api V1 Memory Stats Real Get"}}}}}}},"/api/v1/memory/stats/agents":{"get":{"tags":["Memory Explorer"],"summary":"Get Agent Memory Stats","description":"Get memory stats per agent with type/level breakdown.","operationId":"get_agent_memory_stats_api_v1_memory_stats_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response Get Agent Memory Stats Api V1 Memory Stats Agents Get"}}}}}}},"/api/v1/memory/stats/recent":{"get":{"tags":["Memory Explorer"],"summary":"Get Recent Memories","description":"Get most recent memories — Mem0 first, local DB fallback.","operationId":"get_recent_memories_api_v1_memory_stats_recent_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Recent Memories Api V1 Memory Stats Recent Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memory/browse":{"get":{"tags":["Memory Explorer"],"summary":"Browse Memories","description":"Browse/search all memories — PRD-77 Memory Explorer, extended PRD-131d.\n\nQueries BOTH memory layers for the workspace:\n  - L3 (Mem0): distilled facts across global/agent/daily tiers\n  - L2 (Postgres memory_short_term): raw transcripts, mission summaries,\n    task failures, retry recoveries — preserved verbatim\n\nArgs:\n    query: Optional substring/semantic search.\n    limit: Max total rows returned.\n    content_type: Optional CSV filter restricted to L2 (e.g.\n        \"transcript,mission_summary,task_failure,retry_recovery\").\n    tier: Optional scope filter: \"l2\" (short-term only), \"l3\" (Mem0 only),\n        or None/\"all\" for both.","operationId":"browse_memories_api_v1_memory_browse_get","parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"content_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"}},{"name":"tier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Browse Memories Api V1 Memory Browse Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memory/health":{"get":{"tags":["Memory Explorer"],"summary":"Get Memory Health","description":"Memory health report — PRD-77: total count, staleness, and the status with the reason it\nis not healthy (modules/memory/health.py). Queries ALL memory tiers (global, per-agent, daily).","operationId":"get_memory_health_api_v1_memory_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Memory Health Api V1 Memory Health Get"}}}}}}},"/api/v1/memory/layers":{"get":{"tags":["Memory Explorer"],"summary":"Get Memory Layers","description":"Memory layer health endpoint — PRD-79 US-026.\n\nReturns per-layer stats across the 5-layer memory stack:\n  L1 (Redis sessions), L2 (Postgres short-term), L3 (Mem0 long-term),\n  L4 (org knowledge: databases + documents).\nIncludes overall health status and per-layer latency.\nResult is cached for 60s (configurable via MEMORY_LAYERS_CACHE_TTL_SECONDS).","operationId":"get_memory_layers_api_v1_memory_layers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Memory Layers Api V1 Memory Layers Get"}}}}}}},"/api/v1/memory/{memory_id}":{"delete":{"tags":["Memory Admin"],"summary":"Delete Memory","description":"Delete a memory by the id the page shows — PRD-77 / PRD-187 S6. P256-FIX-N14-4: wherever\nin this workspace it was stored (``modules.memory.forget`` reads the point's own namespace;\nthe old check looked in the workspace namespace alone), a private memory by its owner alone.","operationId":"delete_memory_api_v1_memory__memory_id__delete","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Memory Api V1 Memory  Memory Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memory/consolidate":{"post":{"tags":["Memory Admin"],"summary":"Consolidate Memories","description":"Consolidate multiple memories into one — PRD-77 Phase 3.\n'merge' concatenates content; 'summarise' uses LLM to produce a summary.\nDeletes originals after creating the merged entry.","operationId":"consolidate_memories_api_v1_memory_consolidate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolidateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Consolidate Memories Api V1 Memory Consolidate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memory/profiles":{"get":{"tags":["Memory Explorer"],"summary":"List Memory Profiles","description":"The profiles this workspace can pick, by slug; the dial says whether they apply yet.","operationId":"list_memory_profiles_api_v1_memory_profiles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Memory Profiles Api V1 Memory Profiles Get"}}}}}},"post":{"tags":["Memory Explorer"],"summary":"Create Memory Profile","description":"A profile of the workspace's own; one with a seeded profile's slug overrides it.","operationId":"create_memory_profile_api_v1_memory_profiles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Memory Profile Api V1 Memory Profiles Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memory/profiles/{slug}":{"put":{"tags":["Memory Explorer"],"summary":"Update Memory Profile","description":"Replaces what one of the workspace's own profiles says. Seeded profiles can't be changed.","operationId":"update_memory_profile_api_v1_memory_profiles__slug__put","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileFields"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Memory Profile Api V1 Memory Profiles  Slug  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Memory Explorer"],"summary":"Delete Memory Profile","description":"Deletes one of the workspace's own profiles; a seeded one with its slug applies again.","operationId":"delete_memory_profile_api_v1_memory_profiles__slug__delete","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/memory":{"get":{"tags":["Widget Memory"],"summary":"List Memories","description":"List memories for the current workspace.","operationId":"list_memories_api_memory_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max items to return","default":50,"title":"Limit"},"description":"Max items to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Widget Memory"],"summary":"Store Memory","description":"Store a new memory in the current workspace.\n\n201 only when the store says it kept the memory, with the id it kept it under\n(a restated memory returns the existing id). A refused store is a 503:\n``memory_off`` when durable memory is disabled, else ``memory_store_failed``.","operationId":"store_memory_api_memory_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/memory/resume":{"get":{"tags":["Widget Memory"],"summary":"Resume Context","description":"PRD-206 S3: 'Where did we leave off?' — the viewer's recent threads\n(with their S2 checkpoint summaries), recent decisions, open loops and\nsuggested next steps. Private-scoped memories only surface for their\nowner (Q7).","operationId":"resume_context_api_memory_resume_get","parameters":[{"name":"limit_threads","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Max recent threads","default":5,"title":"Limit Threads"},"description":"Max recent threads"},{"name":"limit_items","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max decisions/open loops","default":8,"title":"Limit Items"},"description":"Max decisions/open loops"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/memory/search":{"get":{"tags":["Widget Memory"],"summary":"Search Memories","description":"Search memories by query within the current workspace.","operationId":"search_memories_api_memory_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Search query","title":"Q"},"description":"Search query"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results","default":20,"title":"Limit"},"description":"Max results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemorySearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/memory/{memory_id}":{"delete":{"tags":["Widget Memory"],"summary":"Delete Memory","description":"Delete a memory by ID within the current workspace.","operationId":"delete_memory_api_memory__memory_id__delete","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/dashboard/summary":{"get":{"tags":["analytics"],"summary":"Get Dashboard Summary","description":"Get summary statistics for dashboard","operationId":"get_dashboard_summary_analytics_dashboard_summary_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Number of days for summary","default":7,"title":"Days"},"description":"Number of days for summary"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Dashboard Summary Analytics Dashboard Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/agent-selection/analysis":{"get":{"tags":["analytics"],"summary":"Analyze Agent Selection","description":"Analyze agent selection patterns and effectiveness","operationId":"analyze_agent_selection_analytics_agent_selection_analysis_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Number of days to analyze","default":7,"title":"Days"},"description":"Number of days to analyze"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Analyze Agent Selection Analytics Agent Selection Analysis Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflows/{workflow_id}/executions":{"get":{"tags":["workflow-history"],"summary":"Get Workflow Executions","description":"Get execution history for a workflow.\nReturns list of executions with their metadata.","operationId":"get_workflow_executions_v1_workflows__workflow_id__executions_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Workflow Executions V1 Workflows  Workflow Id  Executions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflows/executions/{execution_id}":{"get":{"tags":["workflow-history"],"summary":"Get Execution Details","description":"Get detailed execution data including memory, communication, and learning data.","operationId":"get_execution_details_v1_workflows_executions__execution_id__get","parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"integer","title":"Execution Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Execution Details V1 Workflows Executions  Execution Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflows/{workflow_id}/live-progress":{"get":{"tags":["workflow-history"],"summary":"Get Live Progress","description":"Get live progress data for an executing workflow.\nThis endpoint is polled during execution to get real-time updates.","operationId":"get_live_progress_v1_workflows__workflow_id__live_progress_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Live Progress V1 Workflows  Workflow Id  Live Progress Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflows/{workflow_id}/store-orchestration-event":{"post":{"tags":["workflow-history"],"summary":"Store Orchestration Event","description":"Store orchestration events (memory, communication, learning) in real-time.\nCalled by the orchestrator during execution.","operationId":"store_orchestration_event_v1_workflows__workflow_id__store_orchestration_event_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"event_type","in":"query","required":true,"schema":{"type":"string","title":"Event Type"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Event Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Store Orchestration Event V1 Workflows  Workflow Id  Store Orchestration Event Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/execution-history/workflow/{workflow_id}/latest":{"get":{"tags":["execution-history"],"summary":"Get Latest Execution","description":"Get the most recent execution for a workflow with full details","operationId":"get_latest_execution_api_execution_history_workflow__workflow_id__latest_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/execution-history/workflow/{workflow_id}/all":{"get":{"tags":["execution-history"],"summary":"Get All Executions","description":"Get all executions for a workflow with pagination","operationId":"get_all_executions_api_execution_history_workflow__workflow_id__all_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/execution-history/execution/{execution_id}/details":{"get":{"tags":["execution-history"],"summary":"Get Execution Details","description":"Get detailed information about a specific execution","operationId":"get_execution_details_api_execution_history_execution__execution_id__details_get","parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"integer","title":"Execution Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/execution-history/execution/{execution_id}/stages":{"get":{"tags":["execution-history"],"summary":"Get Execution Stages","description":"Get the 9-stage pipeline details for an execution","operationId":"get_execution_stages_api_execution_history_execution__execution_id__stages_get","parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"integer","title":"Execution Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/policy/{policy_id}":{"get":{"tags":["context-policy"],"summary":"Read Policy","operationId":"read_policy_api_policy__policy_id__get","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["context-policy"],"summary":"Upsert Policy","operationId":"upsert_policy_api_policy__policy_id__put","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/policy/{policy_id}/assemble":{"post":{"tags":["context-policy"],"summary":"Assemble","operationId":"assemble_api_policy__policy_id__assemble_post","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssembleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/policy/abtest/set":{"post":{"tags":["context-policy"],"summary":"Set Abtest","operationId":"set_abtest_api_policy_abtest_set_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ABSetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/policy/abtest/get":{"get":{"tags":["context-policy"],"summary":"Get Abtest","operationId":"get_abtest_api_policy_abtest_get_get","parameters":[{"name":"policy_a","in":"query","required":true,"schema":{"type":"string","title":"Policy A"}},{"name":"policy_b","in":"query","required":true,"schema":{"type":"string","title":"Policy B"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code-graph/index/github":{"post":{"tags":["code-graph"],"summary":"Index Github Repository","description":"Index a GitHub repository\n\n**Example:**\n```json\n{\n    \"project_name\": \"automatos-ai\",\n    \"github_url\": \"https://github.com/AutomatosAI/automatos-ai.git\",\n    \"branch\": \"main\",\n    \"exclude_patterns\": [\"tests\", \"docs\"]\n}\n```\n\n**What it does:**\n- Clones the repository (shallow clone for speed)\n- Parses Python and TypeScript/JavaScript files\n- Extracts functions, classes, and symbols\n- Generates semantic embeddings\n- Stores in database for search","operationId":"index_github_repository_api_code_graph_index_github_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexGitHubRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code-graph/search/symbols":{"get":{"tags":["code-graph"],"summary":"Search Symbols","description":"Search for code symbols by name (exact/fuzzy matching)\n\n**Example:**\n```\nGET /api/code-graph/search/symbols?project=automatos-ai&q=authenticate&limit=5\n```\n\n**Search types:**\n- Exact match: `authenticate_user` finds `authenticate_user()`\n- Fuzzy match: `auth` finds `authenticate_user()`, `AuthService`, etc.\n- Qualified: `api.auth` finds symbols in `api/auth.py`","operationId":"search_symbols_api_code_graph_search_symbols_get","parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string","description":"Project name","title":"Project"},"description":"Project name"},{"name":"q","in":"query","required":true,"schema":{"type":"string","description":"Search query","title":"Q"},"description":"Search query"},{"name":"symbol_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by symbol type (function, class, etc.)","title":"Symbol Type"},"description":"Filter by symbol type (function, class, etc.)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Maximum results","default":10,"title":"Limit"},"description":"Maximum results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code-graph/search/semantic":{"get":{"tags":["code-graph"],"summary":"Search Semantic","description":"Semantic search using vector similarity\n\n**Example:**\n```\nGET /api/code-graph/search/semantic?project=automatos-ai&q=user authentication flow\n```\n\n**How it works:**\n- Converts your query to a vector embedding\n- Finds code with similar semantic meaning\n- Returns ranked results with relevance scores\n\n**Use cases:**\n- \"How do I validate user input?\" → finds validation functions\n- \"Database connection setup\" → finds DB initialization code\n- \"Error handling patterns\" → finds try/catch blocks","operationId":"search_semantic_api_code_graph_search_semantic_get","parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string","description":"Project name","title":"Project"},"description":"Project name"},{"name":"q","in":"query","required":true,"schema":{"type":"string","description":"Semantic search query","title":"Q"},"description":"Semantic search query"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Maximum results","default":10,"title":"Limit"},"description":"Maximum results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code-graph/projects":{"get":{"tags":["code-graph"],"summary":"Get Item","description":"List all indexed projects\n\nReturns metadata for all projects including:\n- Indexing statistics\n- File and symbol counts\n- Last indexed timestamp\n- Project status","operationId":"get_item_api_code_graph_projects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProjectResponse"},"type":"array","title":"Response Get Item Api Code Graph Projects Get"}}}}}}},"/api/code-graph/projects/{project_id}":{"get":{"tags":["code-graph"],"summary":"Get Project","description":"Get project details by ID","operationId":"get_project_api_code_graph_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["code-graph"],"summary":"Delete Project","description":"Delete a project and all associated data\n\n**Warning:** This permanently deletes:\n- All symbols and code snippets\n- All relationships and call graphs\n- All search history\n- File metadata\n\nThis action cannot be undone.","operationId":"delete_project_api_code_graph_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code-graph/projects/{project_id}/reindex":{"post":{"tags":["code-graph"],"summary":"Reindex Project","description":"Re-index an existing project (runs in background)\n\n**Use cases:**\n- Code has been updated\n- Need to refresh embeddings\n- Fix indexing errors\n\n**Note:** Existing data will be replaced. Returns immediately, indexing runs in background.","operationId":"reindex_project_api_code_graph_projects__project_id__reindex_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code-graph/projects/{project_id}/auto-reindex":{"patch":{"tags":["code-graph"],"summary":"Set Project Auto Reindex","description":"Enable/disable push-driven auto-reindex for a project (PRD-183 S4, F022).\n\nThe GitHub push webhook only reindexes projects whose ``auto_reindex`` is\non. This is the setter that flag never had — without it the webhook could\nnever match a project. Workspace-scoped: only the owning tenant can flip it.","operationId":"set_project_auto_reindex_api_code_graph_projects__project_id__auto_reindex_patch","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoReindexRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code-graph/health":{"get":{"tags":["code-graph"],"summary":"Health Check","description":"Health check endpoint","operationId":"health_check_api_code_graph_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/code-graph/call-graph":{"get":{"tags":["code-graph"],"summary":"Get Call Graph Api","description":"Retrieve the call graph or dependency tree for a given symbol.\nReturns nodes and edges for visualization of code relationships.\n\nExample: /api/code-graph/call-graph?project=Automatos-ai&symbol=AgentFactory&depth=2","operationId":"get_call_graph_api_api_code_graph_call_graph_get","parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string","description":"Project name","title":"Project"},"description":"Project name"},{"name":"symbol","in":"query","required":true,"schema":{"type":"string","description":"Qualified name of the root symbol","title":"Symbol"},"description":"Qualified name of the root symbol"},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","maximum":5,"minimum":1,"description":"Depth of the call graph traversal","default":1,"title":"Depth"},"description":"Depth of the call graph traversal"},{"name":"direction","in":"query","required":false,"schema":{"type":"string","description":"Traversal direction: 'outgoing', 'incoming', 'both'","default":"outgoing","title":"Direction"},"description":"Traversal direction: 'outgoing', 'incoming', 'both'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code-graph/projects/{project_id}/architecture":{"get":{"tags":["code-graph"],"summary":"Get Architecture Analysis","description":"Get architecture analysis: Louvain module clusters, coupling metrics,\nhotspots, and circular dependencies.","operationId":"get_architecture_analysis_api_code_graph_projects__project_id__architecture_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code-graph/projects/{project_id}/ask":{"post":{"tags":["code-graph"],"summary":"Ask Code Question","description":"Ask a natural language question about the codebase.\nExamples: \"What functions call authenticate?\", \"Show me all API endpoints\"","operationId":"ask_code_question_api_code_graph_projects__project_id__ask_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeQuestionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code-graph/webhook/github":{"post":{"tags":["code-graph"],"summary":"Github Push Webhook","description":"GitHub push webhook → reindex matching projects that have auto_reindex on.\n\nSignature-verified with GITHUB_WEBHOOK_SECRET as ``POST /api/github/webhook`` is\n(``require_github_signature``): with no secret configured every delivery is refused.\nReturns immediately; each reindex runs in the background (PRD-165 S4 / Q33).","operationId":"github_push_webhook_api_code_graph_webhook_github_post","parameters":[{"name":"x-hub-signature-256","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Hub-Signature-256"}},{"name":"x-github-event","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Github-Event"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/github/webhook":{"post":{"tags":["github"],"summary":"Github Webhook","description":"GitHub webhook endpoint for PR events\n\nConfigure in GitHub:\n1. Go to repo Settings → Webhooks → Add webhook\n2. Payload URL: {API_URL}/api/github/webhook (replace {API_URL} with your API server URL)\n3. Content type: application/json\n4. Secret: (set GITHUB_WEBHOOK_SECRET env var)\n5. Events: Pull requests","operationId":"github_webhook_api_github_webhook_post","parameters":[{"name":"x-github-event","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Github-Event"}},{"name":"x-hub-signature-256","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Hub-Signature-256"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/github/health":{"get":{"tags":["github"],"summary":"Github Integration Health","description":"Liveness of the GitHub integration's routes.","operationId":"github_integration_health_api_github_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/patterns/":{"get":{"tags":["patterns"],"summary":"List Patterns","description":"List all patterns","operationId":"list_patterns_api_patterns__get","parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["patterns"],"summary":"Create Pattern","description":"Create a new pattern","operationId":"create_pattern_api_patterns__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatternCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patterns/{pattern_id}":{"get":{"tags":["patterns"],"summary":"Get Pattern","description":"Get a specific pattern by ID","operationId":"get_pattern_api_patterns__pattern_id__get","parameters":[{"name":"pattern_id","in":"path","required":true,"schema":{"type":"integer","title":"Pattern Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["patterns"],"summary":"Delete Pattern","description":"Delete a pattern","operationId":"delete_pattern_api_patterns__pattern_id__delete","parameters":[{"name":"pattern_id","in":"path","required":true,"schema":{"type":"integer","title":"Pattern Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/context/add":{"post":{"tags":["Context Engineering"],"summary":"Add To Context","description":"Add database query results to context system.\nMakes query results available for AI agent context and future retrieval.","operationId":"add_to_context_api_context_add_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextAddRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/context/stats":{"get":{"tags":["Context Engineering"],"summary":"Get Context Stats","description":"Get real-time context engineering statistics (workspace-scoped)","operationId":"get_context_stats_api_context_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/context/performance":{"get":{"tags":["Context Engineering"],"summary":"Get Rag Performance Data","description":"Get RAG performance data for charts","operationId":"get_rag_performance_data_api_context_performance_get","parameters":[{"name":"time_range","in":"query","required":false,"schema":{"type":"string","pattern":"^(1h|24h|7d|30d)$","description":"Time range: 1h, 24h, 7d, or 30d","default":"24h","title":"Time Range"},"description":"Time range: 1h, 24h, 7d, or 30d"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/context/sources":{"get":{"tags":["Context Engineering"],"summary":"Get Context Sources","description":"Get context sources distribution","operationId":"get_context_sources_api_context_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/context/queries/recent":{"get":{"tags":["Context Engineering"],"summary":"Get Recent Queries","description":"Get recent context queries","operationId":"get_recent_queries_api_context_queries_recent_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/context/patterns":{"get":{"tags":["Context Engineering"],"summary":"Get Context Patterns","description":"Get context patterns based on RAG configurations","operationId":"get_context_patterns_api_context_patterns_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/context/rag/{config_id}/test":{"post":{"tags":["Context Engineering"],"summary":"Test Rag Configuration","description":"Test RAG configuration with real retrieval","operationId":"test_rag_configuration_api_context_rag__config_id__test_post","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}},{"name":"query","in":"query","required":true,"schema":{"type":"string","description":"Test query for RAG system","title":"Query"},"description":"Test query for RAG system"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/context/system/health":{"get":{"tags":["Context Engineering"],"summary":"Get Context System Health","description":"Get context engineering system health (workspace-scoped)","operationId":"get_context_system_health_api_context_system_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/context/initialize":{"post":{"tags":["Context Engineering"],"summary":"Initialize Context System","description":"Initialize or reinitialize the context engineering system","operationId":"initialize_context_system_api_context_initialize_post","parameters":[{"name":"database_url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/context/optimize":{"get":{"tags":["Context Engineering"],"summary":"Get Optimization Recommendations","description":"Analyze context system and provide optimization recommendations (Workspace Scoped)","operationId":"get_optimization_recommendations_api_context_optimize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/context/rag/config":{"get":{"tags":["Context Engineering"],"summary":"List Rag Configurations","description":"List all RAG configurations","operationId":"list_rag_configurations_api_context_rag_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Context Engineering"],"summary":"Create Rag Configuration","description":"Create a new RAG configuration pattern","operationId":"create_rag_configuration_api_context_rag_config_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__context__RAGConfigCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/context/rag/config/{config_id}":{"get":{"tags":["Context Engineering"],"summary":"Get Rag Configuration","description":"Get a specific RAG configuration","operationId":"get_rag_configuration_api_context_rag_config__config_id__get","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Context Engineering"],"summary":"Update Rag Configuration","description":"Update a RAG configuration","operationId":"update_rag_configuration_api_context_rag_config__config_id__put","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RAGConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Context Engineering"],"summary":"Delete Rag Configuration","description":"Delete a RAG configuration","operationId":"delete_rag_configuration_api_context_rag_config__config_id__delete","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/credentials/types":{"get":{"tags":["🔐 Credential Management"],"summary":"List Credential Types","description":"List all available credential types.\nReturns all 400+ credential type definitions for dynamic form generation.","operationId":"list_credential_types_api_credentials_types_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only active types","default":true,"title":"Active Only"},"description":"Only active types"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CredentialTypeResponse"},"title":"Response List Credential Types Api Credentials Types Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/credentials/types/categories":{"get":{"tags":["🔐 Credential Management"],"summary":"List Credential Categories","description":"Get list of all credential categories","operationId":"list_credential_categories_api_credentials_types_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response List Credential Categories Api Credentials Types Categories Get"}}}}}}},"/api/credentials/types/{type_id}":{"get":{"tags":["🔐 Credential Management"],"summary":"Get Credential Type","description":"Get a specific credential type with full schema definition","operationId":"get_credential_type_api_credentials_types__type_id__get","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"integer","title":"Type Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/credentials/types/by-name/{type_name}":{"get":{"tags":["🔐 Credential Management"],"summary":"Get Credential Type By Name","description":"Get credential type by name (e.g., 'openai_api', 'postgres_credentials')","operationId":"get_credential_type_by_name_api_credentials_types_by_name__type_name__get","parameters":[{"name":"type_name","in":"path","required":true,"schema":{"type":"string","title":"Type Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/credentials/":{"post":{"tags":["🔐 Credential Management"],"summary":"Handle Request","description":"Create a new credential with encryption.\nCredential values are immediately encrypted and never stored in plaintext.","operationId":"handle_request_api_credentials__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["🔐 Credential Management"],"summary":"Get Item","description":"List all credentials with pagination (values are NEVER returned for security).\nReturns metadata only - use resolve endpoint to get actual values.\n\nPRD-20: Now with pagination support for 400+ credentials!","operationId":"get_item_api_credentials__get","parameters":[{"name":"credential_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by type","title":"Credential Type Id"},"description":"Filter by type"},{"name":"environment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by environment","title":"Environment"},"description":"Filter by environment"},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only active credentials","default":true,"title":"Active Only"},"description":"Only active credentials"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by tags (comma-separated)","title":"Tags"},"description":"Filter by tags (comma-separated)"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search in name or description","title":"Search"},"description":"Search in name or description"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of items to skip (for pagination)","default":0,"title":"Skip"},"description":"Number of items to skip (for pagination)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items per page","default":20,"title":"Limit"},"description":"Number of items per page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/credentials/health":{"get":{"tags":["🔐 Credential Management"],"summary":"Credentials Health","description":"Health check for credentials service","operationId":"credentials_health_api_credentials_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/credentials/stats":{"get":{"tags":["🔐 Credential Management"],"summary":"Get Credential Stats","description":"Get credential system statistics","operationId":"get_credential_stats_api_credentials_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/credentials/{credential_id}":{"get":{"tags":["🔐 Credential Management"],"summary":"Get Credential","description":"Get credential with decrypted values for editing","operationId":"get_credential_api_credentials__credential_id__get","parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"integer","title":"Credential Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["🔐 Credential Management"],"summary":"Update Credential","description":"Update an existing credential","operationId":"update_credential_api_credentials__credential_id__put","parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"integer","title":"Credential Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["🔐 Credential Management"],"summary":"Delete Credential","description":"Securely delete a credential","operationId":"delete_credential_api_credentials__credential_id__delete","parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"integer","title":"Credential Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/credentials/{credential_id}/test":{"post":{"tags":["🔐 Credential Management"],"summary":"Test Credential","description":"Test a credential to verify it works.\nTests database connections, API calls, etc. based on credential type.","operationId":"test_credential_api_credentials__credential_id__test_post","parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"integer","title":"Credential Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/credentials/resolve":{"post":{"tags":["🔐 Credential Management"],"summary":"Resolve Credential","description":"Resolve and decrypt a credential for service use.\n\n⚠️ SECURITY WARNING: Returns decrypted credential values!\nRestricted to admin users and API key authentication only.\nAll access is audited.","operationId":"resolve_credential_api_credentials_resolve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/credentials/audit/logs":{"get":{"tags":["🔐 Credential Management"],"summary":"Get Audit Logs","description":"Get credential audit logs with filtering","operationId":"get_audit_logs_api_credentials_audit_logs_get","parameters":[{"name":"credential_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credential Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CredentialAuditLogResponse"},"title":"Response Get Audit Logs Api Credentials Audit Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/credentials/cache/clear":{"post":{"tags":["🔐 Credential Management"],"summary":"Clear Credential Cache","description":"Clear credential cache (useful after updates)","operationId":"clear_credential_cache_api_credentials_cache_clear_post","parameters":[{"name":"credential_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Specific credential to clear","title":"Credential Name"},"description":"Specific credential to clear"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system-settings/":{"get":{"tags":["system-settings"],"summary":"List System Settings","description":"List all system settings, optionally filtered by category; a secret without its value.","operationId":"list_system_settings_api_system_settings__get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SystemSettingResponse"},"title":"Response List System Settings Api System Settings  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system-settings/by-category":{"get":{"tags":["system-settings"],"summary":"Get Settings By Category","description":"Get all settings grouped by category; a secret without its value.","operationId":"get_settings_by_category_api_system_settings_by_category_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SystemSettingsByCategory"},"type":"array","title":"Response Get Settings By Category Api System Settings By Category Get"}}}}}}},"/api/system-settings/bulk-update":{"post":{"tags":["system-settings"],"summary":"Bulk Update Settings","description":"Bulk update settings: one row or many, the one way a setting is changed here. A plain ``def``\n(AGENTS.md: no sync session on the event loop): FastAPI runs it, and the Auto restamp it may trigger,\nin its threadpool.\n\nOnly a row whose value changes is written, with when and by whom; an item with ``set_here: true`` for a\nrow not set here and not locked is written at any value, and the row is then set here. A secret sent with an empty\n``value`` keeps its value; ``{\"id\": <id>, \"remove\": true}`` empties a secret, and is refused for any\nother row. Answers ``{message, settings}``, ``settings`` being the rows changed as the list answers\nthem, with ``auto_models`` when the platform default for Auto moved.","operationId":"bulk_update_settings_api_system_settings_bulk_update_post","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BulkUpdateItem"},"type":"array","title":"Updates"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system-settings/reset-preview":{"get":{"tags":["system-settings"],"summary":"Preview Reset","description":"The rows ``POST /reset-to-defaults`` with the same ``category`` (and ``key``) would change, each with\nits value now and its default; nothing is changed. A secret, a row the environment holds, and a row at\nits default and not set here, is never listed. Who may reset may ask (a plain ``def``, as\nbulk_update_settings).","operationId":"preview_reset_api_system_settings_reset_preview_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system-settings/reset-to-defaults":{"post":{"tags":["system-settings"],"summary":"Reset Settings To Defaults","description":"Return the rows of ``category`` (every category when none is given), or the one row ``key`` names in\n``category`` (the screen's per-row Reset), to their defaults: the rows ``GET /reset-preview`` lists. The\nsetting then takes the environment's value where the environment sets it, else the default. A secret is\nnever reset; a row the environment holds is skipped, and a reset of that one row is refused (409). Each\nrow changed loses its ``set_at`` and ``set_by`` and gets one audit record. Answers\n``{message, settings}``, ``settings`` being the rows changed as the list answers them. A reset that\nmoves the platform default for Auto restamps the Auto rows on it, as an update does (a plain\n``def``, as bulk_update_settings).","operationId":"reset_settings_to_defaults_api_system_settings_reset_to_defaults_post","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tools/marketplace":{"get":{"tags":["Tools"],"summary":"Marketplace","operationId":"marketplace_api_tools_marketplace_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"exclude_connected","in":"query","required":false,"schema":{"type":"boolean","description":"Leave out the apps this workspace has connected","default":false,"title":"Exclude Connected"},"description":"Leave out the apps this workspace has connected"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tools/stats":{"get":{"tags":["Tools"],"summary":"Stats","operationId":"stats_api_tools_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsOut"}}}}}}},"/api/tools/integrations/status":{"get":{"tags":["Tools"],"summary":"Integrations Status","description":"Whether Composio integrations can run here — and why not when they can't.\n\n``available`` is the SAME predicate the tool router uses to decide whether\nComposio tools are offered at all (PRD-233 S2), so the Tools page and the\nmodel always agree. ``apps_cached`` / ``last_sync`` describe the local\ncatalogue (``composio_apps_cache``), which syncs itself on the first keyed\nboot.","operationId":"integrations_status_api_tools_integrations_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsStatusOut"}}}}}}},"/api/tools/connected":{"get":{"tags":["Tools"],"summary":"Connected","description":"The workspace's connected apps for the Tools page, and the apps its agents need that are\nnot connected. Each pending row is settled from Composio first (F258), so a sign-in whose\ncallback was missed is listed once Composio reports it ACTIVE.\n\nA plain ``def`` (F257): settling asks Composio, a synchronous SDK call, so FastAPI\nruns the route in its threadpool and the event loop never waits on it.","operationId":"connected_api_tools_connected_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/tools/{app_name}/actions":{"get":{"tags":["Tools"],"summary":"App Actions","description":"Get actions for an app with enabled state for this workspace.","operationId":"app_actions_api_tools__app_name__actions_get","parameters":[{"name":"app_name","in":"path","required":true,"schema":{"type":"string","title":"App Name"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20000,"minimum":1,"default":5000,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Tools"],"summary":"Save App Actions","description":"Persist enabled actions for an app in this workspace.","operationId":"save_app_actions_api_tools__app_name__actions_post","parameters":[{"name":"app_name","in":"path","required":true,"schema":{"type":"string","title":"App Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tools/{app_name}/triggers":{"get":{"tags":["Tools"],"summary":"App Triggers","description":"Get triggers for an app.\n\nTriggers are synced into `composio_apps_cache.metadata[\"triggers\"]` during `/api/tools/sync`.\nThis avoids schema changes while still exposing all Composio trigger types in the UI.","operationId":"app_triggers_api_tools__app_name__triggers_get","parameters":[{"name":"app_name","in":"path","required":true,"schema":{"type":"string","title":"App Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tools/":{"get":{"tags":["Tools"],"summary":"Tools Index","description":"The obvious call. ``GET /api/tools`` 404'd on night 1 (2026-09-18) — every\nsub-path existed and the collection root did not — so anything that tried the\nnatural URL first got nothing and had to guess.\n\nReturns this workspace's connected apps (``active`` only, PRD-286 R7, read from the\ndatabase without asking Composio) and the apps its agents need connected, the same\nshape as ``/connected``, plus the routes that answer the narrower questions.","operationId":"tools_index_api_tools__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/tools":{"get":{"tags":["Tools"],"summary":"Tools Index","description":"The obvious call. ``GET /api/tools`` 404'd on night 1 (2026-09-18) — every\nsub-path existed and the collection root did not — so anything that tried the\nnatural URL first got nothing and had to guess.\n\nReturns this workspace's connected apps (``active`` only, PRD-286 R7, read from the\ndatabase without asking Composio) and the apps its agents need connected, the same\nshape as ``/connected``, plus the routes that answer the narrower questions.","operationId":"tools_index_api_tools_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/tools/debug/connections":{"get":{"tags":["Tools"],"summary":"Debug Connections","description":"DEBUG: Show all connection records for this workspace","operationId":"debug_connections_api_tools_debug_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/tools/sync":{"post":{"tags":["Tools"],"summary":"Sync","description":"Refresh the Composio catalogue cache for the whole install: system admins only.","operationId":"sync_api_tools_sync_post","parameters":[{"name":"sync_type","in":"query","required":false,"schema":{"type":"string","description":"full or incremental","default":"full","title":"Sync Type"},"description":"full or incremental"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Sync Api Tools Sync Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tools/sync/backfill-params":{"post":{"tags":["Tools"],"summary":"Backfill Params","description":"Backfill parameter schemas for actions with empty params (no full sync needed).\n\nAdmin-only endpoint. Accepts API key auth without requiring workspace context\n(parameter backfill is a global operation, not workspace-scoped).","operationId":"backfill_params_api_tools_sync_backfill_params_post","parameters":[{"name":"apps","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated app names (e.g. JIRA,GITHUB,SLACK). Omit for auto.","title":"Apps"},"description":"Comma-separated app names (e.g. JIRA,GITHUB,SLACK). Omit for auto."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tools/refresh-connections":{"post":{"tags":["Tools"],"summary":"Refresh Connections","description":"Manually refresh pending connections from Composio.\n\nThis endpoint settles every pending connection from Composio's record (F258):\nconnected, ended (Connect is offered again) or still under way. Use this after\nOAuth callbacks to ensure UI reflects the latest state.\n\nPERFORMANCE NOTE: This makes API calls to Composio and should NOT\nbe called on every page load. Use only when explicitly needed. A plain ``def``\n(F257), so those calls never hold up the event loop.","operationId":"refresh_connections_api_tools_refresh_connections_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/tools/sync/history":{"get":{"tags":["Tools"],"summary":"Sync History","description":"The install's last catalogue sync jobs: system admins only, as the sync itself.","operationId":"sync_history_api_tools_sync_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Sync History Api Tools Sync History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tools/{app_name}/suggestions":{"get":{"tags":["Tools"],"summary":"Get Tool Suggestions","description":"Get suggestion prompts for a specific tool/app.\n\nPhase 1: Returns curated suggestions if available, otherwise generates\nbasic suggestions from action schemas.\n\nPhase 2 (PRD-41): If session_id provided, merges context-aware\nsuggestions based on recent tool results from Mem0.\n\nArgs:\n    app_name: The Composio app name (case-insensitive)\n    session_id: Optional session ID for context filtering\n\nReturns:\n    SuggestionsOut with app name, suggestions list, source type, and has_context flag","operationId":"get_tool_suggestions_api_tools__app_name__suggestions_get","parameters":[{"name":"app_name","in":"path","required":true,"schema":{"type":"string","title":"App Name"}},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wizard/start":{"post":{"tags":["Business Intake Wizard"],"summary":"Start Wizard","description":"Create a business profile for the workspace and return its id.","operationId":"start_wizard_api_wizard_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wizard/scan/{profile_id}":{"post":{"tags":["Business Intake Wizard"],"summary":"Scan Domain","description":"Run Firecrawl map + archetype detection. No scraping yet.","operationId":"scan_domain_api_wizard_scan__profile_id__post","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wizard/scrape/{profile_id}":{"post":{"tags":["Business Intake Wizard"],"summary":"Scrape Selected","description":"Kick off the scrape→ingest→graphify→profile pipeline in the background.\n\nReturns 202 immediately so the HTTP connection doesn't have to stay\nopen for the 10-20min graphify phase. The frontend watches\n``GET /progress/{profile_id}`` for live updates and the final\n``stage=complete`` event.","operationId":"scrape_selected_api_wizard_scrape__profile_id__post","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeBody"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeAcceptedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wizard/progress/{profile_id}":{"get":{"tags":["Business Intake Wizard"],"summary":"Progress Feed","description":"Server-Sent Events stream of wizard pipeline progress.\n\nReplays buffered events then subscribes live. Returns when the\npipeline emits a terminal stage (``complete`` or ``failed``).","operationId":"progress_feed_api_wizard_progress__profile_id__get","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wizard/profile/{profile_id}":{"patch":{"tags":["Business Intake Wizard"],"summary":"Patch Profile","description":"User edits to the extracted profile (Step 6 of the wizard).","operationId":"patch_profile_api_wizard_profile__profile_id__patch","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Patch Profile Api Wizard Profile  Profile Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Business Intake Wizard"],"summary":"Get Profile","description":"Fetch the current profile — used by the frontend after the SSE\n``stage=complete`` event lands to pull the finished profile state.","operationId":"get_profile_api_wizard_profile__profile_id__get","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Profile Api Wizard Profile  Profile Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wizard/plan/{profile_id}":{"post":{"tags":["Business Intake Wizard"],"summary":"Generate Plan","description":"Launch the onboarding build as a real mission in the Coordinator.\n\nConverts the scraped business profile into a rich natural-language\ngoal and hands it to ``CoordinatorService.create_mission()``. The\ncoordinator owns planning, task decomposition, agent dispatch and\noutput summarization — this endpoint just kicks it off and returns\nthe ``mission_id`` so the wizard can redirect to the mission page.","operationId":"generate_plan_api_wizard_plan__profile_id__post","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/agents/statistics":{"get":{"tags":["statistics"],"summary":"Get Agent Statistics","description":"Get comprehensive agent statistics for dashboard","operationId":"get_agent_statistics_api_system_agents_statistics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentStatistics"}}}}}}},"/api/system/skills/statistics":{"get":{"tags":["statistics"],"summary":"Get Skill Statistics","description":"Get skill-related statistics","operationId":"get_skill_statistics_api_system_skills_statistics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/system/patterns/statistics":{"get":{"tags":["statistics"],"summary":"Get Pattern Statistics","description":"Get pattern-related statistics","operationId":"get_pattern_statistics_api_system_patterns_statistics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/system/performance/statistics":{"get":{"tags":["statistics"],"summary":"Get Performance Statistics","description":"Get performance-related statistics","operationId":"get_performance_statistics_api_system_performance_statistics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/skills/sources/git":{"post":{"tags":["skills-prd22"],"summary":"Import Git Repository","description":"Import skills from a Git repository.\n\nThis clones the repository, indexes all SKILL.md files, and creates\nskill records in the database.\n\nExample:\n    POST /api/v1/skills/sources/git\n    {\n        \"git_url\": \"https://github.com/anthropics/skills.git\",\n        \"source_name\": \"anthropic-official\",\n        \"branch\": \"main\",\n        \"auto_update\": true\n    }","operationId":"import_git_repository_api_v1_skills_sources_git_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitSkillSourceCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Import Git Repository Api V1 Skills Sources Git Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skills/sources":{"get":{"tags":["skills-prd22"],"summary":"List Skill Sources","description":"List all skill sources.\n\nExample:\n    GET /api/v1/skills/sources\n    GET /api/v1/skills/sources?source_type=git&status=active","operationId":"list_skill_sources_api_v1_skills_sources_get","parameters":[{"name":"source_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source type","title":"Source Type"},"description":"Filter by source type"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SkillSourceResponse"},"title":"Response List Skill Sources Api V1 Skills Sources Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skills/sources/{source_id}":{"get":{"tags":["skills-prd22"],"summary":"Get Skill Source","description":"Get details of a specific skill source.\n\nExample:\n    GET /api/v1/skills/sources/1","operationId":"get_skill_source_api_v1_skills_sources__source_id__get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillSourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["skills-prd22"],"summary":"Deactivate Skill Source","description":"Deactivate a skill source (soft delete).\n\nExample:\n    DELETE /api/v1/skills/sources/1?deactivate_skills=true","operationId":"deactivate_skill_source_api_v1_skills_sources__source_id__delete","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}},{"name":"deactivate_skills","in":"query","required":false,"schema":{"type":"boolean","description":"Also deactivate associated skills","default":false,"title":"Deactivate Skills"},"description":"Also deactivate associated skills"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skills/sources/{source_id}/update":{"post":{"tags":["skills-prd22"],"summary":"Update Git Repository","description":"Update a Git repository (git pull) and re-index skills.\n\nExample:\n    POST /api/v1/skills/sources/1/update","operationId":"update_git_repository_api_v1_skills_sources__source_id__update_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Git Repository Api V1 Skills Sources  Source Id  Update Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skills/sources/{source_id}/rollback":{"post":{"tags":["skills-prd22"],"summary":"Rollback Git Repository","description":"Rollback a Git repository to a specific commit.\n\nExample:\n    POST /api/v1/skills/sources/1/rollback?commit_sha=abc123","operationId":"rollback_git_repository_api_v1_skills_sources__source_id__rollback_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}},{"name":"commit_sha","in":"query","required":true,"schema":{"type":"string","description":"Commit SHA to rollback to","title":"Commit Sha"},"description":"Commit SHA to rollback to"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Rollback Git Repository Api V1 Skills Sources  Source Id  Rollback Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skills":{"get":{"tags":["skills-prd22"],"summary":"List Skills","description":"List skills with filtering and pagination.\n\nExample:\n    GET /api/v1/skills?category=development&limit=20\n    GET /api/v1/skills?search=security&tags=authentication,authorization","operationId":"list_skills_api_v1_skills_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated tags","title":"Tags"},"description":"Comma-separated tags"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnhancedSkillResponse"},"title":"Response List Skills Api V1 Skills Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skills/{skill_id}":{"get":{"tags":["skills-prd22"],"summary":"Get Skill Details","description":"Get detailed information about a specific skill.\n\nExample:\n    GET /api/v1/skills/123","operationId":"get_skill_details_api_v1_skills__skill_id__get","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"integer","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnhancedSkillResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["skills-prd22"],"summary":"Deactivate Skill","description":"Deactivate a skill (soft delete).\n\nExample:\n    DELETE /api/v1/skills/123","operationId":"deactivate_skill_api_v1_skills__skill_id__delete","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"integer","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skills/{skill_id}/content":{"get":{"tags":["skills-prd22"],"summary":"Get Skill Content","description":"Get skill content at different load levels (progressive disclosure).\n\nExamples:\n    GET /api/v1/skills/123/content?level=1  # Metadata only\n    GET /api/v1/skills/123/content?level=2  # Core content\n    GET /api/v1/skills/123/content?level=3&resource_path=advanced.md  # Specific resource","operationId":"get_skill_content_api_v1_skills__skill_id__content_get","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"integer","title":"Skill Id"}},{"name":"level","in":"query","required":false,"schema":{"type":"integer","maximum":3,"minimum":1,"description":"Load level: 1=metadata, 2=core, 3=resource","default":2,"title":"Level"},"description":"Load level: 1=metadata, 2=core, 3=resource"},{"name":"resource_path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Resource path for level 3","title":"Resource Path"},"description":"Resource path for level 3"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillContentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skills/admin/cleanup-old-mappings":{"post":{"tags":["skills-prd22"],"summary":"Cleanup Old Skill Mappings","description":"Remove all skill-agent mappings for skills with source='Unknown' (legacy skills).\nThis helps clean up old mappings before migrating to PRD-22 skills.","operationId":"cleanup_old_skill_mappings_api_v1_skills_admin_cleanup_old_mappings_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/skills/agents/{agent_id}/skills":{"get":{"tags":["skills-prd22"],"summary":"Get Agent Skills","description":"Get skills assigned to a specific agent.\n\nExample:\n    GET /api/v1/skills/agents/456/skills","operationId":"get_agent_skills_api_v1_skills_agents__agent_id__skills_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSkillsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["skills-prd22"],"summary":"Assign Skills To Agent","description":"Assign skills to an agent.\n\nExample:\n    POST /api/v1/skills/agents/456/skills\n    {\n        \"skill_ids\": [1, 2, 3]\n    }","operationId":"assign_skills_to_agent_api_v1_skills_agents__agent_id__skills_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"replace","in":"query","required":false,"schema":{"type":"boolean","description":"Replace existing skills instead of adding","default":false,"title":"Replace"},"description":"Replace existing skills instead of adding"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"},"title":"Skill Ids"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["skills-prd22"],"summary":"Remove Skills From Agent","description":"Remove skills from an agent.\n\nExample:\n    DELETE /api/v1/skills/agents/456/skills?skill_ids=1&skill_ids=2","operationId":"remove_skills_from_agent_api_v1_skills_agents__agent_id__skills_delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"skill_ids","in":"query","required":true,"schema":{"type":"array","items":{"type":"integer"},"description":"Skill IDs to remove","title":"Skill Ids"},"description":"Skill IDs to remove"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/skills/recommend":{"post":{"tags":["skills-prd22"],"summary":"Recommend Skills","description":"Get AI-recommended skills for a task.\n\nExample:\n    POST /api/v1/skills/recommend\n    {\n        \"task_description\": \"I need to analyze and refactor legacy Python code\",\n        \"task_type\": \"development\",\n        \"limit\": 5\n    }","operationId":"recommend_skills_api_v1_skills_recommend_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillRecommendationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SkillRecommendation"},"type":"array","title":"Response Recommend Skills Api V1 Skills Recommend Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/":{"get":{"tags":["templates"],"summary":"Get Agent Templates","description":"Get all available agent templates for the creation wizard","operationId":"get_agent_templates_api_templates__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentTemplate"},"type":"array","title":"Response Get Agent Templates Api Templates  Get"}}}}}}},"/api/templates/templates/{agent_type}":{"get":{"tags":["templates"],"summary":"Get Template By Type","description":"Get a specific template by agent type","operationId":"get_template_by_type_api_templates_templates__agent_type__get","parameters":[{"name":"agent_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AgentType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/templates/skills/suggestions":{"get":{"tags":["templates"],"summary":"Get Skill Suggestions","description":"Get skill suggestions based on agent type","operationId":"get_skill_suggestions_api_templates_templates_skills_suggestions_get","parameters":[{"name":"agent_type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AgentType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/templates/creation-wizard/config":{"get":{"tags":["templates"],"summary":"Get Creation Wizard Config","description":"Get configuration options for the agent creation wizard","operationId":"get_creation_wizard_config_api_templates_creation_wizard_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/context/summarize":{"post":{"tags":["🧠 Context Engineering"],"summary":"Summarize Session Context","description":"Compress session context using hierarchical summarization (Context Engineering 2.0 'self-baking')","operationId":"summarize_context_api_context_summarize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummarizationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/context/memory-stats":{"get":{"tags":["🧠 Context Engineering"],"summary":"Get Memory Statistics","description":"Retrieve comprehensive memory system statistics","operationId":"get_memory_statistics_api_context_memory_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/analytics/dashboard/overview":{"get":{"tags":["analytics"],"summary":"Get Dashboard Overview","description":"Get comprehensive dashboard overview data","operationId":"get_dashboard_overview_api_analytics_dashboard_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/analytics/agents/{agent_id}":{"get":{"tags":["analytics"],"summary":"Get Agent Analytics","description":"Get detailed analytics for a specific agent","operationId":"get_agent_analytics_api_analytics_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Time period: 1h, 24h, 7d, 30d","default":"7d","title":"Period"},"description":"Time period: 1h, 24h, 7d, 30d"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/agents":{"get":{"tags":["analytics"],"summary":"Get All Agents Analytics","description":"Get analytics for all agents","operationId":"get_all_agents_analytics_api_analytics_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/analytics/context":{"get":{"tags":["analytics"],"summary":"Get Context Analytics","description":"Get context optimization analytics","operationId":"get_context_analytics_api_analytics_context_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/analytics/learning":{"get":{"tags":["analytics"],"summary":"Get Learning Analytics","description":"Get learning and memory analytics","operationId":"get_learning_analytics_api_analytics_learning_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/analytics/system/health":{"get":{"tags":["analytics"],"summary":"Get System Health","description":"Get real-time system health metrics","operationId":"get_system_health_api_analytics_system_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/analytics/realtime":{"get":{"tags":["analytics"],"summary":"Get Realtime Metrics","description":"Get real-time metrics for WebSocket updates","operationId":"get_realtime_metrics_api_analytics_realtime_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/analytics/track/agent-execution":{"post":{"tags":["analytics"],"summary":"Track Agent Execution","description":"Track agent execution for analytics","operationId":"track_agent_execution_api_analytics_track_agent_execution_post","parameters":[{"name":"agent_id","in":"query","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"task_id","in":"query","required":true,"schema":{"type":"integer","title":"Task Id"}},{"name":"execution_time","in":"query","required":true,"schema":{"type":"number","title":"Execution Time"}},{"name":"tokens_used","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Tokens Used"}},{"name":"success","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Success"}},{"name":"error_message","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},{"name":"context_optimization_applied","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Context Optimization Applied"}},{"name":"memory_items_created","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Memory Items Created"}},{"name":"collaboration_sessions","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Collaboration Sessions"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/track/context-optimization":{"post":{"tags":["analytics"],"summary":"Track Context Optimization","description":"Track context optimization for analytics","operationId":"track_context_optimization_api_analytics_track_context_optimization_post","parameters":[{"name":"original_tokens","in":"query","required":true,"schema":{"type":"integer","title":"Original Tokens"}},{"name":"optimized_tokens","in":"query","required":true,"schema":{"type":"integer","title":"Optimized Tokens"}},{"name":"optimization_type","in":"query","required":true,"schema":{"type":"string","title":"Optimization Type"}},{"name":"pattern_used","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pattern Used"}},{"name":"execution_time","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Execution Time"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/track/learning-progress":{"post":{"tags":["analytics"],"summary":"Track Learning Progress","description":"Track learning progress for analytics","operationId":"track_learning_progress_api_analytics_track_learning_progress_post","parameters":[{"name":"agent_id","in":"query","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"knowledge_items","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Knowledge Items"}},{"name":"memory_consolidations","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Memory Consolidations"}},{"name":"performance_improvement","in":"query","required":false,"schema":{"type":"number","default":0.0,"title":"Performance Improvement"}},{"name":"knowledge_transfers","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Knowledge Transfers"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/websocket/status":{"get":{"tags":["analytics"],"summary":"Get Websocket Status","description":"Get WebSocket connection status","operationId":"get_websocket_status_api_analytics_websocket_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/analytics/selection-health":{"get":{"tags":["analytics"],"summary":"Get Selection Health","description":"Tool-selection health over a rolling window (PRD-143 S14).\n\nAggregates the per-dispatch selection outcomes the universal telemetry\nhook persists at ``tool_execution_logs.router_decision->'selection'``:\n\n* ``hit_rate``     — of narrowed dispatches, the fraction whose chosen\n  action came from the narrowed enum (``hits / narrowed``);\n* ``fallback_rate`` — dispatches whose surface was NOT narrowed\n  (narrow_reason set / rank returned empty) over all selection-recorded\n  dispatches (``fallback / selections``).\n\nPlatform-wide by design: this is the super admin's watchtower — the\nrouter-wide ``require_super_admin`` (S6) gates every caller. Index path:\n``idx_tool_logs_executed`` covers the window filter.","operationId":"get_selection_health_api_analytics_selection_health_get","parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"string","default":"24h","title":"Window"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Selection Health Api Analytics Selection Health Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/activation":{"get":{"tags":["analytics"],"summary":"Get Activation","description":"Platform-wide activation rate (PRD-142 Wave 0 US-005).\n\nDefinition: a workspace is \"activated\" when it has >=1\n``OrchestrationRun`` with ``state == RunState.COMPLETED.value`` —\ni.e. at least one mission has reached the canonical terminal success\nstate (``core/models/orchestration_enums.py``). The activation rate\nis ``activated_workspaces / provisioned_workspaces``.\n\nThis is the one Wave 0 tile that is intentionally NOT filtered to a\nsingle ``workspace_id`` — it answers a platform-level founder\nquestion (\"are new workspaces reaching first value?\"), not a tenant\nquestion. The endpoint still requires authentication via\n``get_request_context_hybrid`` to gate access to the aggregate.\n\nComputed from ``OrchestrationRun`` only — NO new table, NO\n``WorkflowExecution`` reads (Wave 0 scope; the ``WorkflowExecution``\ndrop is owned by Wave 3 per PLAYBOOK-ENGINE-DESIGN.md §4.2).\n\nReturns ``{activated, total_workspaces, rate, generated_at}``;\n``rate = activated / total_workspaces``, 0 when ``total_workspaces``\nis 0 (no divide-by-zero, no fake fallback value).","operationId":"get_activation_api_analytics_activation_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Activation Api Analytics Activation Get"}}}}}}},"/api/analytics/dashboard/task-completion-time":{"get":{"tags":["analytics"],"summary":"Get Avg Task Completion Time","description":"Get average task completion time (UNION: workflows + missions)","operationId":"get_avg_task_completion_time_api_analytics_dashboard_task_completion_time_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Avg Task Completion Time Api Analytics Dashboard Task Completion Time Get"}}}}}}},"/api/analytics/dashboard/system-load-trend":{"get":{"tags":["analytics"],"summary":"Get System Load Trend","description":"Get system load trend for 24h with color coding","operationId":"get_system_load_trend_api_analytics_dashboard_system_load_trend_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get System Load Trend Api Analytics Dashboard System Load Trend Get"}}}}}}},"/api/analytics/dashboard/error-rate-by-type":{"get":{"tags":["analytics"],"summary":"Get Error Rate By Agent Type","description":"Get error rate breakdown by agent type (UNION: workflows + missions)","operationId":"get_error_rate_by_agent_type_api_analytics_dashboard_error_rate_by_type_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Error Rate By Agent Type Api Analytics Dashboard Error Rate By Type Get"}}}}}}},"/api/analytics/dashboard/queue-depth":{"get":{"tags":["analytics"],"summary":"Get Queue Depth","description":"Get real-time queue depth for pending tasks (UNION: workflows + missions)","operationId":"get_queue_depth_api_analytics_dashboard_queue_depth_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Queue Depth Api Analytics Dashboard Queue Depth Get"}}}}}}},"/api/analytics/dashboard/efficiency-score":{"get":{"tags":["analytics"],"summary":"Get Efficiency Score","description":"Get resource utilization efficiency score (0-100). Computed in ``api.dashboard_efficiency``.","operationId":"get_efficiency_score_api_analytics_dashboard_efficiency_score_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Efficiency Score Api Analytics Dashboard Efficiency Score Get"}}}}}}},"/api/analytics/performance/cost-per-execution":{"get":{"tags":["analytics"],"summary":"Get Cost Per Execution","description":"Get cost per execution from real LLM usage data","operationId":"get_cost_per_execution_api_analytics_performance_cost_per_execution_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Cost Per Execution Api Analytics Performance Cost Per Execution Get"}}}}}}},"/api/analytics/performance/peak-usage-hours":{"get":{"tags":["analytics"],"summary":"Get Peak Usage Hours","description":"Get peak usage hours from real LLM usage / execution data","operationId":"get_peak_usage_hours_api_analytics_performance_peak_usage_hours_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Peak Usage Hours Api Analytics Performance Peak Usage Hours Get"}}}}}}},"/api/analytics/performance/bottlenecks":{"get":{"tags":["analytics"],"summary":"Get Bottleneck Detection","description":"Get resource bottleneck detection with recommendations","operationId":"get_bottleneck_detection_api_analytics_performance_bottlenecks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Bottleneck Detection Api Analytics Performance Bottlenecks Get"}}}}}}},"/api/analytics/performance/predictive-alerts":{"get":{"tags":["analytics"],"summary":"Get Predictive Alerts","description":"Get predictive capacity alerts","operationId":"get_predictive_alerts_api_analytics_performance_predictive_alerts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Predictive Alerts Api Analytics Performance Predictive Alerts Get"}}}}}}},"/api/analytics/performance/agent-ranking":{"get":{"tags":["analytics"],"summary":"Get Agent Ranking","description":"Get agent performance ranking from real execution data","operationId":"get_agent_ranking_api_analytics_performance_agent_ranking_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Agent Ranking Api Analytics Performance Agent Ranking Get"}}}}}}},"/api/analytics/performance/sla-compliance":{"get":{"tags":["analytics"],"summary":"Get Sla Compliance","description":"Get SLA compliance from real execution and usage data","operationId":"get_sla_compliance_api_analytics_performance_sla_compliance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Sla Compliance Api Analytics Performance Sla Compliance Get"}}}}}}},"/api/analytics/dashboard/all-metrics":{"get":{"tags":["analytics"],"summary":"Get All Dashboard Metrics","description":"Get all enhanced dashboard metrics in one call for efficiency","operationId":"get_all_dashboard_metrics_api_analytics_dashboard_all_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardMetrics"}}}}}}},"/api/analytics/performance/all-enhancements":{"get":{"tags":["analytics"],"summary":"Get All Performance Enhancements","description":"Get all performance analytics enhancements in one call","operationId":"get_all_performance_enhancements_api_analytics_performance_all_enhancements_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get All Performance Enhancements Api Analytics Performance All Enhancements Get"}}}}}}},"/api/analytics/dashboard/success-rate":{"get":{"tags":["analytics"],"summary":"Get Agent Success Rate","description":"Get agent success rate percentage with trend (UNION: workflows + missions)","operationId":"get_agent_success_rate_api_analytics_dashboard_success_rate_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Agent Success Rate Api Analytics Dashboard Success Rate Get"}}}}}}},"/api/analytics/slos":{"get":{"tags":["analytics"],"summary":"Get Slos","description":"PRD-180 S5 (Observability) — the three tracked SLOs for this workspace.\n\nReuses ``services.slo_metrics`` (no parallel metrics stack): tool-call success\nrate, board-dispatch p95 latency, and board-event freshness — each with its\ntarget, comparator, sample size, and a pass/fail. Own-workspace only\n(``ctx.workspace_id``-scoped), reachable by a workspace admin (PRD-185 S12).\nHonest by construction: an SLI with no data reports a ``null`` value, never a\nfabricated number.","operationId":"get_slos_api_analytics_slos_get","parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"string","default":"24h","title":"Window"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Slos Api Analytics Slos Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/substrate-health":{"get":{"tags":["analytics"],"summary":"Get Substrate Health","description":"PRD-197 S4 — per-seam retrieval substrate health for this workspace.\n\nAggregates ``substrate_metric_events`` (documents / memory / field\nseams) over the window into searches, error rate, empty rate, and p95\nlatency, rolled into a green/degraded/down/unknown status per seam —\nthe \"is retrieval healthy?\" number the Command Center strip renders.\nHonest by construction: a seam with no searches reports ``unknown``,\nnever a fabricated green.","operationId":"get_substrate_health_api_analytics_substrate_health_get","parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"string","default":"24h","title":"Window"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Substrate Health Api Analytics Substrate Health Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/errors/by-subsystem":{"get":{"tags":["analytics"],"summary":"Get Errors By Subsystem","description":"Error count by subsystem over a rolling window (PRD-142 Wave 0 US-002).\n\nBacks the dashboard \"Error rate by subsystem\" tile. Reads from the\n``error_events`` sink populated by ``record_error`` (US-001). Filters\nby the caller's workspace; system-level rows (``workspace_id IS NULL``)\nare excluded from this workspace-scoped view by design — the\ndashboard tile shows per-tenant errors only.\n\nIndex path: ``idx_error_events_subsystem_created`` /\n``idx_error_events_workspace_created`` cover the ``(workspace_id,\ncreated_at)`` filter + ``GROUP BY subsystem`` — no full-table scan.\n\nReturns ``{window, total, by_subsystem: [{subsystem, count, rate}],\ngenerated_at}``. ``rate = count / total`` over the window; 0 when\ntotal is 0 (no divide-by-zero).","operationId":"get_errors_by_subsystem_api_analytics_errors_by_subsystem_get","parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"string","default":"24h","title":"Window"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Errors By Subsystem Api Analytics Errors By Subsystem Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/always-failing-actions":{"get":{"tags":["analytics"],"summary":"Get Always Failing Actions","description":"Actions that have failed EVERY time they were called (F057).\n\nThis class hides. ``search_multimodal`` failed 40 of 40 across night 1 and\n``workspace_read_file`` 9 of 13 across night 2, and neither showed up\nanywhere: a success RATE averages them away against healthy traffic, and\nnobody reads a log for a tool they assume works. A tool that has never once\nsucceeded is not a rate, it is a broken tool, and it should be a list.\n\nFail-soft: an unreadable ledger returns an empty list rather than a 500 —\nthis is a health read-out, and it must not itself become an outage.","operationId":"get_always_failing_actions_api_analytics_always_failing_actions_get","parameters":[{"name":"window_hours","in":"query","required":false,"schema":{"type":"integer","maximum":720,"minimum":1,"description":"How far back to look","default":24,"title":"Window Hours"},"description":"How far back to look"},{"name":"min_calls","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":2,"description":"Ignore anything called fewer times","default":3,"title":"Min Calls"},"description":"Ignore anything called fewer times"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Always Failing Actions Api Analytics Always Failing Actions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/primitive-health":{"get":{"tags":["analytics"],"summary":"Get Primitive Health","description":"Per-primitive health (PRD-142 Wave 3 · WS-M · W3-S2).\n\nBacks the Command Centre \"Is it working?\" 8-primitive health tile (the\nWave 0 US-006 metric deferred until W3-S1 emitted real data). Reads the\nLATEST ``primitive_check`` finding per primitive from ``heartbeat_results``;\nthe writer is W3-S1's ``emit_primitive_finding`` helper in\n``services/heartbeat_service.py``, and each primitive's hardening story\n(S6 chat … S13 channels) wires its own caller as it comes online.\n\nHonest gaps over fake greens: a primitive with NO finding renders\n``{status: \"unknown\", last_checked: null}``. The 8 canonical primitives\nare ALWAYS returned — the closed set comes from\n``heartbeat_service.PRIMITIVE_NAMES`` (single source of truth).\n\nIndex path: ``ix_heartbeat_results_workspace_id`` +\n``ix_heartbeat_results_created_at`` cover the workspace filter +\n``ORDER BY created_at DESC`` — no full-table scan. The ``findings->0``\nJSONB extraction runs only on the workspace-narrowed slice.\n\nReturns ``{primitives: [{name, status, last_checked}], generated_at}``;\n``status`` is one of ``{green, degraded, down, unknown}``.","operationId":"get_primitive_health_api_analytics_primitive_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Primitive Health Api Analytics Primitive Health Get"}}}}}}},"/api/analytics/widget-engagement":{"get":{"tags":["analytics"],"summary":"Get Widget Engagement","description":"Widget engagement counts by event_type + distinct sessions (PRD-142 Wave 0 US-004).\n\nBacks the dashboard \"Widget engagement\" tile. Read-only aggregation\nover ``widget_event_log`` (writer: ``modules/widgets/telemetry.py``;\nschema: ``core/models/widget_event_log.py``). This endpoint does NOT\nconstruct ``WidgetEventLog`` rows — telemetry's writer remains the\nsingle source of truth.\n\nTenant isolation: ``widget_event_log`` has no ``workspace_id``\ncolumn, so we resolve the caller's ``sites`` first (one workspace,\nmany sites — PRD-008-A) and restrict the aggregation to that set.\nA workspace with zero sites short-circuits to an empty payload.\n\nIndex path: the aggregation filters\n``event_type IN WIDGET_EVENT_TYPES`` so\n``idx_widget_event_log_type_created`` is eligible alongside the\n``created_at >= cutoff`` window — no full-table scan.\n\nReturns ``{window, by_event_type: [{event_type, count}], sessions,\ngenerated_at}``.","operationId":"get_widget_engagement_api_analytics_widget_engagement_get","parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"string","default":"7d","title":"Window"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Widget Engagement Api Analytics Widget Engagement Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/activation/workspace":{"get":{"tags":["analytics"],"summary":"Get Workspace Activation","description":"Own-workspace activation (PRD-185 S12) — has THIS workspace reached first value?\n\nThe tenant-scoped counterpart to the platform ``/activation`` founder metric\n(which stays super-admin): a workspace is \"activated\" once it has >=1\n``OrchestrationRun`` in the terminal COMPLETED state — at least one mission has\nproduced a real outcome. No cross-workspace counts are exposed here; the\nstrip's activation tile reads this, never the platform aggregate.\n\nReturns ``{activated, completed_missions, generated_at}``.","operationId":"get_workspace_activation_api_analytics_activation_workspace_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Workspace Activation Api Analytics Activation Workspace Get"}}}}}}},"/api/analytics/deliverable-freshness":{"get":{"tags":["analytics"],"summary":"Get Deliverable Freshness","description":"Age of the most recent deliverable in the workspace (PRD-185 S12).\n\nThe \"is Auto still producing?\" tile — the freshness signal that would have\nsurfaced the 2026-06-16 silent stop on day one, when deliverable output\ndropped to zero and nothing said so. Reads the ``v_workspace_outputs``\ndeliverables read-model, workspace-scoped. Honest empties: a workspace with no\ndeliverables reports ``last_produced_at = null`` and ``age_seconds = null``,\nnever a fabricated fresh zero.\n\nReturns ``{last_produced_at, age_seconds, total, generated_at}``.","operationId":"get_deliverable_freshness_api_analytics_deliverable_freshness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Deliverable Freshness Api Analytics Deliverable Freshness Get"}}}}}}},"/api/analytics/commerce-integrity":{"get":{"tags":["analytics"],"summary":"Get Commerce Integrity","description":"Cross-sell persistence integrity — the Commerce tile (PRD-189 S2).\n\nThe one query that would have caught the F1 wipe on day one: the FBT\nedges the last orders sync REPORTED (``orders_sync.fbt_edges_added``)\nversus the ``frequently_bought_with`` edges actually PRESENT in the\nworkspace Knowledge Graph. Read-only — the sync status blocks are written\nby ``api/shopify.py``; the graph is read through the same\n``GraphifyService`` the widget resolvers use.\n\nOwn-workspace only (PRD-185 S12 strip posture). Honest empties: a\nworkspace with no commerce sync history reports ``synced: false`` and\nnulls; a workspace whose graph lost its cross-sell reads the drift, never\na fabricated green.\n\nReturns ``{synced, reported_fbt_edges, present_fbt_edges, drift, ok,\nlast_orders_sync_at, last_catalog_sync_at, generated_at}``.","operationId":"get_commerce_integrity_api_analytics_commerce_integrity_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Commerce Integrity Api Analytics Commerce Integrity Get"}}}}}}},"/api/harness/self-learning":{"get":{"tags":["HARNESS"],"summary":"Self Learning Health","description":"Self-learning health for the Command Center tile (PRD-263 US-021, FR-18).\n\nHARNESS's ``status`` as get_status reads it, the latest harness_runs row's\n``iteration_count``, ``coverage`` and ``insufficient_data``, ``watch`` and\n``regression`` counts, the workspace's HARNESS ``mode``, ``signals_7d``: this\nworkspace's production tool calls over the last 7 days, and the ``pending``,\n``applied``, ``denied`` and ``expired`` ledger counts (US-058). Counts only, no\ngrant or report text, and nothing is written. A plain ``def`` over the synchronous\nsession, so FastAPI runs it in its threadpool and the event loop never waits on\nthe database.\n\nA figure with no value is None, never 0. A section that fails to load is\nlogged, its figures are None and its name is in ``unavailable``, so the tile\nshows \"—\" for it instead of failing whole.","operationId":"self_learning_health_api_harness_self_learning_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Self Learning Health Api Harness Self Learning Get"}}}}}}},"/api/kpi/cost-tracker":{"get":{"tags":["kpi"],"summary":"Get Cost Tracker","description":"Period spend, daily trend, top 3 agents by cost.","operationId":"get_cost_tracker_api_kpi_cost_tracker_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(1d|7d|30d|90d)$","default":"30d","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Cost Tracker Api Kpi Cost Tracker Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/kpi/daily-spend":{"get":{"tags":["kpi"],"summary":"Get Daily Spend","description":"The daily spend limit, for the operator (a system admin, on top of the router's gate).\n\n``limit_usd`` is the limit in force, or null when there is none; ``limit_source`` is where it\ncomes from (``setting``, ``environment``) or null. ``spent_today_usd`` is this workspace's\nspend so far in the current spend day, which runs from ``spend_day_started_at`` to\n``spend_day_ends_at`` (UTC).","operationId":"get_daily_spend_api_kpi_daily_spend_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Daily Spend Api Kpi Daily Spend Get"}}}}}}},"/api/kpi/agent-performance":{"get":{"tags":["kpi"],"summary":"Get Agent Performance","description":"Per-agent success rate, avg completion time, tasks done.\n\nSources: BoardTask (agent task board) for task counts + completion times.","operationId":"get_agent_performance_api_kpi_agent_performance_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(1d|7d|30d|90d)$","default":"30d","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Agent Performance Api Kpi Agent Performance Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/kpi/playbook-metrics":{"get":{"tags":["kpi"],"summary":"Get Playbook Metrics","description":"Playbook/recipe runs, success %, avg duration.\n\nSources: RecipeExecution (recipe_executions table) joined with\nWorkflowTemplate (workflow_recipes table) for names.","operationId":"get_playbook_metrics_api_kpi_playbook_metrics_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(1d|7d|30d|90d)$","default":"30d","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Playbook Metrics Api Kpi Playbook Metrics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/kpi/approval-gates":{"get":{"tags":["kpi"],"summary":"Get Approval Gates","description":"Pending approvals, avg time-to-approve, recent decisions.","operationId":"get_approval_gates_api_kpi_approval_gates_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(1d|7d|30d|90d)$","default":"30d","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Approval Gates Api Kpi Approval Gates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/kpi/decisions-needed":{"get":{"tags":["kpi"],"summary":"Get Decisions Needed","description":"Aggregate things that need Gerard's call but aren't already on the kanban.\n\nSpecifically: reports flagged ``requires_approval=True`` and not yet\nacknowledged, plus orchestration runs in a BLOCKED state, oldest first.\nF207: nothing writes an escalation level, and agent_reports has no such\ncolumn on a DB built from the models (c1 lost it too), so reading it made\nthis whole list come back empty. Items still carry ``escalation_level: null``.\nAnd a blocked mission is ``state_type='blocked'`` (the enum's value, not 'BLOCKED').\n\nTasks themselves (priority urgent/high) are intentionally excluded —\nthe kanban already surfaces those. Approval gates have their own widget.","operationId":"get_decisions_needed_api_kpi_decisions_needed_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Decisions Needed Api Kpi Decisions Needed Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/share":{"post":{"tags":["📚 Knowledge"],"summary":"Share Knowledge","description":"## 📚 Share Knowledge\n\nShares knowledge with the system for learning and reuse.","operationId":"share_knowledge_api_knowledge_share_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeShareRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/types":{"get":{"tags":["📚 Knowledge Base"],"summary":"Get Knowledge Types","description":"Get all available knowledge base types with counts.\n\nReturns list of knowledge types and how many items exist for each.","operationId":"get_knowledge_types_api_knowledge_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/KnowledgeTypeInfo"},"type":"array","title":"Response Get Knowledge Types Api Knowledge Types Get"}}}}}}},"/api/knowledge/items":{"post":{"tags":["📚 Knowledge Base"],"summary":"Create Knowledge Item","description":"Create a new knowledge item.\n\nManually create a knowledge item of any type.\nFor document uploads, use /upload endpoint instead.","operationId":"create_knowledge_item_api_knowledge_items_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeItemCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/upload":{"post":{"tags":["📚 Knowledge Base"],"summary":"Upload Document Multimodal","description":"Upload a document and extract all multimodal content.\n\nAutomatically extracts:\n- Text content (chunked and embedded)\n- Tables (with multiple formats)\n- Images (with AI descriptions)\n- Formulas (LaTeX math)\n\nCreates knowledge items for each extracted element.","operationId":"upload_document_multimodal_api_knowledge_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_multimodal_api_knowledge_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__knowledge_multimodal__DocumentUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/search":{"post":{"tags":["📚 Knowledge Base"],"summary":"Search Knowledge","description":"Search across all knowledge types.\n\nSupports:\n- Full-text search\n- Semantic (vector) search\n- Filtering by knowledge type\n- Quality filtering","operationId":"search_knowledge_api_knowledge_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/KnowledgeSearchResult"},"type":"array","title":"Response Search Knowledge Api Knowledge Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/items/{item_id}":{"get":{"tags":["📚 Knowledge Base"],"summary":"Get Knowledge Item","description":"Get a specific knowledge item with all its multimodal content.","operationId":"get_knowledge_item_api_knowledge_items__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}},{"name":"type","in":"query","required":true,"schema":{"type":"string","description":"Knowledge type: table, formula, or image","title":"Type"},"description":"Knowledge type: table, formula, or image"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/stats":{"get":{"tags":["📚 Knowledge Base"],"summary":"Get Knowledge Stats","description":"Get statistics about the knowledge base.\n\nReturns counts, quality metrics, and usage stats for all knowledge types.","operationId":"get_knowledge_stats_api_knowledge_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/knowledge/graph/import":{"post":{"tags":["🧠 Knowledge Graph"],"summary":"Import Graph","description":"Import a graphify graph.json into the workspace's knowledge graph.\n\nAccepts a graph.json file (NetworkX node_link_data format) as produced by\nthe graphify CLI or the /graphify skill. Re-runs clustering, analysis, and\nexports all derived artefacts (HTML viz, communities, meta).\n\nSet merge=true to add imported nodes/edges into an existing graph rather\nthan replacing it.","operationId":"import_graph_api_knowledge_graph_import_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_graph_api_knowledge_graph_import_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/graph":{"delete":{"tags":["🧠 Knowledge Graph"],"summary":"Delete Graph","description":"Delete the workspace knowledge graph (all artefacts).","operationId":"delete_graph_api_knowledge_graph_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/knowledge/graph/build":{"post":{"tags":["🧠 Knowledge Graph"],"summary":"Trigger Graph Build","description":"Manually trigger a full knowledge graph rebuild for the workspace.","operationId":"trigger_graph_build_api_knowledge_graph_build_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/knowledge/graph/communities":{"get":{"tags":["🧠 Knowledge Graph"],"summary":"List Graph Communities","description":"Community overview for cluster-first drill-in: id, size, and (once the\ngraph is enriched in PRD-165 S3) a title/summary per community. This is the\nentry point — the client lists clusters first, then drills into one.","operationId":"list_graph_communities_api_knowledge_graph_communities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/knowledge/graph/community/{community_id}":{"get":{"tags":["🧠 Knowledge Graph"],"summary":"Get Community Subgraph","description":"The induced subgraph for one community's members (nodes + internal\nedges), capped server-side — the drill-in payload.","operationId":"get_community_subgraph_api_knowledge_graph_community__community_id__get","parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"integer","title":"Community Id"}},{"name":"max_nodes","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":300,"title":"Max Nodes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/graph/node/{node_id}/neighbors":{"get":{"tags":["🧠 Knowledge Graph"],"summary":"Expand Node","description":"The node + its 1-hop neighbourhood ('expand from here').","operationId":"expand_node_api_knowledge_graph_node__node_id__neighbors_get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"max_nodes","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":150,"title":"Max Nodes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/graph/path":{"get":{"tags":["🧠 Knowledge Graph"],"summary":"Graph Path","description":"Shortest path between two node ids for the path-finding UI.","operationId":"graph_path_api_knowledge_graph_path_get","parameters":[{"name":"source","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Source"}},{"name":"target","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Target"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/graph/search":{"get":{"tags":["🧠 Knowledge Graph"],"summary":"Search Graph Nodes","description":"Label search for search-to-focus.","operationId":"search_graph_nodes_api_knowledge_graph_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/graph/community/{community_id}/label":{"patch":{"tags":["🧠 Knowledge Graph"],"summary":"Set Community Label","description":"Rename a community / edit its summary (PRD-165 S3 — editable labels).","operationId":"set_community_label_api_knowledge_graph_community__community_id__label_patch","parameters":[{"name":"community_id","in":"path","required":true,"schema":{"type":"integer","title":"Community Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learning/feedback":{"post":{"tags":["🧠 Learning"],"summary":"Submit Feedback","description":"## 📝 Submit Learning Feedback\n\nSubmits feedback for system learning and improvement.","operationId":"submit_feedback_api_learning_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learning/feedback/process":{"post":{"tags":["🧠 Learning"],"summary":"Process Feedback","description":"## ⚙️ Process Learning Feedback\n\nProcesses submitted feedback for system learning.","operationId":"process_feedback_api_learning_feedback_process_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackProcessRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learning/insights/aggregate":{"get":{"tags":["🧠 Learning"],"summary":"Aggregate Insights","description":"## 📊 Aggregate Learning Insights\n\nAggregates learning insights over a specified period.","operationId":"aggregate_insights_api_learning_insights_aggregate_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"last_30_days","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learning/effectiveness-report":{"get":{"tags":["🧠 Learning"],"summary":"Effectiveness Report","description":"## 📈 Learning Effectiveness Report\n\nGenerates a comprehensive learning effectiveness report.","operationId":"effectiveness_report_api_learning_effectiveness_report_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/query/platform-help":{"post":{"tags":["🔍 Query"],"summary":"Platform Help","description":"## 🆘 Platform Help Query\n\nProvides intelligent help and guidance for platform usage.","operationId":"platform_help_api_query_platform_help_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformHelpRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/recommendations/generate":{"post":{"tags":["🎯 Recommendations"],"summary":"Generate Recommendations","description":"## 🎯 Generate Recommendations\n\nGenerates intelligent recommendations based on context and parameters.","operationId":"generate_recommendations_api_recommendations_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat":{"post":{"tags":["💬 Chat"],"summary":"Stream Chat","description":"Stream chat messages using AI SDK Data Stream format (text/plain)","operationId":"stream_chat_api_chat_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/history":{"get":{"tags":["💬 Chat"],"summary":"Get Chat History","description":"Get chat history for the current user within their workspace.\n\n``starting_after`` (PRD-266 US-007b): a chat id; the page after it, 404 when not the caller's.","operationId":"get_chat_history_api_chat_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Starting After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/session":{"get":{"tags":["💬 Chat"],"summary":"Get Chat Session","description":"The caller's open-conversation tabs in this workspace (empty doc when none).","operationId":"get_chat_session_api_chat_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["💬 Chat"],"summary":"Put Chat Session","description":"Replace the caller's tabs for this workspace (validated: ids, cap, active ∈ open).","operationId":"put_chat_session_api_chat_session_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/search":{"get":{"tags":["💬 Chat"],"summary":"Search Chat History","description":"Search across chat messages by keyword (workspace-scoped).\n\nMUST be registered before ``GET /{chat_id}`` — routes match in declaration\norder, so with this below the param route ``/api/chat/search`` resolved as\n``chat_id=\"search\"`` and 404'd (PRD-220 drive-by fix).","operationId":"search_chat_history_api_chat_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/vote":{"patch":{"tags":["💬 Chat"],"summary":"Vote Message","description":"Vote on a message (workspace-scoped)","operationId":"vote_message_api_chat_vote_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/agents":{"get":{"tags":["💬 Chat"],"summary":"Get Available Agents","description":"Get list of available agents for chat selection.","operationId":"get_available_agents_api_chat_agents_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"active","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/{chat_id}":{"get":{"tags":["💬 Chat"],"summary":"Get Chat","description":"Get a specific chat (workspace-scoped)","operationId":"get_chat_api_chat__chat_id__get","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["💬 Chat"],"summary":"Delete Chat","description":"Delete a chat (workspace-scoped)","operationId":"delete_chat_api_chat__chat_id__delete","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["💬 Chat"],"summary":"Update Chat","description":"Update chat title (workspace-scoped)","operationId":"update_chat_api_chat__chat_id__patch","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTitleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/{chat_id}/messages":{"get":{"tags":["💬 Chat"],"summary":"Get Chat Messages","description":"Get all messages for a chat (workspace-scoped)","operationId":"get_chat_messages_api_chat__chat_id__messages_get","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/{chat_id}/switch-agent":{"post":{"tags":["💬 Chat"],"summary":"Switch Agent","description":"Switch to a different agent mid-conversation.","operationId":"switch_agent_api_chat__chat_id__switch_agent_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwitchAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/{chat_id}/cancel":{"post":{"tags":["💬 Chat"],"summary":"Cancel Chat Turn","description":"PRD-237 S7: Stop. The reply no longer dies with the connection, so the\nfrontend's Stop must say so — this reaches whichever worker holds the turn\n(process-local cancel, plus the Redis marker the producer polls).","operationId":"cancel_chat_turn_api_chat__chat_id__cancel_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/performance":{"get":{"tags":["agent-endpoints"],"summary":"Get Agent Performance","description":"Get agent performance metrics from database.\n\nQuery params:\n- period: all|7d|30d|24h (currently returns all)\n\nReturns real performance data from agents.performance_metrics.","operationId":"get_agent_performance_api_agents__agent_id__performance_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/test-capabilities":{"post":{"tags":["agent-endpoints"],"summary":"Test Agent Capabilities Endpoint","description":"Run comprehensive capability tests on an agent.\n\nReturns test results with performance metrics.","operationId":"test_agent_capabilities_endpoint_api_agents__agent_id__test_capabilities_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/active":{"get":{"tags":["agent-endpoints"],"summary":"List Active Agents","description":"The caller's workspace's agents active in this process, each with its current status.\n\n``total`` is the number listed.","operationId":"list_active_agents_api_agents_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agents/{agent_id}/add-skills":{"post":{"tags":["agent-endpoints"],"summary":"Add Agent Skills","description":"Add new skills to an existing agent.\n\nRequest body:\n{\n    \"skills\": [\"skill1\", \"skill2\"]\n}\n\nUpdates agent's system prompt with new capabilities.","operationId":"add_agent_skills_api_agents__agent_id__add_skills_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/health":{"get":{"tags":["agent-endpoints"],"summary":"Agent System Health","description":"The agent runtime's health for the caller's workspace.\n\nLists the workspace's agents active in this process, each with its state,\nrun count and model provider.","operationId":"agent_system_health_api_agents_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agents/{agent_id}/model-config":{"get":{"tags":["agent-endpoints"],"summary":"Get Agent Model Config","description":"Get agent's current model configuration.\n\nReturns the model configuration including provider, model_id,\nand all generation parameters.","operationId":"get_agent_model_config_api_agents__agent_id__model_config_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["agent-endpoints"],"summary":"Update Agent Model Config","description":"Update agent's model configuration.\n\nRequest body:\n{\n    \"provider\": \"openrouter\",\n    \"model_id\": \"google/gemini-2.5-flash\",\n    \"temperature\": 0.7,\n    \"max_tokens\": 8000,\n    \"top_p\": 1.0,\n    \"frequency_penalty\": 0.0,\n    \"presence_penalty\": 0.0\n}\n\nThe body replaces the whole model_config, so one naming no model_id is refused\n(422, ``api.agent_model_config.checked_model_config``).\n\nNote: Agent must be recreated for changes to take effect in runtime.","operationId":"update_agent_model_config_api_agents__agent_id__model_config_put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Model Config"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/model-usage":{"get":{"tags":["agent-endpoints"],"summary":"Get Agent Model Usage","description":"Get agent's model usage statistics.\n\nReturns token usage, costs, and request counts.","operationId":"get_agent_model_usage_api_agents__agent_id__model_usage_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/":{"get":{"tags":["Database Knowledge"],"summary":"Get Item","description":"List all database knowledge sources for the current tenant.","operationId":"get_item_api_knowledge_sources_database__get","parameters":[{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Active Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Item Api Knowledge Sources Database  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Database Knowledge"],"summary":"Create Database Source","description":"Add a new database as a knowledge source.\nIntrospects schema and creates agent tools.","operationId":"create_database_source_api_knowledge_sources_database__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseKnowledgeSourceCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Database Source Api Knowledge Sources Database  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}/query":{"post":{"tags":["Database Knowledge"],"summary":"Query Database","description":"Execute natural language query against database.\nReturns results with visualization hints.","operationId":"query_database_api_knowledge_sources_database__source_id__query_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Query Database Api Knowledge Sources Database  Source Id  Query Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}/introspect":{"post":{"tags":["Database Knowledge"],"summary":"Introspect Schema","description":"Re-introspect database schema and update metadata.","operationId":"introspect_schema_api_knowledge_sources_database__source_id__introspect_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}/schema":{"get":{"tags":["Database Knowledge"],"summary":"Get Schema","description":"Get database schema metadata.","operationId":"get_schema_api_knowledge_sources_database__source_id__schema_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}},{"name":"use_cache","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Use Cache"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}/semantic":{"get":{"tags":["Database Knowledge"],"summary":"Get Semantic Layer","description":"PRD-199 S2: the editor's load path. Only POST existed before, so\nevery load 405'd and was swallowed to console — the admin edited a\nblank form regardless of what was stored.","operationId":"get_semantic_layer_api_knowledge_sources_database__source_id__semantic_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Database Knowledge"],"summary":"Update Semantic Layer","description":"PRD-199 S1/S2: persist the canonical semantic doc (workspace-scoped —\nthe old handler never passed the workspace, so only its own crash\nprevented a cross-tenant write).","operationId":"update_semantic_layer_api_knowledge_sources_database__source_id__semantic_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SemanticLayerBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}":{"get":{"tags":["Database Knowledge"],"summary":"Get Database Source","description":"Get database source details.","operationId":"get_database_source_api_knowledge_sources_database__source_id__get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Database Knowledge"],"summary":"Delete Database Source","description":"Delete a database source and its associated schema/semantic data.","operationId":"delete_database_source_api_knowledge_sources_database__source_id__delete","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/templates/list":{"get":{"tags":["Database Knowledge"],"summary":"List Query Templates","description":"List available query templates.","operationId":"list_query_templates_api_knowledge_sources_database_templates_list_get","parameters":[{"name":"dialect","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialect"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/templates/{template_id}/execute":{"post":{"tags":["Database Knowledge"],"summary":"Execute Template","description":"Execute a saved Query Template against its source (PRD-160 S4).\n\nPath matches the frontend's call (templates/{id}/execute with source_id in\nthe body); the previous /{source_id}/template/execute stub returned empty\ndata, so the Execute button could never succeed.","operationId":"execute_template_api_knowledge_sources_database_templates__template_id__execute_post","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}/query/sql":{"post":{"tags":["Database Knowledge"],"summary":"Execute Validated Sql","description":"DEV-ONLY: Execute a validated SELECT statement against the source.\nBody: { sql: string, max_rows?: number }","operationId":"execute_validated_sql_api_knowledge_sources_database__source_id__query_sql_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/cache/stats":{"get":{"tags":["Database Knowledge"],"summary":"Get Cache Statistics","description":"Get cache statistics for monitoring.","operationId":"get_cache_statistics_api_knowledge_sources_database_cache_stats_get","parameters":[{"name":"tenant_id","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}/audit":{"get":{"tags":["Database Knowledge"],"summary":"List Audit Entries","description":"List query audit entries for a database source.","operationId":"list_audit_entries_api_knowledge_sources_database__source_id__audit_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}/examples":{"get":{"tags":["Database Knowledge"],"summary":"List Training Examples","description":"List training examples for a database source.","operationId":"list_training_examples_api_knowledge_sources_database__source_id__examples_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}},{"name":"verified_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Verified Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Database Knowledge"],"summary":"Add Training Example","description":"Add a new training example (question/SQL pair).","operationId":"add_training_example_api_knowledge_sources_database__source_id__examples_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}/examples/{example_id}":{"put":{"tags":["Database Knowledge"],"summary":"Update Training Example","description":"Update a training example.","operationId":"update_training_example_api_knowledge_sources_database__source_id__examples__example_id__put","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}},{"name":"example_id","in":"path","required":true,"schema":{"type":"integer","title":"Example Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Database Knowledge"],"summary":"Delete Training Example","description":"Delete a training example.","operationId":"delete_training_example_api_knowledge_sources_database__source_id__examples__example_id__delete","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}},{"name":"example_id","in":"path","required":true,"schema":{"type":"integer","title":"Example Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}/examples/{example_id}/verify":{"put":{"tags":["Database Knowledge"],"summary":"Verify Training Example","description":"Mark an example as verified (Golden SQL).","operationId":"verify_training_example_api_knowledge_sources_database__source_id__examples__example_id__verify_put","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}},{"name":"example_id","in":"path","required":true,"schema":{"type":"integer","title":"Example Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}/examples/import":{"post":{"tags":["Database Knowledge"],"summary":"Import Training Examples","description":"Bulk import examples from JSON array.","operationId":"import_training_examples_api_knowledge_sources_database__source_id__examples_import_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}/examples/stats":{"get":{"tags":["Database Knowledge"],"summary":"Get Training Example Stats","description":"Get training example statistics.","operationId":"get_training_example_stats_api_knowledge_sources_database__source_id__examples_stats_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}/schema/refresh":{"post":{"tags":["Database Knowledge"],"summary":"Refresh Schema","description":"Re-introspect schema and invalidate cache.\nPRD-61 Bug Fix: Explicit cache invalidation on schema changes.","operationId":"refresh_schema_api_knowledge_sources_database__source_id__schema_refresh_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}/benchmark/run":{"post":{"tags":["Database Knowledge"],"summary":"Run Benchmark","description":"Run NL2SQL benchmark against verified training examples.","operationId":"run_benchmark_api_knowledge_sources_database__source_id__benchmark_run_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/sources/database/{source_id}/benchmark/history":{"get":{"tags":["Database Knowledge"],"summary":"Get Benchmark History","description":"Get historical benchmark results for accuracy trends.","operationId":"get_benchmark_history_api_knowledge_sources_database__source_id__benchmark_history_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rag/feedback":{"post":{"tags":["rag-feedback"],"summary":"Submit Feedback","description":"Submit feedback on a RAG-generated response.","operationId":"submit_feedback_api_rag_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RAGFeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rag/feedback/stats":{"get":{"tags":["rag-feedback"],"summary":"Get Feedback Stats","description":"Get aggregated feedback statistics for the workspace.","operationId":"get_feedback_stats_api_rag_feedback_stats_get","parameters":[{"name":"time_range","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|all)$","default":"7d","title":"Time Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rag/feedback/recent":{"get":{"tags":["rag-feedback"],"summary":"Get Recent Feedback","description":"Get recent feedback entries.","operationId":"get_recent_feedback_api_rag_feedback_recent_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/database/analytics/stats":{"get":{"tags":["Database Analytics"],"summary":"Get Database Query Stats","description":"Get real-time database query statistics","operationId":"get_database_query_stats_api_database_analytics_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/database/analytics/performance":{"get":{"tags":["Database Analytics"],"summary":"Get Database Performance","description":"Get database query performance over time","operationId":"get_database_performance_api_database_analytics_performance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/database/analytics/top-queries":{"get":{"tags":["Database Analytics"],"summary":"Get Top Queries","description":"Get most frequently executed queries","operationId":"get_top_queries_api_database_analytics_top_queries_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/attachments/health":{"get":{"tags":["attachments"],"summary":"Attachments Health","description":"Simple health check to verify router is loaded.","operationId":"attachments_health_api_attachments_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/attachments":{"post":{"tags":["attachments"],"summary":"Upload Attachment","description":"Upload an ephemeral attachment.\n\nAccepts images (JPEG, PNG, GIF, WebP) and documents (PDF, DOCX, XLSX, TXT, etc.).\nFiles are stored with a 7-day TTL — use /api/documents/upload for persistent storage.\n\nReturns attachment metadata including the `attachment_id` to include in message payloads.","operationId":"upload_attachment_api_attachments_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_attachment_api_attachments_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/attachments/{attachment_id}":{"get":{"tags":["attachments"],"summary":"Get Attachment","description":"Get attachment metadata.\n\nDoes not return the file content — use this to verify an attachment exists\nbefore including it in a message payload.","operationId":"get_attachment_api_attachments__attachment_id__get","parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["attachments"],"summary":"Delete Attachment","description":"Delete an attachment.\n\nUse this when the user removes an attachment before sending a message.\nThe 7-day lifecycle rule handles cleanup anyway, but this provides immediate removal.","operationId":"delete_attachment_api_attachments__attachment_id__delete","parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Attachment Api Attachments  Attachment Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/files":{"get":{"tags":["workspace-files"],"summary":"List Files","description":"List files and directories at *path* inside the workspace.","operationId":"list_files_api_workspaces__workspace_id__files_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"path","in":"query","required":false,"schema":{"type":"string","description":"Relative path inside workspace","default":".","title":"Path"},"description":"Relative path inside workspace"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/files/content":{"get":{"tags":["workspace-files"],"summary":"Get File Content","description":"Return the text content of a file for the code viewer.","operationId":"get_file_content_api_workspaces__workspace_id__files_content_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Relative file path inside workspace","title":"Path"},"description":"Relative file path inside workspace"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["workspace-files"],"summary":"Write File Content","description":"Write or create a file in the workspace.","operationId":"write_file_content_api_workspaces__workspace_id__files_content_put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteFileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/files/raw":{"get":{"tags":["workspace-files"],"summary":"Get File Raw","description":"Return raw binary bytes of a file (for PDF/DOCX/XLSX/image preview).","operationId":"get_file_raw_api_workspaces__workspace_id__files_raw_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Relative file path inside workspace","title":"Path"},"description":"Relative file path inside workspace"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/exec":{"post":{"tags":["workspace-files"],"summary":"Exec Command","description":"Run a shell command in the workspace.","operationId":"exec_command_api_workspaces__workspace_id__exec_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/canvas/sessions":{"post":{"tags":["workspace-files"],"summary":"Start Canvas Session","description":"Start (or resume from volume state) the workspace's canvas session.","operationId":"start_canvas_session_api_workspaces__workspace_id__canvas_sessions_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["workspace-files"],"summary":"Get Canvas Session Status","description":"Return the status of the workspace's canvas session — ``session`` is null when\nnone exists yet, and ``sdk_available`` says whether the worker could start one\n(PRD-239: the Canvas hides the SDK tab otherwise).","operationId":"get_canvas_session_status_api_workspaces__workspace_id__canvas_sessions_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspace-files"],"summary":"Stop Canvas Session","description":"Stop the workspace's canvas session.","operationId":"stop_canvas_session_api_workspaces__workspace_id__canvas_sessions_delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/canvas/decision":{"post":{"tags":["workspace-files"],"summary":"Decide Canvas Permission","description":"Approve or deny a pending canvas permission request (S4).","operationId":"decide_canvas_permission_api_workspaces__workspace_id__canvas_decision_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanvasDecisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/canvas/auto-accept":{"post":{"tags":["workspace-files"],"summary":"Set Canvas Auto Accept","description":"Toggle session-scoped auto-accept for file edits (S4).","operationId":"set_canvas_auto_accept_api_workspaces__workspace_id__canvas_auto_accept_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanvasAutoAcceptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/canvas/message":{"post":{"tags":["workspace-files"],"summary":"Send Canvas Message","description":"Send a user prompt to the workspace's canvas session (PRD-203 C·S7).\n\nThe turn ingress that lets the canvas be instructed: the worker calls\n``client.query(prompt)`` and streams the resulting turns back over the\ncanvas SSE event stream. Tenancy-checked; behind the same ``agents:execute``\npermission as its start/stop/decision siblings.","operationId":"send_canvas_message_api_workspaces__workspace_id__canvas_message_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanvasMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/canvas/events":{"get":{"tags":["workspace-files"],"summary":"Stream Canvas Events","description":"Server-Sent Events stream of the workspace's canvas session events.","operationId":"stream_canvas_events_api_workspaces__workspace_id__canvas_events_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/canvas/commit-preview":{"get":{"tags":["workspace-files"],"summary":"Preview Canvas Commit","description":"Return an EDITABLE generated commit message + the changed paths (S5).\n\nThe UI pre-fills the message and the user may rewrite it before committing.\nDeterministic (no LLM) via the tested ``generate_commit_message``.","operationId":"preview_canvas_commit_api_workspaces__workspace_id__canvas_commit_preview_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"cwd","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024,"title":"Cwd"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/canvas/commit":{"post":{"tags":["workspace-files"],"summary":"Commit Canvas Session","description":"Commit the session's work on ``canvas/<session-id>`` and push it.\n\nReuses the existing ``workspace_git`` verbs (no new git surface). Push auth\nis a GitHub App installation token (PRD-165) injected server-side; NO token\nmaterial is ever logged or returned — every git result is passed through\n``redact_token`` first (PRD-154 S12 discipline).","operationId":"commit_canvas_session_api_workspaces__workspace_id__canvas_commit_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanvasCommitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/team/members":{"get":{"tags":["team"],"summary":"List Team Members","description":"List all members of a workspace.","operationId":"list_team_members_api_workspaces__workspace_id__team_members_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamMemberResponse"},"title":"Response List Team Members Api Workspaces  Workspace Id  Team Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/team/invite":{"post":{"tags":["team"],"summary":"Invite Member","description":"Invite a new member to the workspace via Clerk.","operationId":"invite_member_api_workspaces__workspace_id__team_invite_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteMemberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/team/members/{member_id}/role":{"patch":{"tags":["team"],"summary":"Update Member Role","description":"Change a member's role (through the people service, ``core.auth.people``, which holds the\nrules: the member must be in this workspace, and its one owner stays its one owner, F152).","operationId":"update_member_role_api_workspaces__workspace_id__team_members__member_id__role_patch","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"integer","title":"Member Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/team/members/{member_id}":{"delete":{"tags":["team"],"summary":"Remove Member","description":"Remove a member from the workspace (through the people service, ``core.auth.people``, which\nholds the rules: the member must be in this workspace, and is never its owner).","operationId":"remove_member_api_workspaces__workspace_id__team_members__member_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"integer","title":"Member Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/team/invitations":{"get":{"tags":["team"],"summary":"List Pending Invitations","description":"List pending (unaccepted, unexpired) invitations for this workspace.","operationId":"list_pending_invitations_api_workspaces__workspace_id__team_invitations_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvitationResponse"},"title":"Response List Pending Invitations Api Workspaces  Workspace Id  Team Invitations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/team/invitations/{invitation_id}":{"delete":{"tags":["team"],"summary":"Revoke Pending Invitation","description":"Revoke a pending invitation. Also revokes the Clerk-side invitation.","operationId":"revoke_pending_invitation_api_workspaces__workspace_id__team_invitations__invitation_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"integer","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/team/accept-invitation":{"post":{"tags":["team"],"summary":"Accept Invitation","description":"Exchange an invitation token for workspace membership.\n\nCalled by /accept-invitation page after the user signs up via Clerk and\nis redirected back to the app. Idempotent: if the user is already a\nmember, returns success with already_member=true.","operationId":"accept_invitation_api_team_accept_invitation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInvitationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/team/invitation-info":{"get":{"tags":["team"],"summary":"Get Invitation Info","description":"Public lookup of invitation metadata by token (for UI rendering before\nthe user is signed in). Returns workspace name, inviter email, role.","operationId":"get_invitation_info_api_team_invitation_info_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/routing/decisions":{"get":{"tags":["Routing"],"summary":"List Decisions","description":"List recent routing decisions with optional filters. Paginated.","operationId":"list_decisions_api_routing_decisions_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source channel","title":"Source"},"description":"Filter by source channel"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by routed agent_id","title":"Agent Id"},"description":"Filter by routed agent_id"},{"name":"was_corrected","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by correction status","title":"Was Corrected"},"description":"Filter by correction status"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/routing/rules":{"get":{"tags":["Routing"],"summary":"List Rules","description":"List all active routing rules for the workspace.","operationId":"list_rules_api_routing_rules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Routing"],"summary":"Create Rule","description":"Create a routing rule for the workspace.","operationId":"create_rule_api_routing_rules_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRuleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/routing/rules/{rule_id}":{"delete":{"tags":["Routing"],"summary":"Delete Rule","description":"Soft-delete a routing rule (sets is_active=False).","operationId":"delete_rule_api_routing_rules__rule_id__delete","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/routing/corrections":{"post":{"tags":["Routing"],"summary":"Record Correction","description":"Record a user correction for a routing decision.\n\nUpdates the routing_decisions table and feeds back into the cache.","operationId":"record_correction_api_routing_corrections_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrectionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/routing/cache/stats":{"get":{"tags":["Routing"],"summary":"Get Cache Stats","description":"Return routing cache statistics: size, hits, misses, hit rate, top routes.","operationId":"get_cache_stats_api_routing_cache_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/routing/triggers/setup":{"post":{"tags":["Routing"],"summary":"Setup Trigger","description":"Set up a Jira trigger subscription via Composio.\n\nThis is the API-based alternative to the ``scripts/setup_jira_trigger.py``\nmanagement script.  It:\n\n1. Calls Composio SDK to subscribe to the given trigger.\n2. Creates a ``TriggerSubscription`` record in the database linking the\n   trigger to an optional ``agent_id`` or ``workflow_id``.\n3. Returns the subscription details.\n\n**Webhook URL configuration:**\nAfter setup, ensure the callback URL is registered in your Composio\ndashboard (https://app.composio.dev → Project Settings → Webhooks).","operationId":"setup_trigger_api_routing_triggers_setup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerSetupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/routing/semantic/reindex":{"post":{"tags":["Routing"],"summary":"Reindex Semantic Embeddings","description":"Force regenerate semantic embeddings for all agents in the workspace.","operationId":"reindex_semantic_embeddings_api_routing_semantic_reindex_post","parameters":[{"name":"force","in":"query","required":false,"schema":{"type":"boolean","description":"Force re-embed even if unchanged","default":false,"title":"Force"},"description":"Force re-embed even if unchanged"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/routing/semantic/status":{"get":{"tags":["Routing"],"summary":"Semantic Status","description":"Check semantic embedding status for all agents in the workspace.","operationId":"semantic_status_api_routing_semantic_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/plugins/upload":{"post":{"tags":["Admin Plugins"],"summary":"Upload Plugin","description":"Upload a plugin zip, run security scans, and create a pending plugin record.","operationId":"upload_plugin_api_admin_plugins_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_plugin_api_admin_plugins_upload_post"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginUploadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/plugins/{plugin_id}/approve":{"post":{"tags":["Admin Plugins"],"summary":"Approve Plugin","description":"Approve a pending plugin for the marketplace.","operationId":"approve_plugin_api_admin_plugins__plugin_id__approve_post","parameters":[{"name":"plugin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plugin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/plugins/{plugin_id}/reject":{"post":{"tags":["Admin Plugins"],"summary":"Reject Plugin","description":"Reject a pending plugin with a reason.","operationId":"reject_plugin_api_admin_plugins__plugin_id__reject_post","parameters":[{"name":"plugin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plugin Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/plugins/{plugin_id}/scan":{"get":{"tags":["Admin Plugins"],"summary":"Get Scan Results","description":"Return security scan results (static + LLM) for a plugin.","operationId":"get_scan_results_api_admin_plugins__plugin_id__scan_get","parameters":[{"name":"plugin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plugin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanResultOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/plugins/{plugin_id}/deactivate":{"post":{"tags":["Admin Plugins"],"summary":"Deactivate Plugin","description":"Deactivate a plugin and cascade-remove all workspace enablements and agent assignments.","operationId":"deactivate_plugin_api_admin_plugins__plugin_id__deactivate_post","parameters":[{"name":"plugin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plugin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/plugins/pending":{"get":{"tags":["Admin Plugins"],"summary":"List Pending Plugins","description":"List plugins with approval_status='pending'. Paginated.","operationId":"list_pending_plugins_api_admin_plugins_pending_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/plugins/import-github":{"post":{"tags":["Admin Plugins"],"summary":"Import Github","description":"Import plugins AND/OR standalone skills from a GitHub repo URL.\n\nClones the repo, discovers plugins (manifest.json) and standalone\nSKILL.md files. Plugins go through the standard pipeline; standalone\nskills are imported directly as Skill DB records.","operationId":"import_github_api_admin_plugins_import_github_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubImportBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/plugins/{plugin_id}":{"delete":{"tags":["Admin Plugins"],"summary":"Delete Plugin","description":"Hard-delete a plugin: remove S3 files, all DB records, and junction tables.","operationId":"delete_plugin_api_admin_plugins__plugin_id__delete","parameters":[{"name":"plugin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plugin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/plugins/backfill-categories":{"post":{"tags":["Admin Plugins"],"summary":"Backfill Categories","description":"Backfill category_id on all plugins that don't have one set.\n\nUses the same keyword-matching logic as the upload pipeline.","operationId":"backfill_categories_api_admin_plugins_backfill_categories_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/workspaces":{"get":{"tags":["Admin Workspaces"],"summary":"List Workspaces","description":"List workspaces with counts + storage. Admin-only.","operationId":"list_workspaces_api_admin_workspaces_get","parameters":[{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}},{"name":"include_paused","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Paused"}},{"name":"plan","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Match against name or slug","title":"Search"},"description":"Match against name or slug"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(created_at|name|storage_bytes|agents_count)$","default":"created_at","title":"Sort"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Order"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workspaces/plans":{"get":{"tags":["Admin Workspaces"],"summary":"List Plan Tiers","description":"The tier catalogue behind the console's plan dropdown. Admin-only.\n\nEvery tier is returned, not just the assignable ones, so a workspace sitting\non a non-assignable tier (``enterprise`` today) still renders its own plan\nas the current value instead of showing blank. ``assignable`` says which the\ndropdown may actually select.\n\n``nav`` is the same exposure the client gets from\n``GET /api/workspaces/current`` — it is what makes the consequence of a tier\nlegible in the console (\"Basic hides Team and Analytics\") rather than\nsomething the operator has to infer from the families map.","operationId":"list_plan_tiers_api_admin_workspaces_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Plan Tiers Api Admin Workspaces Plans Get"}}}}}}},"/api/admin/workspaces/{workspace_id}/plan":{"patch":{"tags":["Admin Workspaces"],"summary":"Change Workspace Plan","description":"Move a workspace onto another tier. Admin-only.\n\nRouted through ``services.plan_tiers.assign_plan`` — the ONE writer of\n``workspaces.plan`` / ``plan_limits`` (FR-4 auditability) — so the tier's\nseats and agent cap apply exactly as they do on the onboarding path.\n\n``with_budget=False`` (owner decision, 2026-09-11): an operator retiering a\nLIVE tenant must never hand it a spend ceiling it did not have a moment ago.\n``modules/policy/budget.py`` enforces ``plan_limits.budget`` through\n``check_budget``, and a workspace with no budget key is ceiling-less today —\nso minting one here would silently throttle a pilot. The same switch clears a\nstale TIER-owned ceiling a previous assignment left behind, while an admin\ncustom budget (``source != \"tier\"``) is the customer's own and survives\nuntouched.\n\nDowngrades are permitted but reported: a tier whose ``seats`` sit below the\nworkspace's active member count comes back in ``warnings``. Nothing is\nremoved — the cap binds the NEXT invitation\n(``core/workspaces/invitations.py``), never the members already in place.","operationId":"change_workspace_plan_api_admin_workspaces__workspace_id__plan_patch","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChangeBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Change Workspace Plan Api Admin Workspaces  Workspace Id  Plan Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workspaces/{workspace_id}":{"get":{"tags":["Admin Workspaces"],"summary":"Get Workspace","description":"Workspace detail with full counts (incl. messages).","operationId":"get_workspace_api_admin_workspaces__workspace_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Workspaces"],"summary":"Delete Workspace","description":"Delete a workspace.\n\nMarks `deleted_at` immediately so the workspace disappears from listings\nand access gates, then queues a background purge that wipes S3 objects,\ndeletes the owner's Clerk user, cascades all workspace-scoped DB rows,\nand finally removes the `workspaces` row itself.\n\nThe purge runs in `BackgroundTasks` (FastAPI thread) — fine for admin-\ntriggered, low-volume deletions. See `services/workspace_purge.py`.","operationId":"delete_workspace_api_admin_workspaces__workspace_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workspaces/{workspace_id}/pause":{"post":{"tags":["Admin Workspaces"],"summary":"Pause Workspace","description":"Pause a workspace (non-payment, abuse review). Sets paused_at + paused_reason.","operationId":"pause_workspace_api_admin_workspaces__workspace_id__pause_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PauseBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workspaces/{workspace_id}/resume":{"post":{"tags":["Admin Workspaces"],"summary":"Resume Workspace","description":"Clear paused state and reactivate workspace.","operationId":"resume_workspace_api_admin_workspaces__workspace_id__resume_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workspaces/{workspace_id}/purge":{"post":{"tags":["Admin Workspaces"],"summary":"Purge Workspace","description":"Re-trigger hard-purge for an already-soft-deleted workspace.\n\nUsed to clean up workspaces that were soft-deleted before the purge\nbackground task existed, or to retry a purge that previously errored.\nThe workspace MUST already have `deleted_at` set — refuses otherwise.","operationId":"purge_workspace_api_admin_workspaces__workspace_id__purge_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workspaces/{workspace_id}/restore":{"post":{"tags":["Admin Workspaces"],"summary":"Restore Workspace","description":"Restore a soft-deleted workspace (undelete).","operationId":"restore_workspace_api_admin_workspaces__workspace_id__restore_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workspaces/{workspace_id}/credits":{"post":{"tags":["Admin Credits"],"summary":"Adjust Workspace Credits","description":"Grant (positive) or take back (negative) credits, with a reason. Platform admin only.","operationId":"adjust_workspace_credits_api_admin_workspaces__workspace_id__credits_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAdjustBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Adjust Workspace Credits Api Admin Workspaces  Workspace Id  Credits Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/workspaces/{workspace_id}/business-invite":{"post":{"tags":["Admin Credits"],"summary":"Create Business Invite","description":"Offer Business to one workspace; its owner buys it on their Billing tab. Platform admin only.","operationId":"create_business_invite_api_admin_workspaces__workspace_id__business_invite_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Business Invite Api Admin Workspaces  Workspace Id  Business Invite Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/products":{"get":{"tags":["Admin Products"],"summary":"List Products","description":"Every product, by slug.","operationId":"list_products_api_admin_products_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Products Api Admin Products Get"}}}}}},"post":{"tags":["Admin Products"],"summary":"Create Product","description":"Creates a product and mints its key; the key is in this answer only.","operationId":"create_product_api_admin_products_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Product Api Admin Products Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/products/{product_id}":{"get":{"tags":["Admin Products"],"summary":"Get Product","description":"One product, with how many workspaces carry it.","operationId":"get_product_api_admin_products__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Product Api Admin Products  Product Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin Products"],"summary":"Update Product","description":"Changes what the body names; the rest stays. ``default_retention_days: null`` clears it.","operationId":"update_product_api_admin_products__product_id__patch","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_Editable"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Product Api Admin Products  Product Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Products"],"summary":"Delete Product","description":"Deletes the product, and with it its key; refused (409) while any workspace carries it. The product's\nrow is locked while it is checked, so a find-or-create (5b), which reads it first, waits for the delete.","operationId":"delete_product_api_admin_products__product_id__delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Product Api Admin Products  Product Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/products/{product_id}/key":{"post":{"tags":["Admin Products"],"summary":"Replace Product Key","description":"A new key for the product, in this answer only; the old key stops working now.","operationId":"replace_product_key_api_admin_products__product_id__key_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Replace Product Key Api Admin Products  Product Id  Key Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/products/{product_id}/workspaces":{"post":{"tags":["Products"],"summary":"Find Or Create Workspace","description":"The workspace for ``external_id``: 201 when it was created, 200 when found; 409 when it is closed.","operationId":"find_or_create_workspace_api_products__product_id__workspaces_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Find Or Create Workspace Api Products  Product Id  Workspaces Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Products"],"summary":"List Workspaces","description":"The product's workspaces, oldest first; closed ones only with ``include_closed``.","operationId":"list_workspaces_api_products__product_id__workspaces_get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"include_closed","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Closed"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Workspaces Api Products  Product Id  Workspaces Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/products/{product_id}/workspaces/{workspace_id}":{"delete":{"tags":["Products"],"summary":"Close Workspace","description":"Closes the workspace now (202): its purge is due when ``purge_after`` passes, unless it is restored.","operationId":"close_workspace_api_products__product_id__workspaces__workspace_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Close Workspace Api Products  Product Id  Workspaces  Workspace Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/products/{product_id}/workspaces/{workspace_id}/restore":{"post":{"tags":["Products"],"summary":"Restore Workspace","description":"Opens a closed workspace again, within its grace.","operationId":"restore_workspace_api_products__product_id__workspaces__workspace_id__restore_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Restore Workspace Api Products  Product Id  Workspaces  Workspace Id  Restore Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rooms":{"post":{"tags":["Rooms"],"summary":"Create Room","description":"Make a room with its first members; the maker is its room owner. 422 (nothing made) for a member\nwho may not join, a room past a limit, or a module's kind whose module is not on. A module's kind adds its\nagents and Auto (PRD-290 §5.4); ``leftOut`` lists, by name and with the reason, those that did not join.","operationId":"create_room_api_rooms_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoomRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Room Api Rooms Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Rooms"],"summary":"List Rooms","description":"The caller's rooms in this workspace, most recent activity first; with ``agent_id``, only those the agent\nis an active member of (PRD-291 §4.3). Never a room the caller is not in.","operationId":"list_rooms_api_rooms_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2147483647,"exclusiveMinimum":0},{"type":"null"}],"title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Rooms Api Rooms Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rooms/kinds":{"get":{"tags":["Rooms"],"summary":"List Room Kinds","description":"The kinds a room can be made of in this workspace: core's, then those of the modules on in it, each\n``{name, label, module, auto, agents}`` (``agents``: how many agents the kind names).","operationId":"list_room_kinds_api_rooms_kinds_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Room Kinds Api Rooms Kinds Get"}}}}}}},"/api/rooms/search":{"get":{"tags":["Rooms"],"summary":"Search Rooms","description":"Messages holding ``q``, newest first, of the last ``days``, over the rooms the caller is an active\nmember of.","operationId":"search_rooms_api_rooms_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Search Rooms Api Rooms Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rooms/asks":{"get":{"tags":["Rooms"],"summary":"Get Agent Asks","description":"One agent's asks, sent and received, newest first, from the rooms of this workspace the caller is an\nactive member of, whatever their role; ``before`` (an ask id) pages further back. No ask text.","operationId":"get_agent_asks_api_rooms_asks_get","parameters":[{"name":"agent_id","in":"query","required":true,"schema":{"type":"integer","maximum":2147483647,"exclusiveMinimum":0,"title":"Agent Id"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Agent Asks Api Rooms Asks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rooms/replies":{"get":{"tags":["Rooms"],"summary":"Get Agent Replies","description":"One agent's replies, newest first, from the rooms of this workspace the caller is an active member of,\nwhatever their role; ``before`` (a message id) pages further back. Each with a short excerpt of its text\n(``services.rooms.reply_views``).","operationId":"get_agent_replies_api_rooms_replies_get","parameters":[{"name":"agent_id","in":"query","required":true,"schema":{"type":"integer","maximum":2147483647,"exclusiveMinimum":0,"title":"Agent Id"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Agent Replies Api Rooms Replies Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rooms/{room_id}":{"get":{"tags":["Rooms"],"summary":"Get Room","description":"The room, its members, the caller's room role, and whether an agent's turn runs in it now.","operationId":"get_room_api_rooms__room_id__get","parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Room Api Rooms  Room Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Rooms"],"summary":"Rename Room","description":"Rename the room; the room as it is now (``_answer``).","operationId":"rename_room_api_rooms__room_id__patch","parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameRoomRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Rename Room Api Rooms  Room Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Rooms"],"summary":"Delete Room","description":"Delete the room, with its messages and memberships.","operationId":"delete_room_api_rooms__room_id__delete","parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Room Api Rooms  Room Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rooms/{room_id}/messages":{"get":{"tags":["Rooms"],"summary":"Get Room Messages","description":"A page of the room's messages, oldest first; ``before`` (a message id) pages further back.","operationId":"get_room_messages_api_rooms__room_id__messages_get","parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Room Messages Api Rooms  Room Id  Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Rooms"],"summary":"Post Room Message","description":"Post in the room as the caller. With no agent mentioned: the saved message (201). With agents\nmentioned (as data): their turns, as a stream (``api/rooms_turns.py``). A room viewer may not post\n(403); a mention of a non-member, of more agents than allowed or of one that can't answer is refused\n(422), and of any agent by a caller who may not run agents (403): nothing is saved. Each person\nmentioned is pushed after the commit, off the request (``services.notification_events.room_mention``).","operationId":"post_room_message_api_rooms__room_id__messages_post","parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostMessageRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rooms/{room_id}/cancel":{"post":{"tags":["Rooms"],"summary":"Cancel Room Turn","description":"Stop one post: the agents' turns running for the message ``messageId`` names, and those still to run\nin that post, stop, each leaving its note; another post in the room runs on. Its author or the room's\nowner may stop it (403 for another member, and for a viewer); a message of no post in this room is 404.\n``cancelled`` is false when nothing of that post is in flight.","operationId":"cancel_room_turn_api_rooms__room_id__cancel_post","parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelTurnRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Room Turn Api Rooms  Room Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rooms/{room_id}/members":{"post":{"tags":["Rooms"],"summary":"Add Room Member","description":"Add a person or an agent; the room as it is now (``_answer``). 422 (nothing written) for one who may not join or\na room past a limit, 409 for one who is already a member.","operationId":"add_room_member_api_rooms__room_id__members_post","parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMemberRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Room Member Api Rooms  Room Id  Members Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Rooms"],"summary":"Remove Room Member","description":"Remove a person or an agent; the room as it is now (``_answer``). 404 for one who is not a member.","operationId":"remove_room_member_api_rooms__room_id__members_delete","parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}},{"name":"type","in":"query","required":true,"schema":{"enum":["user","agent"],"type":"string","title":"Type"}},{"name":"id","in":"query","required":true,"schema":{"type":"integer","maximum":2147483647,"exclusiveMinimum":0,"title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Room Member Api Rooms  Room Id  Members Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rooms/{room_id}/leave":{"post":{"tags":["Rooms"],"summary":"Leave Room","description":"The caller leaves the room. When they were its last owner and people remain, the longest-standing of\nthem becomes its owner (``newOwnerUserId``).","operationId":"leave_room_api_rooms__room_id__leave_post","parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Leave Room Api Rooms  Room Id  Leave Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rooms/{room_id}/mute":{"post":{"tags":["Rooms"],"summary":"Mute Room","description":"Mute the room for the caller: a mention of them in it sends no push. Muting it again changes nothing.","operationId":"mute_room_api_rooms__room_id__mute_post","parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Mute Room Api Rooms  Room Id  Mute Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Rooms"],"summary":"Unmute Room","description":"Unmute the room for the caller. Unmuting a room that is not muted changes nothing.","operationId":"unmute_room_api_rooms__room_id__mute_delete","parameters":[{"name":"room_id","in":"path","required":true,"schema":{"type":"string","title":"Room Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Unmute Room Api Rooms  Room Id  Mute Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/summary":{"get":{"tags":["Billing"],"summary":"Get Billing Summary","description":"Plan, status, renewal date and credits by bucket for the caller's workspace.","operationId":"get_billing_summary_api_v1_billing_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Billing Summary Api V1 Billing Summary Get"}}}}}}},"/api/v1/billing/ledger":{"get":{"tags":["Billing"],"summary":"Get Billing Ledger","description":"The workspace's credit ledger, newest first, with the last 30 days' credits by model.","operationId":"get_billing_ledger_api_v1_billing_ledger_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Billing Ledger Api V1 Billing Ledger Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/plans":{"get":{"tags":["Billing"],"summary":"Get Billing Plans","description":"The plans, the top-up and this workspace's subscription, for the Billing tab.","operationId":"get_billing_plans_api_v1_billing_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Billing Plans Api V1 Billing Plans Get"}}}}}}},"/api/v1/billing/checkout":{"post":{"tags":["Billing"],"summary":"Start Billing Checkout","description":"An in-page checkout session for buying a plan or a top-up.","operationId":"start_billing_checkout_api_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Start Billing Checkout Api V1 Billing Checkout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/webhooks/stripe":{"post":{"tags":["Billing"],"summary":"Stripe Webhook","description":"Stripe's events: verified, stored once, then applied to plans and credits.","operationId":"stripe_webhook_api_v1_billing_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Stripe Webhook Api V1 Billing Webhooks Stripe Post"}}}}}}},"/api/v1/billing/payment-method":{"get":{"tags":["Billing"],"summary":"Get Payment Method","description":"The card the plan is charged on, or none.","operationId":"get_payment_method_api_v1_billing_payment_method_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Payment Method Api V1 Billing Payment Method Get"}}}}}},"post":{"tags":["Billing"],"summary":"Save Payment Method","description":"Make the card a finished setup saved the default for the plan.","operationId":"save_payment_method_api_v1_billing_payment_method_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupDoneBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Save Payment Method Api V1 Billing Payment Method Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/payment-method/setup":{"post":{"tags":["Billing"],"summary":"Start Payment Method Setup","description":"A setup session for entering a new card in our tab.","operationId":"start_payment_method_setup_api_v1_billing_payment_method_setup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Start Payment Method Setup Api V1 Billing Payment Method Setup Post"}}}}}}},"/api/v1/billing/invoices":{"get":{"tags":["Billing"],"summary":"List Invoices","description":"The workspace's invoices, newest first.","operationId":"list_invoices_api_v1_billing_invoices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Invoices Api V1 Billing Invoices Get"}}}}}}},"/api/v1/billing/invoices/{invoice_id}/pdf":{"get":{"tags":["Billing"],"summary":"Download Invoice","description":"One invoice as a PDF, served by us (the browser never visits Stripe).","operationId":"download_invoice_api_v1_billing_invoices__invoice_id__pdf_get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/subscription/cancel":{"post":{"tags":["Billing"],"summary":"Cancel Subscription","description":"End the plan at the period end.","operationId":"cancel_subscription_api_v1_billing_subscription_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Cancel Subscription Api V1 Billing Subscription Cancel Post"}}}}}}},"/api/v1/billing/subscription/resume":{"post":{"tags":["Billing"],"summary":"Resume Subscription","description":"Keep the plan after all.","operationId":"resume_subscription_api_v1_billing_subscription_resume_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Resume Subscription Api V1 Billing Subscription Resume Post"}}}}}}},"/api/v1/billing/plan-change/preview":{"post":{"tags":["Billing"],"summary":"Preview Plan Change","description":"What a plan change costs now and when it takes effect.","operationId":"preview_plan_change_api_v1_billing_plan_change_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Preview Plan Change Api V1 Billing Plan Change Preview Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/plan-change":{"post":{"tags":["Billing"],"summary":"Change Plan","description":"Upgrade now (prorated) or downgrade at the period end.","operationId":"change_plan_api_v1_billing_plan_change_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Change Plan Api V1 Billing Plan Change Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/plan-change/cancel":{"post":{"tags":["Billing"],"summary":"Cancel Plan Change","description":"Keep the current plan: undo a downgrade waiting for the period end.","operationId":"cancel_plan_change_api_v1_billing_plan_change_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Cancel Plan Change Api V1 Billing Plan Change Cancel Post"}}}}}}},"/api/marketplace/plugins":{"get":{"tags":["Marketplace Plugins"],"summary":"List Plugins","description":"List approved and active marketplace plugins with optional filters.","operationId":"list_plugins_api_marketplace_plugins_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category slug","title":"Category"},"description":"Filter by category slug"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search plugin name/description","title":"Search"},"description":"Search plugin name/description"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Filter by tags","title":"Tags"},"description":"Filter by tags"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"Sort: popular, newest, name","default":"popular","title":"Sort"},"description":"Sort: popular, newest, name"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/plugins/categories":{"get":{"tags":["Marketplace Plugins"],"summary":"List Categories","description":"List all plugin categories.","operationId":"list_categories_api_marketplace_plugins_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/api__marketplace_plugins__CategoryOut"},"type":"array","title":"Response List Categories Api Marketplace Plugins Categories Get"}}}}}}},"/api/marketplace/plugins/{plugin_id}":{"get":{"tags":["Marketplace Plugins"],"summary":"Get Plugin Detail","description":"Get full plugin details including contents manifest from S3.","operationId":"get_plugin_detail_api_marketplace_plugins__plugin_id__get","parameters":[{"name":"plugin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plugin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/plugins/{plugin_id}/content":{"get":{"tags":["Marketplace Plugins"],"summary":"Get Plugin Content","description":"Get full plugin content (skills text, commands text) loaded from S3.\n\nUsed by AgentFactory to build the full agent context at runtime.","operationId":"get_plugin_content_api_marketplace_plugins__plugin_id__content_get","parameters":[{"name":"plugin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plugin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginContentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/llm/catalog":{"get":{"tags":["LLM Marketplace"],"summary":"Browse Catalog","description":"The per-route catalogue: one card per (serving provider, model). PRD-287 US-301: each model says whether\nthis workspace can call it, who pays, and why it cannot be chosen for ``purpose``; ``provider_groups``\nlists every chat provider as this workspace can call it (``services.model_catalog_read``).","operationId":"browse_catalog_api_marketplace_llm_catalog_get","parameters":[{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Serving provider slug (openrouter, nvidia, openai…)","title":"Provider"},"description":"Serving provider slug (openrouter, nvidia, openai…)"},{"name":"vendor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Vendor (moonshotai, deepseek, openai…)","title":"Vendor"},"description":"Vendor (moonshotai, deepseek, openai…)"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"price_tier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"free | budget | mid | premium","title":"Price Tier"},"description":"free | budget | mid | premium"},{"name":"min_context","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Context"}},{"name":"max_cost","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Max input cost per 1K tokens","title":"Max Cost"},"description":"Max input cost per 1K tokens"},{"name":"supports_tools","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Tools"}},{"name":"supports_vision","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Vision"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"cost|context|name|newest; none: callable providers first","title":"Sort By"},"description":"cost|context|name|newest; none: callable providers first"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"purpose","in":"query","required":false,"schema":{"enum":["auto","agent","list"],"type":"string","description":"auto | agent | list: what the model is chosen for","default":"list","title":"Purpose"},"description":"auto | agent | list: what the model is chosen for"},{"name":"callable_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only models this workspace can call now","default":false,"title":"Callable Only"},"description":"Only models this workspace can call now"},{"name":"accepts","in":"query","required":false,"schema":{"anyOf":[{"enum":["text","image","file","audio","video"],"type":"string"},{"type":"null"}],"description":"An input the model accepts","title":"Accepts"},"description":"An input the model accepts"},{"name":"can","in":"query","required":false,"schema":{"anyOf":[{"enum":["tools","vision","json","reasoning"],"type":"string"},{"type":"null"}],"description":"tools | vision | json | reasoning","title":"Can"},"description":"tools | vision | json | reasoning"},{"name":"who_pays","in":"query","required":false,"schema":{"anyOf":[{"enum":["own_key","credits","install_key","free","own_server"],"type":"string"},{"type":"null"}],"description":"own_key | credits | install_key | free | own_server","title":"Who Pays"},"description":"own_key | credits | install_key | free | own_server"},{"name":"include_no_tools","in":"query","required":false,"schema":{"type":"boolean","description":"For auto and agent: show models without tool calling","default":false,"title":"Include No Tools"},"description":"For auto and agent: show models without tool calling"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/llm/sync/status":{"get":{"tags":["LLM Marketplace"],"summary":"Sync Status","description":"When each syncable provider's catalogue was last refreshed.","operationId":"sync_status_api_marketplace_llm_sync_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/marketplace/llm/sync/{provider}":{"post":{"tags":["LLM Marketplace"],"summary":"Sync Provider","description":"Refresh one provider's catalogue (admin). OpenRouter: cache sync + projection;\nNVIDIA: the public model list, metadata borrowed from OpenRouter's rows;\nAnthropic: its Models API, read with the key this workspace's calls use.","operationId":"sync_provider_api_marketplace_llm_sync__provider__post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/llm/own-server/models/available":{"get":{"tags":["LLM Marketplace"],"summary":"Available Models","description":"What the workspace's own server lists, each with the window it reports (else null) and whether\nthis workspace has added it. A blocking call to the server: a plain ``def``. It makes the server\ncall out with the workspace's key, as the key's Test does, so it needs ``workspace:manage`` too, and\ngoes through the pinned client where the edition guards a workspace's endpoint (PRD-285 §5.12), held\nto the check's own limits (counted against this workspace's calls in flight) and closed when the call\nends. At most ``MAX_LISTED_MODELS`` are listed.","operationId":"available_models_api_marketplace_llm_own_server_models_available_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Available Models Api Marketplace Llm Own Server Models Available Get"}}}}}}},"/api/marketplace/llm/own-server/models":{"post":{"tags":["LLM Marketplace"],"summary":"Add Model","description":"Add a model on the workspace's own server: free, active, this workspace's: the row is the model\nadded (PRD-287 US-306). A row of the name a lock set inactive comes back with these sizes (``own.add_row``).","operationId":"add_model_api_marketplace_llm_own_server_models_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnServerModelCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/llm/own-server/models/{model_row_id}":{"patch":{"tags":["LLM Marketplace"],"summary":"Change Model","description":"Change a model this workspace added: its size, its abilities, its shown name. Never its name.","operationId":"change_model_api_marketplace_llm_own_server_models__model_row_id__patch","parameters":[{"name":"model_row_id","in":"path","required":true,"schema":{"type":"integer","title":"Model Row Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnServerModelChanges"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["LLM Marketplace"],"summary":"Remove Model","description":"Remove a model this workspace added, unless one of its agents uses it (the answer names them).","operationId":"remove_model_api_marketplace_llm_own_server_models__model_row_id__delete","parameters":[{"name":"model_row_id","in":"path","required":true,"schema":{"type":"integer","title":"Model Row Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/llm/usage":{"get":{"tags":["LLM Analytics"],"summary":"Get Usage","description":"Token usage grouped by dimension.\n\n``route`` (model × serving provider) is the honest unit of cost: a free\nNVIDIA route and a paid OpenRouter route for the same vendor model are two\nrows. ``execution`` groups by the thing that spent (``mission:<id>``,\n``board_task:<id>``, ``chat:<id>``) so a mission's cost can be joined back.","operationId":"get_usage_api_analytics_llm_usage_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"1h|24h|7d|30d|90d","default":"7d","title":"Period"},"description":"1h|24h|7d|30d|90d"},{"name":"group_by","in":"query","required":false,"schema":{"type":"string","description":"model|route|provider|agent|tier|is_byok|request_type|execution","default":"model","title":"Group By"},"description":"model|route|provider|agent|tier|is_byok|request_type|execution"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UsageGroup"},"title":"Response Get Usage Api Analytics Llm Usage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/llm/costs":{"get":{"tags":["LLM Analytics"],"summary":"Get Costs","description":"Cost breakdown by dimension.","operationId":"get_costs_api_analytics_llm_costs_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"7d","title":"Period"}},{"name":"breakdown","in":"query","required":false,"schema":{"type":"string","description":"model|provider|agent|daily","default":"model","title":"Breakdown"},"description":"model|provider|agent|daily"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CostBreakdown"},"title":"Response Get Costs Api Analytics Llm Costs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/llm/summary":{"get":{"tags":["LLM Analytics"],"summary":"Get Summary","description":"Dashboard summary: totals, cache share, top routes, per-provider split, cost trend.","operationId":"get_summary_api_analytics_llm_summary_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"7d","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/llm/recommendations":{"get":{"tags":["LLM Analytics"],"summary":"Get Recommendations","description":"AI-generated cost optimization suggestions based on usage patterns.","operationId":"get_recommendations_api_analytics_llm_recommendations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Recommendation"},"type":"array","title":"Response Get Recommendations Api Analytics Llm Recommendations Get"}}}}}}},"/api/analytics/llm/costs/daily-by-model":{"get":{"tags":["LLM Analytics"],"summary":"Get Daily Costs By Model","description":"Daily cost per ROUTE (model × serving provider) for the multi-line chart.\n\n``models`` holds the series keys (``<model>@<provider>``), ``routes`` the\nfacts behind each key (label, provider, billing) — a free route and a paid\nroute for the same vendor model are two lines.","operationId":"get_daily_costs_by_model_api_analytics_llm_costs_daily_by_model_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"7d|30d|90d","default":"30d","title":"Period"},"description":"7d|30d|90d"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/llm/comparison":{"get":{"tags":["LLM Analytics"],"summary":"Get Model Comparison","description":"Compare selected models side-by-side: each route's catalogue price and context, and its usage.","operationId":"get_model_comparison_api_analytics_llm_comparison_get","parameters":[{"name":"model_ids","in":"query","required":true,"schema":{"type":"string","description":"Comma-separated model IDs (max 4)","title":"Model Ids"},"description":"Comma-separated model IDs (max 4)"},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"7d|30d|90d","default":"30d","title":"Period"},"description":"7d|30d|90d"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModelComparisonItem"},"title":"Response Get Model Comparison Api Analytics Llm Comparison Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/llm/projections":{"get":{"tags":["LLM Analytics"],"summary":"Get Cost Projections","description":"Projected monthly costs based on current usage trajectory.","operationId":"get_cost_projections_api_analytics_llm_projections_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"7d|30d|90d","default":"30d","title":"Period"},"description":"7d|30d|90d"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostProjectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/llm/openrouter/credits":{"get":{"tags":["LLM Analytics"],"summary":"Get OpenRouter credits balance","description":"Return the OpenRouter account credits balance.","operationId":"get_openrouter_credits_api_analytics_llm_openrouter_credits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenRouterCreditsResponse"}}}}}}},"/api/analytics/llm/openrouter/key-info":{"get":{"tags":["LLM Analytics"],"summary":"Get OpenRouter key usage stats","description":"Return OpenRouter key limits and daily/weekly/monthly usage stats.","operationId":"get_openrouter_key_info_api_analytics_llm_openrouter_key_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenRouterKeyInfoResponse"}}}}}}},"/api/analytics/llm/openrouter/sync":{"post":{"tags":["LLM Analytics"],"summary":"Trigger OpenRouter activity sync","description":"Sync OpenRouter activity data into llm_usage for the current workspace.\nOnly works with workspace BYOK keys to prevent cross-workspace data duplication.","operationId":"sync_openrouter_activity_api_analytics_llm_openrouter_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenRouterSyncResponse"}}}}}}},"/api/admin/analytics/costs":{"get":{"tags":["Admin Analytics"],"summary":"Get Admin Cost Analytics","description":"Platform-wide cost analytics across all workspaces (super-admin via the router-wide lock).","operationId":"get_admin_cost_analytics_api_admin_analytics_costs_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"7d|30d|90d","default":"30d","title":"Period"},"description":"7d|30d|90d"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCostAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/analytics/dashboard":{"get":{"tags":["Admin Analytics"],"summary":"Get Admin Dashboard","description":"Comprehensive admin dashboard: workspaces with resource counts,\nplatform-wide model usage, daily cost by provider, top models,\nand BYOK cost split.  All in a single call.","operationId":"get_admin_dashboard_api_admin_analytics_dashboard_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"7d|30d|90d","default":"30d","title":"Period"},"description":"7d|30d|90d"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/composio/apps":{"get":{"tags":["Composio Analytics"],"summary":"Get Connected Apps","description":"Connected apps with action counts, agent count, and documents synced.","operationId":"get_connected_apps_api_analytics_composio_apps_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"7|30|90","default":30,"title":"Days"},"description":"7|30|90"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConnectedAppStats"},"title":"Response Get Connected Apps Api Analytics Composio Apps Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/composio/actions":{"get":{"tags":["Composio Analytics"],"summary":"Get Action Leaderboard","description":"Action leaderboard sorted by usage count descending.","operationId":"get_action_leaderboard_api_analytics_composio_actions_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"7|30|90","default":30,"title":"Days"},"description":"7|30|90"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActionLeaderboardEntry"},"title":"Response Get Action Leaderboard Api Analytics Composio Actions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/composio/agent-tools":{"get":{"tags":["Composio Analytics"],"summary":"Get Agent Tools","description":"Per-agent tool mapping with usage counts.","operationId":"get_agent_tools_api_analytics_composio_agent_tools_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"7|30|90","default":30,"title":"Days"},"description":"7|30|90"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentToolMapping"},"title":"Response Get Agent Tools Api Analytics Composio Agent Tools Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/composio/execution-stats":{"get":{"tags":["Composio Analytics"],"summary":"Get Execution Stats","description":"Overall execution stats: volume, success/error rates, latency percentiles.","operationId":"get_execution_stats_api_analytics_composio_execution_stats_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"7|30|90","default":30,"title":"Days"},"description":"7|30|90"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionOverview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/composio/performance-by-action":{"get":{"tags":["Composio Analytics"],"summary":"Get Performance By Action","description":"Per-action performance breakdown: latency, error rate, cache hit rate.","operationId":"get_performance_by_action_api_analytics_composio_performance_by_action_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"7|30|90","default":30,"title":"Days"},"description":"7|30|90"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActionPerformance"},"title":"Response Get Performance By Action Api Analytics Composio Performance By Action Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/composio/daily-volume":{"get":{"tags":["Composio Analytics"],"summary":"Get Daily Volume","description":"Daily execution volume for charting trends.","operationId":"get_daily_volume_api_analytics_composio_daily_volume_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"7|30|90","default":30,"title":"Days"},"description":"7|30|90"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DailyVolume"},"title":"Response Get Daily Volume Api Analytics Composio Daily Volume Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/composio/recent-executions":{"get":{"tags":["Composio Analytics"],"summary":"Get Recent Executions","description":"Recent tool executions for live monitoring.","operationId":"get_recent_executions_api_analytics_composio_recent_executions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecentExecution"},"title":"Response Get Recent Executions Api Analytics Composio Recent Executions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/composio/error-breakdown":{"get":{"tags":["Composio Analytics"],"summary":"Get Error Breakdown","description":"Top errors by frequency for debugging.","operationId":"get_error_breakdown_api_analytics_composio_error_breakdown_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"7|30|90","default":30,"title":"Days"},"description":"7|30|90"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ErrorBreakdown"},"title":"Response Get Error Breakdown Api Analytics Composio Error Breakdown Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/charts/generate":{"post":{"tags":["Analytics Charts"],"summary":"Generate Chart","description":"Generate an AI-powered chart from LLM usage data using PandasAI.","operationId":"generate_chart_api_analytics_charts_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartGenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/charts/presets":{"get":{"tags":["Analytics Charts"],"summary":"Get Chart Presets","description":"Return list of pre-built chart configurations.","operationId":"get_chart_presets_api_analytics_charts_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ChartPreset"},"type":"array","title":"Response Get Chart Presets Api Analytics Charts Presets Get"}}}}}}},"/api/keys":{"get":{"tags":["API Keys"],"summary":"List Api Keys","description":"List all API keys for the current workspace (masked), each with when and by whom it was saved.","operationId":"list_api_keys_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyOut"},"type":"array","title":"Response List Api Keys Api Keys Get"}}}}}},"post":{"tags":["API Keys"],"summary":"Add Api Key","description":"Add a new BYOK API key for the current workspace.","operationId":"add_api_key_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/keys/{key_id}":{"delete":{"tags":["API Keys"],"summary":"Delete Api Key","description":"Remove a BYOK API key.","operationId":"delete_api_key_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/keys/{key_id}/test":{"post":{"tags":["API Keys"],"summary":"Test Api Key","description":"Test if a BYOK API key is valid by making a minimal API call.","operationId":"test_api_key_api_keys__key_id__test_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyTestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/keys/platform-status":{"get":{"tags":["API Keys"],"summary":"Get Platform Key Status","description":"Which providers the install holds a stored key for, as booleans: only the install's own\ncredentials count, in the install's workspace or with no workspace\n(``install_credentials.providers_with_install_key``). Presence only: nothing is decrypted, and no key\nvalue is returned. Any signed-in member may read it. A plain ``def``: the read is synchronous.","operationId":"get_platform_key_status_api_keys_platform_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/keys/providers":{"get":{"tags":["API Keys"],"summary":"List Providers","description":"The provider registry as the UI renders it (PRD-236 S0.6).\n\nLabels, key placeholders, docs links, the NVIDIA trial and rate-limit\nnotes, and per-edition flags (``platform_key`` is False for byok_only\nproviders in saas). Never a key, never a config attribute name.","operationId":"list_providers_api_keys_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/keys/platform":{"put":{"tags":["API Keys"],"summary":"Set Platform Key","description":"Create or update the install's stored key for a provider.\n\nThe install's keys are set by a system admin (``require_system_admin``; the local edition's operator\nis one). The key is kept in the install's own workspace (``install_credentials.install_workspace_id``),\nwhichever workspace the admin is working in, as the credential ``{provider}_api``; the install's lane\nreads only its own workspace's rows and rows with no workspace. An update clears the row's expiry. Each\nsave writes an audit row (who, from where, which credential; never the key). 409 when the install has\nno workspace of its own.","operationId":"set_platform_key_api_keys_platform_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformKeyCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/keys/platform/{provider}":{"delete":{"tags":["API Keys"],"summary":"Remove Platform Key","description":"Remove (deactivate) the install's stored key for a provider: every credential the install's lane\ncould read for it (``install_credentials.install_key_rows``: each of its install-key names, in the\ninstall's own workspace or with no workspace), whichever workspace the admin is working in. A system\nadmin's (``require_system_admin``). The provider is the registry's, by its slug; 404 for a provider the\nregistry does not hold, or when the install holds no key for it; 409 when the install has no workspace\nof its own. Each credential removed gets an audit row. The answer says how many were removed.","operationId":"remove_platform_key_api_keys_platform__provider__delete","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/plugins":{"get":{"tags":["Workspace Plugins"],"summary":"List Workspace Plugins","description":"List plugins enabled for a workspace (joined with marketplace_plugins for details).","operationId":"list_workspace_plugins_api_workspaces__workspace_id__plugins_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Workspace Plugins"],"summary":"Enable Plugin","description":"Enable a marketplace plugin for a workspace.","operationId":"enable_plugin_api_workspaces__workspace_id__plugins_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnablePluginBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/plugins/{plugin_id}":{"delete":{"tags":["Workspace Plugins"],"summary":"Disable Plugin","description":"Disable a plugin for a workspace. Also removes agent assignments for this workspace's agents.","operationId":"disable_plugin_api_workspaces__workspace_id__plugins__plugin_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"plugin_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plugin Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/skills":{"get":{"tags":["Workspace Skills"],"summary":"List Workspace Skills","description":"List all skills available to a workspace:\n- Marketplace skills enabled via junction (origin='marketplace', read-only)\n- Workspace-owned skills (origin='workspace', editable — forked or user-created)","operationId":"list_workspace_skills_api_workspaces__workspace_id__skills_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Workspace Skills"],"summary":"Enable Skill","description":"Enable a marketplace skill for a workspace.","operationId":"enable_skill_api_workspaces__workspace_id__skills_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnableSkillBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/skills/available":{"get":{"tags":["Workspace Skills"],"summary":"List Available Skills","description":"List marketplace skills available to enable (workspace_id IS NULL, is_active=True).","operationId":"list_available_skills_api_workspaces__workspace_id__skills_available_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search query","title":"Q"},"description":"Search query"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/skills/{skill_id}":{"delete":{"tags":["Workspace Skills"],"summary":"Disable Skill","description":"Disable a skill for a workspace. Also removes agent assignments.","operationId":"disable_skill_api_workspaces__workspace_id__skills__skill_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"skill_id","in":"path","required":true,"schema":{"type":"integer","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Workspace Skills"],"summary":"Update Workspace Skill","description":"Update a workspace skill's content.\n\nIf the target is a marketplace skill (workspace_id IS NULL), this performs\nfork-on-edit: clones the skill into the workspace, records lineage in\nskill_metadata.forked_from_skill_id, migrates any existing agent_skills\nassignments to the fork, and disables the marketplace junction.\n\nReturns the (possibly new) skill_id of the workspace-owned record.","operationId":"update_workspace_skill_api_workspaces__workspace_id__skills__skill_id__patch","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"skill_id","in":"path","required":true,"schema":{"type":"integer","title":"Skill Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSkillBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/skills/{skill_id}/content":{"get":{"tags":["Workspace Skills"],"summary":"Get Workspace Skill Content","description":"Return the raw SKILL.md content for a workspace skill (forked or enabled marketplace).\nUsed by the editor modal to populate the textarea.","operationId":"get_workspace_skill_content_api_workspaces__workspace_id__skills__skill_id__content_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"skill_id","in":"path","required":true,"schema":{"type":"integer","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/skills/create":{"post":{"tags":["Workspace Skills"],"summary":"Create Workspace Skill","description":"Create a new workspace-owned skill from pasted or uploaded SKILL.md content.\nRuns the security scanner; 422 if blocked.","operationId":"create_workspace_skill_api_workspaces__workspace_id__skills_create_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSkillBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/skills/{skill_id}/owned":{"delete":{"tags":["Workspace Skills"],"summary":"Delete Workspace Owned Skill","description":"Delete a workspace-owned skill (forked or user-created). Refuses to delete\nmarketplace skills — use the existing DELETE /skills/{skill_id} (disable) for those.","operationId":"delete_workspace_owned_skill_api_workspaces__workspace_id__skills__skill_id__owned_delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"skill_id","in":"path","required":true,"schema":{"type":"integer","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/plugins":{"get":{"tags":["Agent Plugins"],"summary":"List Agent Plugins","description":"List plugins assigned to an agent (joined with marketplace_plugins for details).","operationId":"list_agent_plugins_api_agents__agent_id__plugins_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Agent Plugins"],"summary":"Update Agent Plugins","description":"Update plugin assignments for an agent. Replaces existing assignments.","operationId":"update_agent_plugins_api_agents__agent_id__plugins_put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentPluginsBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/assembled-context":{"get":{"tags":["Agent Plugins"],"summary":"Get Assembled Context","description":"Return the fully assembled agent context including persona prompt,\nplugin skills, and tool definitions.  Used by AgentFactory at runtime.","operationId":"get_assembled_context_api_agents__agent_id__assembled_context_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/personas":{"get":{"tags":["Personas"],"summary":"List Personas","description":"List available personas (global + workspace-custom filtered by user's workspace).","operationId":"list_personas_api_personas_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by scope: all, global, workspace","title":"Scope"},"description":"Filter by scope: all, global, workspace"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/personas/{persona_id}":{"get":{"tags":["Personas"],"summary":"Get Persona","description":"Get persona details including full system_prompt.","operationId":"get_persona_api_personas__persona_id__get","parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Persona Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/personas":{"post":{"tags":["Personas"],"summary":"Create Workspace Persona","description":"Create a custom persona for a workspace.","operationId":"create_workspace_persona_api_workspaces__workspace_id__personas_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePersonaBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/personas/{persona_id}":{"put":{"tags":["Personas"],"summary":"Update Workspace Persona","description":"Update a workspace persona. Only workspace-scoped personas can be updated.","operationId":"update_workspace_persona_api_workspaces__workspace_id__personas__persona_id__put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Persona Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePersonaBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Personas"],"summary":"Delete Workspace Persona","description":"Delete a workspace persona. Only workspace-scoped personas can be deleted.","operationId":"delete_workspace_persona_api_workspaces__workspace_id__personas__persona_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Persona Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/persona":{"put":{"tags":["Personas"],"summary":"Set Agent Persona","description":"Set the persona of one of the caller's workspace's agents: a predefined persona,\na custom prompt, or none. Any other agent, a marketplace one included, is a 404:\ninstalls copy a marketplace agent's persona into every installing workspace.","operationId":"set_agent_persona_api_agents__agent_id__persona_put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAgentPersonaBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPersonaOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Personas"],"summary":"Get Agent Persona","description":"Get agent's current persona info.","operationId":"get_agent_persona_api_agents__agent_id__persona_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPersonaOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/generated-images/{image_id}":{"get":{"tags":["Generated Images"],"summary":"Get Generated Image","description":"Fetch a generated image by its UUID (public, unguessable ID).","operationId":"get_generated_image_api_generated_images__image_id__get","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","title":"Image Id"}},{"name":"Range","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/":{"get":{"tags":["notifications"],"summary":"List Notifications","description":"Paginated list of notifications for the current workspace + user.","operationId":"list_notifications_api_notifications__get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications":{"get":{"tags":["notifications"],"summary":"List Notifications","description":"Paginated list of notifications for the current workspace + user.","operationId":"list_notifications_api_notifications_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/unread-count":{"get":{"tags":["notifications"],"summary":"Unread Count","description":"Count of unread, non-dismissed notifications for the current user.","operationId":"unread_count_api_notifications_unread_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadCountResponse"}}}}}}},"/api/notifications/{notification_id}/read":{"post":{"tags":["notifications"],"summary":"Mark Read","description":"Mark a single notification as read (no-op if already read).","operationId":"mark_read_api_notifications__notification_id__read_post","parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Notification Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleSuccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/read-all":{"post":{"tags":["notifications"],"summary":"Mark All Read","description":"Mark every unread notification for this workspace+user as read.","operationId":"mark_all_read_api_notifications_read_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadAllResponse"}}}}}}},"/api/notifications/{notification_id}/dismiss":{"post":{"tags":["notifications"],"summary":"Dismiss","description":"Soft-delete a notification by setting ``dismissed_at = NOW()``.","operationId":"dismiss_api_notifications__notification_id__dismiss_post","parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Notification Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimpleSuccessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notification-preferences/":{"get":{"tags":["notification-preferences"],"summary":"List Preferences","description":"Return merged notification preferences for the current workspace+user.\n\nPRD-266 US-014a: plus an enabled 'push' row for each push switch event that has none\nyet (no row means on), and the push-type map the app's switches read.","operationId":"list_preferences_api_notification_preferences__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceListResponse"}}}}}},"put":{"tags":["notification-preferences"],"summary":"Bulk Update Preferences","description":"Bulk-replace preferences for every event_type in the payload.\n\nFor each unique ``event_type`` in ``payload.preferences`` we delete the\ncurrent user's existing rows for that event_type, then insert the caller's\nown rows. PRD-293 US-113: a workspace event's destination rows replace the\nworkspace's rows (``user_id IS NULL``) instead, and changing them needs\n``workspace:manage``; without it the whole request is refused (403) and\nnothing is written. Rows sent back exactly as stored are no change. Push\nrows are always the caller's own.","operationId":"bulk_update_preferences_api_notification_preferences__put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceBulkUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceBulkUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notification-preferences":{"get":{"tags":["notification-preferences"],"summary":"List Preferences","description":"Return merged notification preferences for the current workspace+user.\n\nPRD-266 US-014a: plus an enabled 'push' row for each push switch event that has none\nyet (no row means on), and the push-type map the app's switches read.","operationId":"list_preferences_api_notification_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceListResponse"}}}}}},"put":{"tags":["notification-preferences"],"summary":"Bulk Update Preferences","description":"Bulk-replace preferences for every event_type in the payload.\n\nFor each unique ``event_type`` in ``payload.preferences`` we delete the\ncurrent user's existing rows for that event_type, then insert the caller's\nown rows. PRD-293 US-113: a workspace event's destination rows replace the\nworkspace's rows (``user_id IS NULL``) instead, and changing them needs\n``workspace:manage``; without it the whole request is refused (403) and\nnothing is written. Rows sent back exactly as stored are no change. Push\nrows are always the caller's own.","operationId":"bulk_update_preferences_api_notification_preferences_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceBulkUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceBulkUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notification-preferences/events":{"get":{"tags":["notification-preferences"],"summary":"List Notification Events","description":"PRD-293 US-113 (D16): the events a person can send somewhere, in groups, and where they can go.\n\nThe events are the dispatcher's own (``core.services.notification_catalogue``). Each destination says\nwhether it delivers in this workspace: an outside one is ``connected`` only when the workspace has a\nchannel the sender can use for it (``connected_platforms``). Each event says whose choice it is\n(``scope``), and ``can_change_workspace`` whether the caller may change a workspace event.","operationId":"list_notification_events_api_notification_preferences_events_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationEventsResponse"}}}}}}},"/api/themes/import":{"post":{"tags":["Themes"],"summary":"Import Theme","description":"Upload a .autotheme (and, optionally, its .sig.json) into this workspace only; returns the\npackage, its scan and the install.","operationId":"import_theme_api_themes_import_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_theme_api_themes_import_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Import Theme Api Themes Import Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes/installed":{"get":{"tags":["themes"],"summary":"List Installed Themes","description":"The workspace's installed themes, each with its opt-in, revocation and drift state.","operationId":"list_installed_themes_api_themes_installed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Installed Themes Api Themes Installed Get"}}}}}}},"/api/themes/active":{"get":{"tags":["themes"],"summary":"Get Active Theme","description":"The theme this member sees: their choice, else the workspace default, else Studio.","operationId":"get_active_theme_api_themes_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Active Theme Api Themes Active Get"}}}}}}},"/api/themes/choice":{"put":{"tags":["themes"],"summary":"Put Theme Choice","description":"Store the member's choice in this workspace and answer the active theme it gives.","operationId":"put_theme_choice_api_themes_choice_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChoiceBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Put Theme Choice Api Themes Choice Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes/installs/{install_id}/opt-in":{"post":{"tags":["themes"],"summary":"Opt In To Theme","description":"Opt the member in to the install's current private package (409 for any other).","operationId":"opt_in_to_theme_api_themes_installs__install_id__opt_in_post","parameters":[{"name":"install_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Install Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__themes_install__PackageBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Opt In To Theme Api Themes Installs  Install Id  Opt In Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes/default":{"put":{"tags":["themes"],"summary":"Put Default Theme","description":"Set or clear the workspace default; an unreviewed theme answers 409 (Q6).","operationId":"put_default_theme_api_themes_default_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Put Default Theme Api Themes Default Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes/installs/{install_id}/compare/{package_id}":{"get":{"tags":["themes"],"summary":"Compare Theme Update","description":"What moving the install to another version changes: versions, files, scan.","operationId":"compare_theme_update_api_themes_installs__install_id__compare__package_id__get","parameters":[{"name":"install_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Install Id"}},{"name":"package_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Package Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Compare Theme Update Api Themes Installs  Install Id  Compare  Package Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes/installs/{install_id}/update":{"post":{"tags":["themes"],"summary":"Update Theme Install","description":"Move the install to a newer package; the old one becomes the rollback target.","operationId":"update_theme_install_api_themes_installs__install_id__update_post","parameters":[{"name":"install_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Install Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__themes_install__PackageBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Theme Install Api Themes Installs  Install Id  Update Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes/installs/{install_id}/rollback":{"post":{"tags":["themes"],"summary":"Rollback Theme Install","description":"Swap the install back to its previous package.","operationId":"rollback_theme_install_api_themes_installs__install_id__rollback_post","parameters":[{"name":"install_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Install Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Rollback Theme Install Api Themes Installs  Install Id  Rollback Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes/installs/{install_id}":{"delete":{"tags":["themes"],"summary":"Uninstall Theme","description":"Soft-uninstall: looks stay, and members who chose it see the workspace default.","operationId":"uninstall_theme_api_themes_installs__install_id__delete","parameters":[{"name":"install_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Install Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Uninstall Theme Api Themes Installs  Install Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes/files/{digest}/{path}":{"get":{"tags":["Themes"],"summary":"Get Theme File","description":"One file of a theme package the caller may load, by the package digest.","operationId":"get_theme_file_api_themes_files__digest___path__get","parameters":[{"name":"digest","in":"path","required":true,"schema":{"type":"string","title":"Digest"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes/boot/{install_id}":{"get":{"tags":["Themes"],"summary":"Get Theme Boot","description":"The install's first-paint data; the base boot when the caller hasn't opted in or it is revoked.","operationId":"get_theme_boot_api_themes_boot__install_id__get","parameters":[{"name":"install_id","in":"path","required":true,"schema":{"type":"string","title":"Install Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes/mobile/{install_id}":{"get":{"tags":["Themes"],"summary":"Get Mobile Theme","description":"The install's theme as data for the phone; ``mobile`` is null when it has none or may not run.","operationId":"get_mobile_theme_api_themes_mobile__install_id__get","parameters":[{"name":"install_id","in":"path","required":true,"schema":{"type":"string","title":"Install Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes/looks/{theme_id}":{"get":{"tags":["themes"],"summary":"Get Theme Looks","description":"The caller's saved looks and active look for ``theme_id``, fitted to its current schema.","operationId":"get_theme_looks_api_themes_looks__theme_id__get","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"string","title":"Theme Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Theme Looks Api Themes Looks  Theme Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["themes"],"summary":"Put Theme Looks","description":"Replace the caller's looks for ``theme_id``: ``{looks: [...], active: {...} | null}``.","operationId":"put_theme_looks_api_themes_looks__theme_id__put","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"string","title":"Theme Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooksUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Put Theme Looks Api Themes Looks  Theme Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes/settings":{"get":{"tags":["themes"],"summary":"Get Theme Settings","description":"The workspace's theme settings, each with its default, and what this caller may do.","operationId":"get_theme_settings_api_themes_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Theme Settings Api Themes Settings Get"}}}}}},"put":{"tags":["themes"],"summary":"Put Theme Settings","description":"Change the workspace's theme settings, all or none, and answer the new settings.","operationId":"put_theme_settings_api_themes_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Put Theme Settings Api Themes Settings Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/themes/submit":{"post":{"tags":["Theme Marketplace"],"summary":"Submit Theme","description":"Submit a .autotheme for Marketplace review; returns the pending submission and its stage verdict.","operationId":"submit_theme_api_marketplace_themes_submit_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_submit_theme_api_marketplace_themes_submit_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Submit Theme Api Marketplace Themes Submit Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/themes/publish":{"post":{"tags":["Theme Marketplace"],"summary":"Publish Theme","description":"Publish a theme version: list it, approve it and store its signature, all or nothing.","operationId":"publish_theme_api_marketplace_themes_publish_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Publish Theme Api Marketplace Themes Publish Post"}}}}}}},"/api/marketplace/themes":{"get":{"tags":["Theme Marketplace"],"summary":"List Theme Listings","description":"Every approved theme, newest compatible version first in each card.","operationId":"list_theme_listings_api_marketplace_themes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Theme Listings Api Marketplace Themes Get"}}}}}}},"/api/marketplace/themes/{listing_id}":{"get":{"tags":["Theme Marketplace"],"summary":"Get Theme Listing","description":"One listing: previews per preset, publisher, version, ``uses`` and the versions map.","operationId":"get_theme_listing_api_marketplace_themes__listing_id__get","parameters":[{"name":"listing_id","in":"path","required":true,"schema":{"type":"string","title":"Listing Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Theme Listing Api Marketplace Themes  Listing Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/themes/{listing_id}/install":{"post":{"tags":["Theme Marketplace"],"summary":"Install Theme Listing","description":"Add an approved theme to this workspace by reference (201), or answer the install it has (200).","operationId":"install_theme_listing_api_marketplace_themes__listing_id__install_post","parameters":[{"name":"listing_id","in":"path","required":true,"schema":{"type":"string","title":"Listing Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InstallBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Install Theme Listing Api Marketplace Themes  Listing Id  Install Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/themes/pending":{"get":{"tags":["Admin Themes"],"summary":"List Pending Themes","description":"Marketplace theme versions waiting for review, oldest first.","operationId":"list_pending_themes_api_admin_themes_pending_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":200,"minimum":1},{"type":"null"}],"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Pending Themes Api Admin Themes Pending Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/themes/{package_id}/report":{"get":{"tags":["Admin Themes"],"summary":"Get Theme Report","description":"One version's scan report, the isolated-job note, its history and its signature request.","operationId":"get_theme_report_api_admin_themes__package_id__report_get","parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Package Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Theme Report Api Admin Themes  Package Id  Report Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/themes/{package_id}/review-package":{"get":{"tags":["Admin Themes"],"summary":"Get Theme Review Package","description":"A 15-minute link to the version's package, rebuilt from its stored files, for the kit's\nisolated review job (``package_url`` and ``expected_digest`` of theme-review.yml, C-03c).","operationId":"get_theme_review_package_api_admin_themes__package_id__review_package_get","parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Package Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Theme Review Package Api Admin Themes  Package Id  Review Package Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/themes/{package_id}/report-note":{"post":{"tags":["Admin Themes"],"summary":"Add Theme Report Note","description":"Store the isolated review job's summary the reviewer pasted (C-02b).","operationId":"add_theme_report_note_api_admin_themes__package_id__report_note_post","parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Package Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportNoteBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Theme Report Note Api Admin Themes  Package Id  Report Note Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/themes/{package_id}/approve":{"post":{"tags":["Admin Themes"],"summary":"Approve Theme","description":"Approve a reviewed version; refuses a blocked or not-run scan; answers the signature request.","operationId":"approve_theme_api_admin_themes__package_id__approve_post","parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Package Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Approve Theme Api Admin Themes  Package Id  Approve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/themes/{package_id}/reject":{"post":{"tags":["Admin Themes"],"summary":"Reject Theme","description":"Reject a pending version with a reason.","operationId":"reject_theme_api_admin_themes__package_id__reject_post","parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Package Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reject Theme Api Admin Themes  Package Id  Reject Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/themes/{package_id}/deactivate":{"post":{"tags":["Admin Themes"],"summary":"Deactivate Theme","description":"Take an approved version off the Marketplace; its digest gets a ``disable`` revocation.","operationId":"deactivate_theme_api_admin_themes__package_id__deactivate_post","parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Package Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Deactivate Theme Api Admin Themes  Package Id  Deactivate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/themes/{package_id}/signature":{"post":{"tags":["Admin Themes"],"summary":"Store Theme Signature","description":"Store the Ed25519 signature the kit's sign workflow returned, once an active Automatos key\nverifies it (``signature_verify``, C-05b); otherwise 400 and nothing is stored.","operationId":"store_theme_signature_api_admin_themes__package_id__signature_post","parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Package Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Store Theme Signature Api Admin Themes  Package Id  Signature Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes/revocations":{"get":{"tags":["Themes"],"summary":"Get Revocation Feed","description":"The feed (200), or 304 when ``If-None-Match`` names its ETag; 404 in the local edition; 503 when\nthe keys file doesn't load or the feed is too large for a local edition to read.","operationId":"get_revocation_feed_api_themes_revocations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/themes/revocations/sync":{"get":{"tags":["Admin Themes"],"summary":"Get Revocation Sync","description":"The sync status: the last attempt, success and error, and the feed's rows held here.","operationId":"get_revocation_sync_api_admin_themes_revocations_sync_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Revocation Sync Api Admin Themes Revocations Sync Get"}}}}}}},"/api/admin/themes/revocations/sync/pull":{"post":{"tags":["Admin Themes"],"summary":"Pull Revocation Feed","description":"Check now: pull the feed once and answer the status, or the plain error the pull recorded. Either\nway the pull writes its ``themes:revocation_pull`` row (the pull stands if that row can't be written).","operationId":"pull_revocation_feed_api_admin_themes_revocations_sync_pull_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Pull Revocation Feed Api Admin Themes Revocations Sync Pull Post"}}}}}}},"/api/admin/themes/revocations":{"get":{"tags":["Admin Themes"],"summary":"List Theme Revocations","description":"Every revocation, live ones first, then the newest, each with its origin.","operationId":"list_theme_revocations_api_admin_themes_revocations_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Theme Revocations Api Admin Themes Revocations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin Themes"],"summary":"Create Theme Revocation","description":"Revoke a digest, or a theme id (optionally a version range of it): 201 with the new row,\nor 200 with the live row that already says the same.","operationId":"create_theme_revocation_api_admin_themes_revocations_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevocationBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Theme Revocation Api Admin Themes Revocations Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/themes/revocations/{revocation_id}/lift":{"post":{"tags":["Admin Themes"],"summary":"Lift Theme Revocation","description":"Lift a revocation written here; a row the hosted feed sent is the feed's to lift (409) while\nrevocation sync works. The lift lands with its ``themes:revocation_lifted`` row, or not at all (503).","operationId":"lift_theme_revocation_api_admin_themes_revocations__revocation_id__lift_post","parameters":[{"name":"revocation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revocation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Lift Theme Revocation Api Admin Themes Revocations  Revocation Id  Lift Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shopify/provision":{"post":{"tags":["Shopify Integration"],"summary":"Provision Workspace","description":"Provision an Automatos workspace for a Shopify store.\n\nThin compat wrapper over the generic vertical-provision flow (PRD-183 S5):\nthe Shopify lifecycle KNOBS (roster, widget defaults, key permissions, site\ntype, allowed origins) live in ``integrations/shopify/provision.py`` behind\nthe ``VerticalProvisioner`` interface. New callers should target\n``POST /api/verticals/shopify/provision`` directly.","operationId":"provision_workspace_api_shopify_provision_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shopify/connect":{"post":{"tags":["Shopify Integration"],"summary":"Connect Shopify Store","description":"Store the Shopify access token for a workspace.\n\nThe 147-scope Admin access token is encrypted at rest before storage\n(application-level Fernet encryption via ``core.credentials.encryption``,\nkeyed by ``CREDENTIAL_ENCRYPTION_KEY``) and saved as ciphertext in\n``workspace.settings.shopify_access_token``. Read it back through\n:func:`_decrypt_secret`. Used by Composio for API calls.","operationId":"connect_shopify_store_api_shopify_connect_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shopify/deactivate":{"post":{"tags":["Shopify Integration"],"summary":"Deactivate Workspace","description":"Deactivate a workspace when a merchant uninstalls.\nSoft-delete — data preserved for potential re-install.","operationId":"deactivate_workspace_api_shopify_deactivate_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeactivateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shopify/sync":{"post":{"tags":["Shopify Integration"],"summary":"Sync Shop Data","description":"Sync shop data changes (shop/update webhook).\nUpdates workspace metadata.","operationId":"sync_shop_data_api_shopify_sync_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shopify/events":{"post":{"tags":["Shopify Integration"],"summary":"Forward Event","description":"Forward Shopify webhook events for agent context enrichment.\n\nCatalog-mutation events (products/*, collections/*, inventory_levels/update)\ntrigger a commerce-graph refresh (F032). The heavy re-sync is debounced,\ncoalesced and already-running-guarded per workspace (PRD-189 S3) and runs\nas a held background task with its own session, so the webhook returns\nimmediately and a burst of N events produces ONE re-sync.","operationId":"forward_event_api_shopify_events_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shopify/sync/products/start":{"post":{"tags":["Shopify Integration"],"summary":"Start Product Sync","description":"HTTP entrypoint for the Shopify catalog sync (PRD-172 F003 authed).\n\nThe workspace-scoped auth dependency proves the tenant; the effective\nworkspace is derived from ``ctx`` (never a guessed query param). The heavy\nlifting lives in ``_product_sync_impl`` so the internal auto-trigger\n(``api/tools.py`` on SHOPIFY going active) can call it directly with an\nalready-trusted workspace_id.","operationId":"start_product_sync_api_shopify_sync_products_start_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shopify/sync/status":{"get":{"tags":["Shopify Integration"],"summary":"Get Product Sync Status","description":"Return the current product_sync state stored on the workspace.\n\nPRD-172 F003: scoped to the authenticated workspace — a guessed UUID can no\nlonger read another tenant's sync state.","operationId":"get_product_sync_status_api_shopify_sync_status_get","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shopify/sync/orders/start":{"post":{"tags":["Shopify Integration"],"summary":"Start Orders Sync","description":"HTTP entrypoint for the Shopify orders sync (PRD-172 F003 authed).\n\nProves the tenant via the shared auth dependency and derives the workspace\nfrom ``ctx`` before running the (costly, graph-mutating) sync.","operationId":"start_orders_sync_api_shopify_sync_orders_start_post","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Days"}},{"name":"min_support","in":"query","required":false,"schema":{"type":"integer","default":2,"title":"Min Support"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shopify/sync/orders/status":{"get":{"tags":["Shopify Integration"],"summary":"Get Orders Sync Status","description":"Return the current orders_sync state stored on the workspace.\n\nPRD-172 F003: scoped to the authenticated workspace.","operationId":"get_orders_sync_status_api_shopify_sync_orders_status_get","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/verticals/{vertical}/provision":{"post":{"tags":["Verticals"],"summary":"Provision Vertical Workspace","description":"Provision a workspace for ``vertical`` via the generic provisioner.\n\nIdempotent (an existing active workspace for ``external_id`` is returned\nwithout re-seeding). Returns 404 for a vertical with no registered\nprovisioner.","operationId":"provision_vertical_workspace_api_verticals__vertical__provision_post","parameters":[{"name":"vertical","in":"path","required":true,"schema":{"type":"string","title":"Vertical"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerticalProvisionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerticalProvisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/verticals/{vertical}/provision/domains":{"patch":{"tags":["Verticals"],"summary":"Update Vertical Key Domains","description":"Re-sync the origin allowlist on the workspace's active public widget keys.\n\nPublic keys are origin-locked; when a tenant's storefront hostname changes\n(e.g. a BudStacks custom-domain move) the allowlist must follow or the\nwidget 403s on the new host. Replaces ``allowed_domains`` on every ACTIVE\npublic key of the workspace resolved from ``external_id`` — inactive and\nserver keys are untouched. Domains are normalized through the vertical's\nown ``allowed_domains`` rule so the same validation applies as at\nprovision time. 404 when no workspace matches; 422 when the vertical's\nrules reject the list.","operationId":"update_vertical_key_domains_api_verticals__vertical__provision_domains_patch","parameters":[{"name":"vertical","in":"path","required":true,"schema":{"type":"string","title":"Vertical"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerticalDomainsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Vertical Key Domains Api Verticals  Vertical  Provision Domains Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/verticals/{vertical}/gdpr/erase-subject":{"post":{"tags":["Verticals"],"summary":"Gdpr Erase Subject","description":"Erase a single data subject within the workspace resolved from ``external_id``.\n\nBacks Shopify ``customers/redact``. Delegates to\n``gdpr_service.erase_data_subject`` (audited; stores lacking a subject tag are\nreported in ``gaps``). 404 if no active workspace matches the external id.","operationId":"gdpr_erase_subject_api_verticals__vertical__gdpr_erase_subject_post","parameters":[{"name":"vertical","in":"path","required":true,"schema":{"type":"string","title":"Vertical"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerticalGdprEraseSubjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Gdpr Erase Subject Api Verticals  Vertical  Gdpr Erase Subject Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/verticals/{vertical}/gdpr/erase":{"post":{"tags":["Verticals"],"summary":"Gdpr Erase Workspace","description":"Erase the whole workspace resolved from ``external_id`` (irreversible cascade).\n\nBacks Shopify ``shop/redact`` (fired 48h after uninstall). The confirmation\necho the user-facing endpoint requires is unnecessary here: the caller cannot\nname a workspace id at all — it is resolved server-side from the shop domain,\nand a non-matching shop 404s rather than erasing anything. Delegates to\n``gdpr_service.erase_workspace`` (audited). #1442: the uninstalled shop's\nworkspaces are found though no longer active (``_workspaces_to_erase``), and an\nincomplete erasure answers 503 so the retry finishes it.","operationId":"gdpr_erase_workspace_api_verticals__vertical__gdpr_erase_post","parameters":[{"name":"vertical","in":"path","required":true,"schema":{"type":"string","title":"Vertical"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerticalGdprEraseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Gdpr Erase Workspace Api Verticals  Vertical  Gdpr Erase Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/verticals/{vertical}/gdpr/export":{"get":{"tags":["Verticals"],"summary":"Gdpr Export Workspace","description":"Export the workspace resolved from ``external_id`` as a portable JSON bundle.\n\nBacks Shopify ``customers/data_request``. ``customer_id`` is accepted for\nparity with the Shopify payload and audit provenance; the export is\nworkspace-scoped (the platform has no data-subject tag on the derived stores —\nthe same gap the subject-level erasure documents). Delegates to\n``gdpr_service.export_workspace`` (audited). 404 if no workspace matches.","operationId":"gdpr_export_workspace_api_verticals__vertical__gdpr_export_get","parameters":[{"name":"vertical","in":"path","required":true,"schema":{"type":"string","title":"Vertical"}},{"name":"external_id","in":"query","required":true,"schema":{"type":"string","title":"External Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sites":{"get":{"tags":["sites"],"summary":"List Sites Route","operationId":"list_sites_route_api_sites_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["sites"],"summary":"Create Site Route","operationId":"create_site_route_api_sites_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSiteRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sites/{site_id}":{"get":{"tags":["sites"],"summary":"Get Site Route","operationId":"get_site_route_api_sites__site_id__get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Site Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["sites"],"summary":"Patch Site Meta Route","operationId":"patch_site_meta_route_api_sites__site_id__patch","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Site Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSiteMetaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sites/{site_id}/settings":{"patch":{"tags":["sites"],"summary":"Patch Site Settings Route","operationId":"patch_site_settings_route_api_sites__site_id__settings_patch","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Site Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSiteSettingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sites/{site_id}/callback/test":{"post":{"tags":["sites"],"summary":"Send Callback Test Route","operationId":"send_callback_test_route_api_sites__site_id__callback_test_post","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Site Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/composio/apps":{"get":{"tags":["Composio"],"summary":"List Available Apps","description":"List all available Composio apps.\n\nReturns apps with connection status for the current workspace.","operationId":"list_available_apps_api_composio_apps_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppResponse"},"title":"Response List Available Apps Api Composio Apps Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/composio/apps/{app_name}/actions":{"get":{"tags":["Composio"],"summary":"List App Actions","description":"List all actions available for an app.\n\nIncludes enabled status for each action based on agent configuration.","operationId":"list_app_actions_api_composio_apps__app_name__actions_get","parameters":[{"name":"app_name","in":"path","required":true,"schema":{"type":"string","title":"App Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActionResponse"},"title":"Response List App Actions Api Composio Apps  App Name  Actions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/composio/connections":{"get":{"tags":["Composio"],"summary":"List Connections","description":"The workspace's connected apps (PRD-286 R7): each pending row is settled from Composio's\nrecord first (F258), so a sign-in whose callback was missed is listed once it is ACTIVE,\nthen only ``active`` ones are listed. A plain ``def`` (F257): those Composio calls run in\nFastAPI's threadpool, never on the event loop.","operationId":"list_connections_api_composio_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConnectionResponse"},"type":"array","title":"Response List Connections Api Composio Connections Get"}}}}}}},"/api/composio/linkedin/test-upload-init":{"get":{"tags":["Composio"],"summary":"Test Linkedin Upload Init","description":"Smoke test: call LinkedIn initializeUpload directly (no Composio).\nVerifies the CALLER'S workspace credential + OAuth token + API version work\n(PRD-251 S0.4: never another workspace's credential).","operationId":"test_linkedin_upload_init_api_composio_linkedin_test_upload_init_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/composio/connect/{app_name}":{"post":{"tags":["Composio"],"summary":"Initiate Connection","description":"Start connecting an app (PRD-286 R3, R4); ``api.composio_connect`` says how. An empty\n``redirect_url`` means connected without a sign-in. A plain ``def`` (F257): the Composio\nSDK calls are synchronous, so FastAPI runs the route in its threadpool.","operationId":"initiate_connection_api_composio_connect__app_name__post","parameters":[{"name":"app_name","in":"path","required":true,"schema":{"type":"string","title":"App Name"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateConnectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/composio/connect/{app_name}/callback":{"post":{"tags":["Composio"],"summary":"Connection Callback","description":"The sign-in window came back (PRD-286 R1).\n\nThe row settles from Composio's own record, never from the redirect's query: an\nACTIVE account is connected, a sign-in still under way stays ``pending``, an ended\none is offered Connect again. ``outcome`` (``connected``, ``pending`` or ``ended``) says\nwhich, in words of its own, not the row's. A plain ``def`` (F257): a synchronous SDK call.","operationId":"connection_callback_api_composio_connect__app_name__callback_post","parameters":[{"name":"app_name","in":"path","required":true,"schema":{"type":"string","title":"App Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/composio/connections/{app_name}":{"delete":{"tags":["Composio"],"summary":"Disconnect App","description":"Disconnect an app (PRD-286 R5); ``api.composio_connect.disconnect_workspace_app`` says how,\nand Auto's ``platform_disconnect_app`` goes the same way. 503 when Composio cannot remove it,\n404 when it was not connected. The answer stays ``{\"status\", \"app_name\"}``.","operationId":"disconnect_app_api_composio_connections__app_name__delete","parameters":[{"name":"app_name","in":"path","required":true,"schema":{"type":"string","title":"App Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/composio/webhook":{"post":{"tags":["Composio"],"summary":"Handle Webhook","description":"Handle incoming Composio webhook events.\n\nSupports both V2 (legacy) and V3 payload formats:\n  V2: {\"trigger_name\": ..., \"entity_id\": ..., \"event_data\": {...}}\n  V3: {\"type\": ..., \"data\": {...}, \"timestamp\": ..., \"log_id\": ...}\n       + composio.trigger.message wrapper","operationId":"handle_webhook_api_composio_webhook_post","parameters":[{"name":"x-composio-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Composio-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/composio/triggers/subscribe":{"post":{"tags":["Composio"],"summary":"Subscribe To Trigger","description":"Subscribe to a Composio trigger.","operationId":"subscribe_to_trigger_api_composio_triggers_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerSubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/composio/triggers":{"get":{"tags":["Composio"],"summary":"List Trigger Subscriptions","description":"List all trigger subscriptions for the workspace.","operationId":"list_trigger_subscriptions_api_composio_triggers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/composio/triggers/{subscription_id}":{"delete":{"tags":["Composio"],"summary":"Unsubscribe Trigger","description":"Unsubscribe from one of this workspace's triggers. It is found among the workspace's own\nentity's rows only: any other answers 404 as one that does not exist, and Composio is not called.","operationId":"unsubscribe_trigger_api_composio_triggers__subscription_id__delete","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Unsubscribe Trigger Api Composio Triggers  Subscription Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/composio/agents/{agent_id}/apps/{app_name}/features":{"get":{"tags":["Composio"],"summary":"Get Agent App Features","description":"The app's actions, each with whether this agent may use it (all of them until any is set).","operationId":"get_agent_app_features_api_composio_agents__agent_id__apps__app_name__features_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"app_name","in":"path","required":true,"schema":{"type":"string","title":"App Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActionResponse"},"title":"Response Get Agent App Features Api Composio Agents  Agent Id  Apps  App Name  Features Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Composio"],"summary":"Update Agent App Features","description":"Set the named actions on or off for one of the caller's agents.","operationId":"update_agent_app_features_api_composio_agents__agent_id__apps__app_name__features_put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"app_name","in":"path","required":true,"schema":{"type":"string","title":"App Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchFeatureToggleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Agent App Features Api Composio Agents  Agent Id  Apps  App Name  Features Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/composio/agents/{agent_id}/apps/{app_name}/enable-all":{"post":{"tags":["Composio"],"summary":"Enable All Features","description":"Switch on every action of the app for one of the caller's agents.","operationId":"enable_all_features_api_composio_agents__agent_id__apps__app_name__enable_all_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"app_name","in":"path","required":true,"schema":{"type":"string","title":"App Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Enable All Features Api Composio Agents  Agent Id  Apps  App Name  Enable All Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/composio/agents/{agent_id}/apps/{app_name}/disable-all":{"post":{"tags":["Composio"],"summary":"Disable All Features","description":"Switch off every action of the app for one of the caller's agents.","operationId":"disable_all_features_api_composio_agents__agent_id__apps__app_name__disable_all_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"app_name","in":"path","required":true,"schema":{"type":"string","title":"App Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Disable All Features Api Composio Agents  Agent Id  Apps  App Name  Disable All Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cloud-documents/connections":{"get":{"tags":["cloud-documents"],"summary":"List Connections","description":"List all connected cloud storage providers for this workspace.\n\nAuto-discovers file storage tools by checking Composio categories:\n- document & file management\n- storage\n- cloud storage\n- productivity\n\nReturns ONLY tools that can store/sync files (Google Drive, Dropbox, OneDrive, Box, etc.)","operationId":"list_connections_api_cloud_documents_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CloudConnectionResponse"},"type":"array","title":"Response List Connections Api Cloud Documents Connections Get"}}}}}}},"/api/cloud-documents/connections/{connection_id}/folders":{"get":{"tags":["cloud-documents"],"summary":"List Folders","description":"List folders at a given path in cloud storage (lazy-load for tree UI).","operationId":"list_folders_api_cloud_documents_connections__connection_id__folders_get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}},{"name":"path","in":"query","required":false,"schema":{"type":"string","description":"Folder path to list","default":"/","title":"Path"},"description":"Folder path to list"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FolderResponse"},"title":"Response List Folders Api Cloud Documents Connections  Connection Id  Folders Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cloud-documents/connections/{connection_id}/files":{"get":{"tags":["cloud-documents"],"summary":"List Files","description":"List files at a given path with sync status from database.","operationId":"list_files_api_cloud_documents_connections__connection_id__files_get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}},{"name":"path","in":"query","required":false,"schema":{"type":"string","description":"Folder path to list files","default":"/","title":"Path"},"description":"Folder path to list files"},{"name":"recursive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Recursive"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CloudFileResponse"},"title":"Response List Files Api Cloud Documents Connections  Connection Id  Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cloud-documents/connections/{connection_id}/select-folder":{"post":{"tags":["cloud-documents"],"summary":"Select Folder","description":"Set the root sync folder for a cloud storage connection.","operationId":"select_folder_api_cloud_documents_connections__connection_id__select_folder_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectFolderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectFolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cloud-documents/connections/{connection_id}/sync":{"post":{"tags":["cloud-documents"],"summary":"Trigger Sync","description":"Manually trigger a sync for a cloud storage connection.","operationId":"trigger_sync_api_cloud_documents_connections__connection_id__sync_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cloud-documents/sync-jobs/{job_id}":{"get":{"tags":["cloud-documents"],"summary":"Get Sync Job","description":"Get status and results of a sync job.","operationId":"get_sync_job_api_cloud_documents_sync_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cloud-documents/connections/{connection_id}/sync-status":{"get":{"tags":["cloud-documents"],"summary":"Get Sync Status","description":"Get current sync summary for a connection.","operationId":"get_sync_status_api_cloud_documents_connections__connection_id__sync_status_get","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cloud-documents/connections/{connection_id}":{"delete":{"tags":["cloud-documents"],"summary":"Disconnect Connection","description":"Disconnect a cloud storage provider. Optionally delete vectors.","operationId":"disconnect_connection_api_cloud_documents_connections__connection_id__delete","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"integer","title":"Connection Id"}},{"name":"delete_vectors","in":"query","required":false,"schema":{"type":"boolean","description":"Delete all S3 vectors for this connection","default":false,"title":"Delete Vectors"},"description":"Delete all S3 vectors for this connection"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cloud-documents/rag/query":{"post":{"tags":["cloud-documents"],"summary":"Cloud Rag Query","description":"Query cloud documents using RAG across all connected storage providers.","operationId":"cloud_rag_query_api_cloud_documents_rag_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RAGQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RAGQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompts":{"get":{"tags":["Admin Prompts"],"summary":"List Prompts","description":"List all system prompts, optionally filtered by category or search term.","operationId":"list_prompts_api_admin_prompts_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PromptResponse"},"title":"Response List Prompts Api Admin Prompts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompts/categories":{"get":{"tags":["Admin Prompts"],"summary":"List Categories","description":"List distinct categories with counts.","operationId":"list_categories_api_admin_prompts_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/prompts/{prompt_id}":{"get":{"tags":["Admin Prompts"],"summary":"Get Prompt","description":"One prompt, with its live version and the names the code fills in.","operationId":"get_prompt_api_admin_prompts__prompt_id__get","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompts/{prompt_id}/versions":{"get":{"tags":["Admin Prompts"],"summary":"List Versions","description":"List all versions for a prompt (newest first), each with its latest test run; 404 for no such prompt.","operationId":"list_versions_api_admin_prompts__prompt_id__versions_get","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PromptVersionResponse"},"title":"Response List Versions Api Admin Prompts  Prompt Id  Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin Prompts"],"summary":"Create Version","description":"Save a new draft. Saving never makes a version live; a text that does not fit is refused (422).","operationId":"create_version_api_admin_prompts__prompt_id__versions_post","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompts/{prompt_id}/compare":{"get":{"tags":["Admin Prompts"],"summary":"Compare Versions","description":"Two versions' texts and the lines that differ between them.","operationId":"compare_versions_api_admin_prompts__prompt_id__compare_get","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}},{"name":"base","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The version compared from; the live one by default","title":"Base"},"description":"The version compared from; the live one by default"},{"name":"other","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The version compared to; the newest draft by default","title":"Other"},"description":"The version compared to; the newest draft by default"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptCompareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompts/{prompt_id}/changes":{"get":{"tags":["Admin Prompts"],"summary":"List Changes","description":"What was made live, when, by whom and why: newest first.","operationId":"list_changes_api_admin_prompts__prompt_id__changes_get","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PromptChangeResponse"},"title":"Response List Changes Api Admin Prompts  Prompt Id  Changes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompts/{prompt_id}/versions/{version_id}/activate":{"post":{"tags":["Admin Prompts"],"summary":"Activate Version","description":"Make live: a draft, checked again, with a reason, recorded and audited, or nothing changes. The answer\ncarries the latest test run on that version; with no finished one it still goes live, recorded as made\nlive without a test (D18).","operationId":"activate_version_api_admin_prompts__prompt_id__versions__version_id__activate_post","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptReason"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompts/{prompt_id}/rollback":{"post":{"tags":["Admin Prompts"],"summary":"Rollback Version","description":"Roll back to any earlier (archived) version, with a reason, recorded and audited.","operationId":"rollback_version_api_admin_prompts__prompt_id__rollback_post","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRollback"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompts/{prompt_id}/reset":{"post":{"tags":["Admin Prompts"],"summary":"Reset Prompt","description":"Reset to default: the code's text as a new version, made live with a reason.","operationId":"reset_prompt_api_admin_prompts__prompt_id__reset_post","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptReason"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompts/{prompt_id}/versions/{version_id}":{"delete":{"tags":["Admin Prompts"],"summary":"Delete Draft","description":"Delete a draft. Live and archived versions are history and stay (409).","operationId":"delete_draft_api_admin_prompts__prompt_id__versions__version_id__delete","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompts/{prompt_id}/cases":{"get":{"tags":["Admin Prompts"],"summary":"List Cases","description":"The prompt's test cases, oldest first.","operationId":"list_cases_api_admin_prompts__prompt_id__cases_get","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PromptCaseResponse"},"title":"Response List Cases Api Admin Prompts  Prompt Id  Cases Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin Prompts"],"summary":"Add Case","description":"Add a case. An input name the prompt does not take is refused (422); a name in use, 409.","operationId":"add_case_api_admin_prompts__prompt_id__cases_post","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptCaseBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptCaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompts/{prompt_id}/cases/{case_id}":{"put":{"tags":["Admin Prompts"],"summary":"Edit Case","description":"Replace a case with the body, starter cases included; checked as when it is added.","operationId":"edit_case_api_admin_prompts__prompt_id__cases__case_id__put","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}},{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptCaseBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptCaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Prompts"],"summary":"Delete Case","description":"Delete a case. A starter case stays deleted: the seed never writes it again.","operationId":"delete_case_api_admin_prompts__prompt_id__cases__case_id__delete","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}},{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompts/{prompt_id}/runs/estimate":{"get":{"tags":["Admin Prompts"],"summary":"Estimate Run","description":"The cases, the model calls and the models a run would use, and its cost when stored usage gives one.","operationId":"estimate_run_api_admin_prompts__prompt_id__runs_estimate_get","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}},{"name":"version_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"The draft a run would test","title":"Version Id"},"description":"The draft a run would test"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRunEstimate"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompts/{prompt_id}/runs":{"post":{"tags":["Admin Prompts"],"summary":"Start Run","description":"Start testing a draft against the live version; it runs in the background (422 or 409 when it cannot).","operationId":"start_run_api_admin_prompts__prompt_id__runs_post","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRunStart"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRunSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin Prompts"],"summary":"List Runs","description":"The prompt's runs, newest first, without their per-case results.","operationId":"list_runs_api_admin_prompts__prompt_id__runs_get","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PromptRunSummary"},"title":"Response List Runs Api Admin Prompts  Prompt Id  Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompts/{prompt_id}/runs/{run_id}":{"get":{"tags":["Admin Prompts"],"summary":"Read Run","description":"One run: its state, totals and cost, and each case's two answers and checks.","operationId":"read_run_api_admin_prompts__prompt_id__runs__run_id__get","parameters":[{"name":"prompt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Prompt Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bug-reports/":{"post":{"tags":["Bug Reports"],"summary":"Create Bug Report","description":"Submit a bug report that creates a Jira ticket via Composio.\n\nRequires a connected Jira integration in the workspace.","operationId":"create_bug_report_api_bug_reports__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BugReportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BugReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/emails":{"get":{"tags":["Widget Emails"],"summary":"List Emails","description":"List emails from the connected Gmail or Outlook account via Composio.","operationId":"list_emails_api_emails_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination token from previous response","title":"Page Token"},"description":"Pagination token from previous response"},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search filter (e.g. 'is:unread')","title":"Query"},"description":"Search filter (e.g. 'is:unread')"},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Label/folder filter (e.g. 'INBOX')","title":"Label"},"description":"Label/folder filter (e.g. 'INBOX')"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Widget Emails"],"summary":"Send Email","description":"Send a new email via the connected mail provider.\n\nPRD-192 S5: an external side-effect on the spine — the user's click IS the\napproval (human-direct rule), budget admission + the audit row still apply.","operationId":"send_email_api_emails_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/emails/attachments/gmail/{message_id}/{attachment_id}":{"get":{"tags":["Widget Emails"],"summary":"Download Gmail Attachment","description":"One attachment of a Gmail message in the caller's workspace, as a download.\n\nGmail attachments carry no URL: the bytes come from Composio's Gmail\nget-attachment action on the workspace's own connection, through the spine\nlike every widget email call. Only Gmail-shaped ids are taken; the response\nis always ``Content-Disposition: attachment`` with a sanitised name, a safe\nContent-Type and the size cap (``api/widget_email_attachment.py``).","operationId":"download_gmail_attachment_api_emails_attachments_gmail__message_id___attachment_id__get","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","title":"Attachment Id"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"description":"The name to save the file under","title":"Filename"},"description":"The name to save the file under"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/emails/{email_id}":{"get":{"tags":["Widget Emails"],"summary":"Get Email","description":"Return a single email by its provider ID.","operationId":"get_email_api_emails__email_id__get","parameters":[{"name":"email_id","in":"path","required":true,"schema":{"type":"string","title":"Email Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/emails/{email_id}/reply":{"post":{"tags":["Widget Emails"],"summary":"Reply To Email","description":"Reply to an existing email thread.\n\nPRD-192 S5: an external side-effect on the spine — human-direct rule\napplies (the click is the approval); budget + audit still fire.","operationId":"reply_to_email_api_emails__email_id__reply_post","parameters":[{"name":"email_id","in":"path","required":true,"schema":{"type":"string","title":"Email Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/api-keys":{"get":{"tags":["API Keys"],"summary":"List Api Keys","description":"List all SDK API keys for the workspace (keys are masked).","operationId":"list_api_keys_api_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyListItem"},"type":"array","title":"Response List Api Keys Api Api Keys Get"}}}}}},"post":{"tags":["API Keys"],"summary":"Create Api Key","description":"Create a new SDK API key for the workspace. The full key is returned only once.","operationId":"create_api_key_api_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/api-keys/{key_id}":{"delete":{"tags":["API Keys"],"summary":"Revoke Api Key","description":"Revoke (deactivate) an SDK API key. A module's key is 409: switching its module off revokes it.","operationId":"revoke_api_key_api_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["API Keys"],"summary":"Update Api Key Model List","description":"PRD-287 US-408: replace a server key's model allow-list (null clears it). Gated as creating a key is: the\nlist widens what a standing credential may ask for. Another workspace's key, a revoked key and an unknown id\nare the same 404; a key that is not a server key is 422; a module's key is 409. Nothing else on the key changes.","operationId":"update_api_key_model_list_api_api_keys__key_id__patch","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyModelListUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyListItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/health":{"get":{"tags":["Widget API"],"summary":"Widget Health","operationId":"widget_health_api_widgets_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/widgets/auth":{"post":{"tags":["Widget API","Widget Auth"],"summary":"Exchange Session Token","description":"Exchange a server API key for a short-lived JWT session token.","operationId":"exchange_session_token_api_widgets_auth_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/config":{"get":{"tags":["Widget API","Widget Config"],"summary":"Get Widget Config","description":"Return the public widget config for the authenticated workspace.\n\nWorks for both public keys (raw API key) and server-key JWTs since both\nroute through ``widget_auth``. The config always carries ``ai_disclosure``.\nA plain ``def``: the reads are synchronous, so FastAPI runs it in its\nthreadpool rather than on the event loop.","operationId":"get_widget_config_api_widgets_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetConfigResponse"}}}}}}},"/api/widgets/chat":{"post":{"tags":["Widget API","Widget Chat"],"summary":"Widget Chat","description":"Send a message and receive a streaming SSE response.\n\nThe endpoint creates (or continues) a conversation scoped to the\nauthenticated workspace and streams back chunks using Server-Sent\nEvents.\n\nSSE event types emitted:\n- ``ai_disclosure`` — always first, before any token: the AI notice\n  (PRD-264 EUAI-02a), ``{\"type\": \"ai_disclosure\", \"badge\", \"line\", \"locale\"}``\n- ``message``    — text delta from the assistant, ``\"ai_generated\": true``\n- ``tool-start`` — a tool invocation is beginning\n- ``tool-end``   — a tool invocation finished\n- ``open-callback-form`` — the agent asked the widget to open its callback form\n- ``error``      — the stream failed\n- ``done``       — stream is complete","operationId":"widget_chat_api_widgets_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/chat/{conversation_id}":{"get":{"tags":["Widget API","Widget Chat"],"summary":"Widget Chat History","description":"Return the message history for a conversation this key started.","operationId":"widget_chat_history_api_widgets_chat__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WidgetMessageOut"},"title":"Response Widget Chat History Api Widgets Chat  Conversation Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/api/widget/documents/search":{"post":{"tags":["Widget API","Widget Documents"],"summary":"Search Documents","description":"Semantic (vector) search over the workspace knowledge base.\n\nScoped to the widget's workspace and — when the key is team-locked — its team,\nvia the PRD-157 retrieval path. Results are grouped by document (best chunk\nper document), so one row per surfaced document.","operationId":"search_documents_api_widgets_api_widget_documents_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/api/widget/documents/{document_id}":{"get":{"tags":["Widget API","Widget Documents"],"summary":"Get Document","description":"Retrieve a single document by ID, in the widget's workspace and, when the key is\nteam-locked, its team (as the search is): a document outside them is 404, the same\nanswer as one that does not exist.\n\nContent is reassembled from ``document_chunks`` (in ``chunk_index`` order),\nsince ``documents`` has no content column.","operationId":"get_document_api_widgets_api_widget_documents__document_id__get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/data/query":{"post":{"tags":["Widget API","Widget Data"],"summary":"Nl Query","description":"Translate a natural language question into SQL, execute it, and return\nthe results along with a human-readable summary.","operationId":"nl_query_api_widgets_data_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NLQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NLQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/blog/posts":{"get":{"tags":["Widget API","Widget Blog"],"summary":"List Published Posts","description":"List published blog posts for a workspace.","operationId":"list_published_posts_api_widgets_blog_posts_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Per Page"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Workspace ID (deprecated — use Authorization Bearer ak_pub_* key instead)","title":"Workspace Id"},"description":"Workspace ID (deprecated — use Authorization Bearer ak_pub_* key instead)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/blog/posts/{slug}":{"get":{"tags":["Widget API","Widget Blog"],"summary":"Get Published Post","description":"Get a single published post by slug with HTML content.","operationId":"get_published_post_api_widgets_blog_posts__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Workspace ID (deprecated — use Authorization Bearer ak_pub_* key instead)","title":"Workspace Id"},"description":"Workspace ID (deprecated — use Authorization Bearer ak_pub_* key instead)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/blog/categories":{"get":{"tags":["Widget API","Widget Blog"],"summary":"List Categories","description":"List categories with post counts for published posts.","operationId":"list_categories_api_widgets_blog_categories_get","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Workspace ID (deprecated — use Authorization Bearer ak_pub_* key instead)","title":"Workspace Id"},"description":"Workspace ID (deprecated — use Authorization Bearer ak_pub_* key instead)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/blog/tags":{"get":{"tags":["Widget API","Widget Blog"],"summary":"List Tags","description":"List tags with post counts for published posts.","operationId":"list_tags_api_widgets_blog_tags_get","parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Workspace ID (deprecated — use Authorization Bearer ak_pub_* key instead)","title":"Workspace Id"},"description":"Workspace ID (deprecated — use Authorization Bearer ak_pub_* key instead)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/docs/search":{"post":{"tags":["Widget API","Widget Docs"],"summary":"Docs Search","description":"Search documents filtered by team_access.","operationId":"docs_search_api_widgets_docs_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/docs/{document_id}":{"get":{"tags":["Widget API","Widget Docs"],"summary":"Docs Detail","description":"Retrieve a single document, 404 if team-blocked.","operationId":"docs_detail_api_widgets_docs__document_id__get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}},{"name":"team","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Team filter","title":"Team"},"description":"Team filter"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/docs/categories":{"get":{"tags":["Widget API","Widget Docs"],"summary":"Docs Categories","description":"Return distinct tags from team-scoped documents.","operationId":"docs_categories_api_widgets_docs_categories_get","parameters":[{"name":"team","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Team filter","title":"Team"},"description":"Team filter"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocsCategoryItem"},"title":"Response Docs Categories Api Widgets Docs Categories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/callback":{"post":{"tags":["Widget API","Widget Callback"],"summary":"Submit Callback","description":"Accept a callback request from the storefront widget.\n\nReturns 202 + SLA phrase the widget shows to the shopper.\nDestination delivery happens asynchronously (Phase 6).","operationId":"submit_callback_api_widgets_callback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackAccepted"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widget-marketplace/widgets":{"get":{"tags":["Widget Marketplace"],"summary":"Browse Widgets","description":"Browse and search published marketplace widgets.","operationId":"browse_widgets_api_widget_marketplace_widgets_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search name, display_name, description","title":"Q"},"description":"Search name, display_name, description"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"pricing","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"free | one_time | subscription","title":"Pricing"},"description":"free | one_time | subscription"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"popular | newest | rating","default":"popular","title":"Sort"},"description":"popular | newest | rating"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Widget Marketplace"],"summary":"Create Widget","description":"Create a new widget in draft status.","operationId":"create_widget_api_widget_marketplace_widgets_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWidgetRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widget-marketplace/widgets/{widget_id}":{"get":{"tags":["Widget Marketplace"],"summary":"Get Widget Detail","description":"Full widget detail including readme, screenshots, changelog.","operationId":"get_widget_detail_api_widget_marketplace_widgets__widget_id__get","parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","title":"Widget Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Widget Marketplace"],"summary":"Update Widget","description":"Update a widget. Must be owner. Only allowed in draft or published status.","operationId":"update_widget_api_widget_marketplace_widgets__widget_id__put","parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","title":"Widget Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWidgetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widget-marketplace/categories":{"get":{"tags":["Widget Marketplace"],"summary":"List Categories","description":"List distinct categories from published widgets with counts.","operationId":"list_categories_api_widget_marketplace_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/api__widget_marketplace__CategoryOut"},"type":"array","title":"Response List Categories Api Widget Marketplace Categories Get"}}}}}}},"/api/widget-marketplace/featured":{"get":{"tags":["Widget Marketplace"],"summary":"Featured Widgets","description":"Top 8 published widgets by install count.","operationId":"featured_widgets_api_widget_marketplace_featured_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WidgetSummaryOut"},"type":"array","title":"Response Featured Widgets Api Widget Marketplace Featured Get"}}}}}}},"/api/widget-marketplace/widgets/{widget_id}/install":{"post":{"tags":["Widget Marketplace"],"summary":"Install Widget","description":"Install a published widget into the current workspace.","operationId":"install_widget_api_widget_marketplace_widgets__widget_id__install_post","parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","title":"Widget Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Widget Marketplace"],"summary":"Uninstall Widget","description":"Uninstall a widget from the current workspace.","operationId":"uninstall_widget_api_widget_marketplace_widgets__widget_id__install_delete","parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","title":"Widget Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widget-marketplace/installed":{"get":{"tags":["Widget Marketplace"],"summary":"List Installed Widgets","description":"List widgets installed in the current workspace.","operationId":"list_installed_widgets_api_widget_marketplace_installed_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InstallationOut"},"type":"array","title":"Response List Installed Widgets Api Widget Marketplace Installed Get"}}}}}}},"/api/widget-marketplace/widgets/{widget_id}/reviews":{"get":{"tags":["Widget Marketplace"],"summary":"List Reviews","description":"List reviews for a widget, newest first.","operationId":"list_reviews_api_widget_marketplace_widgets__widget_id__reviews_get","parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","title":"Widget Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Widget Marketplace"],"summary":"Create Review","description":"Create a review for a widget. One review per user per widget.","operationId":"create_review_api_widget_marketplace_widgets__widget_id__reviews_post","parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","title":"Widget Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReviewRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widget-marketplace/reviews/{review_id}":{"put":{"tags":["Widget Marketplace"],"summary":"Update Review","description":"Update your own review.","operationId":"update_review_api_widget_marketplace_reviews__review_id__put","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","title":"Review Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Widget Marketplace"],"summary":"Delete Review","description":"Delete your own review.","operationId":"delete_review_api_widget_marketplace_reviews__review_id__delete","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widget-marketplace/widgets/{widget_id}/submit":{"post":{"tags":["Widget Marketplace"],"summary":"Submit Widget For Review","description":"Submit a draft widget for admin review.","operationId":"submit_widget_for_review_api_widget_marketplace_widgets__widget_id__submit_post","parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","title":"Widget Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widget-marketplace/developer/widgets":{"get":{"tags":["Widget Marketplace"],"summary":"Developer Widgets","description":"List widgets created by the current user.","operationId":"developer_widgets_api_widget_marketplace_developer_widgets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WidgetSummaryOut"},"type":"array","title":"Response Developer Widgets Api Widget Marketplace Developer Widgets Get"}}}}}}},"/api/widget-marketplace/developer/analytics":{"get":{"tags":["Widget Marketplace"],"summary":"Developer Analytics","description":"Aggregate analytics for the current developer's widgets.","operationId":"developer_analytics_api_widget_marketplace_developer_analytics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeveloperAnalyticsOut"}}}}}}},"/api/widget-marketplace/widgets/{widget_id}/approve":{"put":{"tags":["Widget Marketplace"],"summary":"Approve Widget","description":"Admin: approve a widget from review -> published.","operationId":"approve_widget_api_widget_marketplace_widgets__widget_id__approve_put","parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","title":"Widget Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widget-marketplace/widgets/{widget_id}/suspend":{"put":{"tags":["Widget Marketplace"],"summary":"Suspend Widget","description":"Admin: suspend a widget.","operationId":"suspend_widget_api_widget_marketplace_widgets__widget_id__suspend_put","parameters":[{"name":"widget_id","in":"path","required":true,"schema":{"type":"string","title":"Widget Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/github/repos":{"get":{"tags":["workspace-github"],"summary":"List Github Repos","description":"List GitHub repos accessible to the user via Composio.","operationId":"list_github_repos_api_workspaces__workspace_id__github_repos_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/github/clone":{"post":{"tags":["workspace-github"],"summary":"Clone Github Repo","description":"Clone a GitHub repo into the workspace via task submission.\n\nAttempts to retrieve the GitHub OAuth token from Composio to\nauthenticate the clone (required for private repos). Falls back\nto unauthenticated HTTPS clone for public repos.","operationId":"clone_github_repo_api_workspaces__workspace_id__github_clone_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/current":{"get":{"tags":["workspaces"],"summary":"Get Current Workspace","description":"Return the currently active workspace.\n\nThe auth dependency auto-provisions a personal workspace for new Clerk users,\nso ctx.workspace_id should always point to a valid workspace.\n\nThe response carries the server-side onboarding snapshot (`onboarding`:\n{stage, trial}); the frontend drives the Auto-led flow off `onboarding.stage`.","operationId":"get_current_workspace_api_workspaces_current_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/workspaces/current/onboarding/reset":{"post":{"tags":["workspaces"],"summary":"Reset Current Onboarding","description":"Rewind the current workspace's onboarding so it can be re-run in place.\n\nDEV/OPS ONLY (PRD-222 W1·S10, decision D9). Gated on\n``config.ONBOARDING_RESET_ENABLED``: when off the route 404s — it is not\nadvertised (deliberately NOT 403, which would confirm it exists). When on,\nit is workspace-admin only (403 otherwise). Returns counts of everything\nreset/wiped. The reset itself lives in ``services.onboarding_state`` — the\none sanctioned backward writer of the onboarding document.","operationId":"reset_current_onboarding_api_workspaces_current_onboarding_reset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingResetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/current/onboarding/checklist":{"get":{"tags":["workspaces"],"summary":"Get Current Onboarding Checklist","description":"The post-setup checklist for the current workspace (PRD-222 US-020).\n\nItem completion is DERIVED from live workspace counts on every read (never a\nstored tick); only the dismissal flags live in ``onboarding.checklist``. The\ninvite item is omitted on single-seat plans.","operationId":"get_current_onboarding_checklist_api_workspaces_current_onboarding_checklist_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"tags":["workspaces"],"summary":"Update Current Onboarding Checklist","description":"Persist a checklist dismissal (the card, or the manual Academy item).\n\nServer-side record (D8 — never localStorage). Writes only the two dismissal\nflags via ``update_checklist`` (full-JSONB reassignment); item completion\nstays derived. Returns the fresh checklist so the caller reflects the change.","operationId":"update_current_onboarding_checklist_api_workspaces_current_onboarding_checklist_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/current/integrations":{"get":{"tags":["workspaces"],"summary":"Get Integrations","description":"Return which integrations are configured (without exposing full tokens).","operationId":"get_integrations_api_workspaces_current_integrations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["workspaces"],"summary":"Save Integrations","description":"Save platform integration credentials.\n\nBody: { \"telegram_bot_token\": \"123:ABC...\", \"slack_bot_token\": \"xoxb-...\" }\n\nOnly keys in _ALLOWED_INTEGRATION_KEYS are accepted.\nValues set to empty string or null will remove the integration.","operationId":"save_integrations_api_workspaces_current_integrations_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/current/byok-preferences":{"get":{"tags":["workspaces"],"summary":"Get Byok Preferences","description":"Return per-provider BYOK override preferences for the workspace.","operationId":"get_byok_preferences_api_workspaces_current_byok_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["workspaces"],"summary":"Save Byok Preferences","description":"Save per-provider BYOK override preferences.\n\nBody: { \"byok_overrides\": { \"openrouter\": true, \"openai\": false } }","operationId":"save_byok_preferences_api_workspaces_current_byok_preferences_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/current/voice-live":{"put":{"tags":["workspaces"],"summary":"Save Voice Live Settings","description":"PRD-207 S4/S7: the workspace's own Auto Live gate.\n\nBody: ``{\"voice_live\": {\"enabled\": bool, \"monthly_cap_minutes\"?: int,\n\"retell_voice_id\"?: str}}`` — validated by the SAME fail-closed rules as\nthe platform tool (one whitelist, two doors), merged never replace-blind.\n\nTurning it ON is refused (403, the mint's own coded reason, D34) on SaaS\nwhen the workspace's plan has no voice family: the mint would refuse every\ncall anyway, so storing ``enabled: true`` here would be a switch that lies\nabout what it does, not just one that is inert. Turning it OFF always\nsucceeds — a workspace downgraded off the plan must still be able to\nswitch itself off.","operationId":"save_voice_live_settings_api_workspaces_current_voice_live_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/current/socials":{"put":{"tags":["workspaces"],"summary":"Save Socials Settings","description":"PRD-251 S0.1 (D1): the workspace's own Socials switch.\n\nBody: ``{\"socials\": {\"enabled\", \"series_approval\", \"media_monthly_cap_usd\"}}``,\nany of them — validated fail-closed (unknown keys, a non-boolean switch and\na cap that is not a number of dollars, 0 or more, are 400), merged never\nreplace-blind. The cap (PRD-251 D13, S1.8) bounds what the workspace's media\ntools may spend for Socials in a month; series_approval is D6's (S2.4).\nThe platform master switch is a system setting, not this route.\n\nPRD-251 S1.2: turning Socials on also seeds the social video starters into\nthe workspace (``seed_social_starters``, idempotent), in the same commit as\nthe switch: a workspace never has Socials on without its templates.","operationId":"save_socials_settings_api_workspaces_current_socials_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/current/orchestrator":{"get":{"tags":["workspaces"],"summary":"Get Orchestrator Settings","description":"Return orchestrator soul, personality, heartbeat and HARNESS configuration; beside them each setting's\ndefault and which are stored (services.auto_settings_values), and the last weekly review (PRD-293 US-212).","operationId":"get_orchestrator_settings_api_workspaces_current_orchestrator_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["workspaces"],"summary":"Save Orchestrator Settings","description":"Save orchestrator soul, personality, heartbeat and HARNESS configuration.\n\nBody: {\n    \"personality_mode\": \"friendly\",\n    \"custom_soul\": \"You are a warm assistant...\",\n    \"communication_style\": \"balanced\",\n    \"proactive_level\": \"notify\",\n    \"thinking_level\": \"off\",\n    \"heartbeat\": {\n        \"enabled\": true,\n        \"interval_minutes\": 30,\n        \"active_hours_start\": \"08:00\",\n        \"active_hours_end\": \"20:00\",\n        \"timezone\": \"America/New_York\",\n        \"checklist\": \"- Check agent health...\"\n    },\n    \"harness\": {\"mode\": \"report_only\"}\n}","operationId":"save_orchestrator_settings_api_workspaces_current_orchestrator_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/current/orchestrator/reset":{"post":{"tags":["workspaces"],"summary":"Reset Orchestrator Setting","description":"Take one of Auto's settings back to its default (PRD-293 US-207): the value stored for it is removed\nfrom the workspace's settings and Auto's row, so the default applies again. Owners and admins, as a save.\nAnswers the read.","operationId":"reset_orchestrator_setting_api_workspaces_current_orchestrator_reset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/current/memory-stats":{"get":{"tags":["workspaces"],"summary":"Get Memory Stats","description":"Return memory statistics for the current workspace.\n\nUsed by the \"What Automatos Knows\" section in the Orchestrator tab.\nQueries the memory_short_term table scoped to this workspace.","operationId":"get_memory_stats_api_workspaces_current_memory_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/workspaces/current/webhook-address/replace-preview":{"get":{"tags":["workspaces"],"summary":"Preview Webhook Address Replace","description":"What Replace will do; nothing is changed.","operationId":"preview_webhook_address_replace_api_workspaces_current_webhook_address_replace_preview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Preview Webhook Address Replace Api Workspaces Current Webhook Address Replace Preview Get"}}}}}}},"/api/workspaces/current/webhook-address/replace":{"post":{"tags":["workspaces"],"summary":"Replace Webhook Address","description":"Replace the workspace's webhook address and give each connected channel the new one where it can.\n\nNeeds a fresh sign-in, as creating or revoking a key does (``STEP_UP``). The rate limit lets a replace\nthrough when Redis is unreachable, on purpose: Replace is what a person does when an address has leaked.\nEverything the answer needs is read before the new key is saved, so a saved replace always answers.","operationId":"replace_webhook_address_api_workspaces_current_webhook_address_replace_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Replace Webhook Address Api Workspaces Current Webhook Address Replace Post"}}}}}}},"/api/activity/feed":{"get":{"tags":["Activity"],"summary":"Get Activity Feed","description":"Return a unified activity feed merging chats, routines, and recipes (PRD-291 US-104: or one agent's).\n\nIts chats are the caller's own and the workspace's visitor conversations; a caller that is no person\n(a server key) gets the visitor conversations alone (``services.activity_chat_reader``).","operationId":"get_activity_feed_api_activity_feed_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated activity types to include: chat,routine,recipe","title":"Type"},"description":"Comma-separated activity types to include: chat,routine,recipe"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Status filter: working, done, attention, upcoming","title":"Status"},"description":"Status filter: working, done, attention, upcoming"},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Time window: 1d, 7d, 30d, 90d","default":"7d","title":"Period"},"description":"Time window: 1d, 7d, 30d, 90d"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":20,"title":"Limit"},"description":"Items per page"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}],"description":"One agent's items only: its routines, the Playbook runs it ran a step of, the tickets assigned to it and the chats it answered in. Another workspace's agent gives an empty feed.","title":"Agent Id"},"description":"One agent's items only: its routines, the Playbook runs it ran a step of, the tickets assigned to it and the chats it answered in. Another workspace's agent gives an empty feed."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/activity/digest":{"get":{"tags":["Activity"],"summary":"Get Workspace Digest","description":"Auto's Read — a cached plain-English summary of the workspace (PRD-221 S9).\n\nCached per (workspace, state_hash): the digest LLM fires at most once per\nreal state change. Never 500s — a degraded model returns a deterministic\nfallback. Response: {text, generated_at, state_hash, needs_attention_count}.\n\nA plain ``def``: the snapshot is synchronous SQLAlchemy and the cache is a\nsynchronous Redis client, so the coroutine runs on a loop of this threadpool\nthread's own, as ``services.brief.build.read_digest`` runs it.","operationId":"get_workspace_digest_api_activity_digest_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Time window: 1d, 7d, 30d, 90d","default":"1d","title":"Period"},"description":"Time window: 1d, 7d, 30d, 90d"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/activity/digest/feedback":{"post":{"tags":["Activity"],"summary":"Submit Digest Feedback","description":"Record a thumbs up/down on an Auto's Read digest or a brief (PRD-221 S10, PRD-268 §6.4).\n\nKeyed by the state_hash the read described. One rating per person per\nstate: a second press updates it (services/digest_feedback.py). rating\nmust be -1 or 1; anything else is a 422. Gated with agents:execute, the\nsame member-level \"can use Auto\" scope as chat.","operationId":"submit_digest_feedback_api_activity_digest_feedback_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigestFeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Activity"],"summary":"Get Digest Feedback","description":"The caller's own rating of the read or brief keyed by state_hash (PRD-268 §6.4).\n\n``{state_hash, rating}``: 1, -1, or null when this person hasn't rated it\n(always null for a caller with no person behind it). Another person's\nrating is never read. The brief card and the SDK's useRateBrief show the\nremembered thumb from it.","operationId":"get_digest_feedback_api_activity_digest_feedback_get","parameters":[{"name":"state_hash","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"State Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/activity/schedule":{"get":{"tags":["Activity"],"summary":"Get Activity Schedule","description":"Return upcoming scheduled routines and recipes for the calendar widget.","operationId":"get_activity_schedule_api_activity_schedule_get","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","description":"Schedule range: 7d, 14d, 30d","default":"7d","title":"Range"},"description":"Schedule range: 7d, 14d, 30d"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/activity/scheduler-health":{"get":{"tags":["Activity"],"summary":"Get Scheduler Health","description":"Advisory scheduler health for the calendar banner (PRD-162 S2).\n\nSeparate from /schedule and NON-BLOCKING: the calendar renders configured\nschedules regardless (Q49). Returns ``healthy: null`` when it can't tell.","operationId":"get_scheduler_health_api_activity_scheduler_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/activity/agent-reports":{"get":{"tags":["Activity"],"summary":"Get Agent Reports","description":"Latest execution summary per agent — pinned, or the most recent.","operationId":"get_agent_reports_api_activity_agent_reports_get","parameters":[{"name":"agent_ids","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated agent IDs. Omit to get the most recent reports across the workspace's agents.","default":"","title":"Agent Ids"},"description":"Comma-separated agent IDs. Omit to get the most recent reports across the workspace's agents."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/activity/board/stats":{"get":{"tags":["Activity"],"summary":"Get Board Stats","description":"Return board-level stats for dashboard widgets (status, priority, types, workload).","operationId":"get_board_stats_api_activity_board_stats_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Time window: 1d, 7d, 30d, 90d","default":"1d","title":"Period"},"description":"Time window: 1d, 7d, 30d, 90d"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/activity/stats":{"get":{"tags":["Activity"],"summary":"Get Activity Stats","description":"Return hero-card stats: working_now, channels_live, completed_today, needs_attention.\n\nA plain ``def``: every open Command Centre polls this over a synchronous\nsession, which on the event loop froze it (F105). ``needs_attention`` is\nthe Needs-you number for this viewer (PRD-252 R5).","operationId":"get_activity_stats_api_activity_stats_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Time window for stats: 1d, 7d, 30d, 90d","default":"1d","title":"Period"},"description":"Time window for stats: 1d, 7d, 30d, 90d"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/activity/needs-you":{"get":{"tags":["Activity"],"summary":"Get Needs You","description":"PRD-252 R5: the one Needs-you number and the rows behind it.\n\nThe Board tab badge, ATTENTION and Auto's pill show ``total``; the Needs\nyou widget lists ``rows``. Each ask counts only for someone who can answer it\n(``answers_of``): a question for an owner, admin, editor or member (PRD-292), an\napproval grant for an owner, admin or editor (PRD-266 D16). A failure is a 503 with a\nmessage, never \"nothing needs you\" (F207). It has no period (F246): what\nwaits for the owner waits until it is dealt with. PRD-268 §6.11.1: each row\nalso says where it stands, its next step and what Try again does, in the\nlanguage ``Accept-Language`` asks for (English by default).","operationId":"get_needs_you_api_activity_needs_you_get","parameters":[{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/heartbeat/agents/{agent_id}/config":{"get":{"tags":["heartbeat"],"summary":"Get Agent Heartbeat Config","description":"Get heartbeat config for an agent.","operationId":"get_agent_heartbeat_config_api_heartbeat_agents__agent_id__config_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["heartbeat"],"summary":"Save Agent Heartbeat Config","description":"Save heartbeat config for an agent, updating agent.configuration.heartbeat.","operationId":"save_agent_heartbeat_config_api_heartbeat_agents__agent_id__config_put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatConfigPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/heartbeat/agents/{agent_id}/last":{"get":{"tags":["heartbeat"],"summary":"Get Agent Last Heartbeat","description":"Get the most recent heartbeat result for an agent.","operationId":"get_agent_last_heartbeat_api_heartbeat_agents__agent_id__last_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/heartbeat/orchestrator/run":{"post":{"tags":["heartbeat"],"summary":"Run Orchestrator Heartbeat","description":"Trigger an immediate orchestrator heartbeat tick in the caller's workspace.","operationId":"run_orchestrator_heartbeat_api_heartbeat_orchestrator_run_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/heartbeat/orchestrator/history":{"get":{"tags":["heartbeat"],"summary":"Get Orchestrator Heartbeat History","description":"The caller's workspace's recent orchestrator heartbeat results, newest first, as\n``{results, total}``.","operationId":"get_orchestrator_heartbeat_history_api_heartbeat_orchestrator_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/heartbeat/agents/{agent_id}/run":{"post":{"tags":["heartbeat"],"summary":"Run Agent Heartbeat","description":"Trigger an immediate heartbeat tick for a specific agent.","operationId":"run_agent_heartbeat_api_heartbeat_agents__agent_id__run_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/heartbeat/agents/{agent_id}/history":{"get":{"tags":["heartbeat"],"summary":"Get Agent Heartbeat History","description":"List recent heartbeat results for a specific agent.","operationId":"get_agent_heartbeat_history_api_heartbeat_agents__agent_id__history_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/heartbeat/status":{"get":{"tags":["heartbeat"],"summary":"Get Heartbeat Status","description":"Return status of all active heartbeat schedules.","operationId":"get_heartbeat_status_api_heartbeat_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/heartbeat/analytics":{"get":{"tags":["heartbeat"],"summary":"Get Heartbeat Analytics","description":"Return heartbeat summary stats for analytics dashboard (US-010).","operationId":"get_heartbeat_analytics_api_heartbeat_analytics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/heartbeat/workspace":{"get":{"tags":["heartbeat"],"summary":"List Workspace Heartbeats","description":"List all heartbeat configurations for the current workspace.\n\nReturns agent heartbeats with their config, last run, and status.\nUsed by the Activity Command Centre Routines tab (PRD-72).","operationId":"list_workspace_heartbeats_api_heartbeat_workspace_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/heartbeat/{heartbeat_id}/toggle":{"patch":{"tags":["heartbeat"],"summary":"Toggle Heartbeat","description":"Toggle a heartbeat's enabled state (pause/resume).\n\nheartbeat_id is the agent ID whose heartbeat config should be toggled.","operationId":"toggle_heartbeat_api_heartbeat__heartbeat_id__toggle_patch","parameters":[{"name":"heartbeat_id","in":"path","required":true,"schema":{"type":"integer","title":"Heartbeat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/heartbeat/{heartbeat_id}/executions":{"get":{"tags":["heartbeat"],"summary":"Get Heartbeat Executions","description":"Get execution history for a specific agent's heartbeat.\n\nheartbeat_id is the agent ID. Returns the last N executions\nfrom heartbeat_results ordered by most recent first.","operationId":"get_heartbeat_executions_api_heartbeat__heartbeat_id__executions_get","parameters":[{"name":"heartbeat_id","in":"path","required":true,"schema":{"type":"integer","title":"Heartbeat Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels":{"get":{"tags":["channels"],"summary":"List Channels","description":"List all channel connections for the current workspace, each with its\nfacts (PRD-293 US-209: ``channels.facts``): the account it is connected as,\nits state in words and its error's text with nothing secret in it, the last\nTest, what uses it, and when and by whom its credentials were set (US-210).\n\nThe ``status`` column is reconciled against ``ChannelManager`` at\nread time: a row whose polling adapter is still running is reported\nas ``active``, on any worker (``is_running`` reads the running set\nthe polling worker publishes). The DB is not written back: the polling\nworker converges the adapters to the rows, so writing a running\nadapter's state into its row would undo a stop saved on another worker\nbefore the polling worker had applied it. No platform is called. A plain\n``def``: it awaits nothing, so FastAPI runs its database and Redis reads in\nthe threadpool.","operationId":"list_channels_api_channels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["channels"],"summary":"Create Channel","description":"Create a new channel connection, recording who set its credentials and when (PRD-293 US-210).","operationId":"create_channel_api_channels_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}":{"put":{"tags":["channels"],"summary":"Update Channel","description":"Update a channel connection's config. A config that changes the channel's\ncredentials records when and by whom, neither when no person is behind the\nrequest; one that changes no credential records nothing\n(``channels.facts.credential_set_values``, PRD-293 US-210).","operationId":"update_channel_api_channels__channel_id__put","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["channels"],"summary":"Delete Channel","description":"Delete a channel connection.\n\nCalls the driver's ``uninstall_webhook`` first (so the platform\nstops POSTing to us), then removes the row; the worker that owns\nchannel polling stops a polling adapter once the row is gone. The\ndriver call is best-effort — the row is always deleted even if it\nfails.","operationId":"delete_channel_api_channels__channel_id__delete","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/platforms":{"get":{"tags":["channels"],"summary":"List Supported Platforms","description":"Return every registered driver with the config fields the connect\nform needs to collect and the connectivity modes it supports, and\nwhether the caller's workspace has a connected channel on it\n(``connected``, PRD-293 US-209). This is the one list of platforms a\nchannel can be connected to: connect validates against the same drivers.\nA plain ``def``: it reads the database and awaits nothing.","operationId":"list_supported_platforms_api_channels_platforms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Supported Platforms Api Channels Platforms Get"}}}}}}},"/api/channels/{channel_id}/test":{"post":{"tags":["channels"],"summary":"Test Channel","description":"Re-verify a channel via its driver.\n\nUpdates ``status`` / ``last_verified`` / ``last_error`` so the\ndashboard reflects the most recent outcome without a page reload.\nNever starts polling — see ``/start``.","operationId":"test_channel_api_channels__channel_id__test_post","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/start":{"post":{"tags":["channels"],"summary":"Start Channel","description":"Mark this channel connection active. The worker that owns channel\npolling starts a polling-mode adapter: at once when this request reached\nit, else within one reconcile interval (``channels.polling``).","operationId":"start_channel_api_channels__channel_id__start_post","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/{channel_id}/stop":{"post":{"tags":["channels"],"summary":"Stop Channel","description":"Mark this channel connection inactive. The worker that owns channel\npolling stops its adapter: at once when this request reached it, else\nwithin one reconcile interval (``channels.polling``).","operationId":"stop_channel_api_channels__channel_id__stop_post","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels/analytics":{"get":{"tags":["channels"],"summary":"Get Channel Analytics","description":"Return channel message stats for analytics dashboard (US-026).","operationId":"get_channel_analytics_api_channels_analytics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/voice/web-call":{"post":{"tags":["voice"],"summary":"Mint Web Call","description":"Mint a Retell web-call session for the authenticated caller (S1).\n\nGates, in order, all fail-closed with honest reasons (§7.5-3): on SaaS the\nplan (``_require_voice_live_plan``, D34) → platform ``voice.live_enabled``\nsettings toggle → Retell credentials → a strictly resolved caller →\nworkspace toggle → cap formula. The steps are ``modules/voice/mint.py``'s,\nfed this module's names through ``_mint_ports``. The ``voice_calls`` row is\nBORN here (status ``minted``) so the webhook's trust boundary has something\nto validate against before any event arrives. The Retell key never reaches\nthe browser — only the ~30s-lived ``access_token`` does, with Retell's\ntransport fields when it returned them (D32).","operationId":"mint_web_call_api_voice_web_call_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintWebCallRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mint Web Call Api Voice Web Call Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/voice/retell/events":{"post":{"tags":["voice"],"summary":"Retell Events Webhook","description":"Retell call-lifecycle webhook (S3): the meter's write path.\n\nHMAC fail-closed like the LLM webhook; idempotent updates keyed by\n``call_id``. Always answers 2xx fast on verified payloads (Retell\nretries 3× in 10s — a slow handler double-applies, which idempotency\nabsorbs, but we stay quick anyway).","operationId":"retell_events_webhook_api_voice_retell_events_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Retell Events Webhook Api Voice Retell Events Post"}}}}}}},"/api/voice/live-status":{"get":{"tags":["voice"],"summary":"Voice Live Status","description":"Settings → Voice's one read (PRD-293 §4.9, US-211), and whether Auto Live can start.\n\nEveryone who may call it gets the install's switch as one true or false\n(``platform_enabled``), so the workspace's switch can be drawn locked while\nthe install has Live off, and the workspace's own switch, voice and meter.\nOnly the operator (``viewer_is_admin``: the people the arm route and the\nsystem-settings routes admit) gets ``install``, the \"For the whole install\"\ncard (``modules/voice/install_card.py``): whether the provider's values are\nall present, and for each of its secrets set or not set, when and by whom,\nnever a value; the agent id's value. Anyone else gets ``install: null``.\n``available`` says whether a mint would pass every gate now (the plan and\ncredits included), and ``reason`` names the first gate that would refuse\n(``modules/voice/availability.py``); the host voice provider offers Live\nfrom it. A plain ``def``: every read here is a synchronous database read,\nso FastAPI runs it in its threadpool.","operationId":"voice_live_status_api_voice_live_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Voice Live Status Api Voice Live Status Get"}}}}}}},"/api/voice/arm":{"post":{"tags":["voice"],"summary":"Arm Voice Live","description":"Arm (or disarm) Auto Live platform-wide from ONE box on the card.\n\nPaste the Retell API key, click Arm: the server creates the custom-LLM\nagent in the customer's Retell account (correct wss + webhook URLs —\nnobody hand-copies transport strings), files key/signing-key/agent-id\ninto the masked settings slots and flips ``voice.live_enabled`` ON.\nIdempotent: an existing agent id is kept; a re-arm re-tunes it and\nre-points it at the current ``PUBLIC_API_HOST``. ``enabled=false`` flips\nthe master toggle only. Admin-gated here; the body is\n``modules/voice/arming.arm`` (PRD-258 US-003), refusals are honest.","operationId":"arm_voice_live_api_voice_arm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArmVoiceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Arm Voice Live Api Voice Arm Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/voice/speech":{"post":{"tags":["voice"],"summary":"Speak","description":"Auto's words as MP3, streamed from voice-tts; a ``{\"code\", \"detail\"}`` refusal otherwise.","operationId":"speak_api_voice_speech_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/voice/voices":{"get":{"tags":["voice"],"summary":"Voices","description":"voice-tts's voices, English first: ``{\"default\", \"voices\": [{id, name, accent, gender}]}``.","operationId":"voices_api_voice_voices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/reports":{"get":{"tags":["reports"],"summary":"List Reports","description":"List reports for the current workspace with optional filters.","operationId":"list_reports_api_reports_get","parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by agent ID","title":"Agent Id"},"description":"Filter by agent ID"},{"name":"report_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by type: standup, research, incident, summary, delivery, audit","title":"Report Type"},"description":"Filter by type: standup, research, incident, summary, delivery, audit"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status: ok, warning, critical, info","title":"Status"},"description":"Filter by status: ok, warning, critical, info"},{"name":"graded","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by graded (true) or ungraded (false)","title":"Graded"},"description":"Filter by graded (true) or ungraded (false)"},{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Time period: 1d, 7d, 30d, 90d","default":"30d","title":"Period"},"description":"Time period: 1d, 7d, 30d, 90d"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reports/stats":{"get":{"tags":["reports"],"summary":"Report Stats","description":"Aggregate report stats for the workspace.","operationId":"report_stats_api_reports_stats_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","description":"Time period: 1d, 7d, 30d, 90d","default":"7d","title":"Period"},"description":"Time period: 1d, 7d, 30d, 90d"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reports/{report_id}":{"get":{"tags":["reports"],"summary":"Get Report","description":"Get a single report with its content.","operationId":"get_report_api_reports__report_id__get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reports/{report_id}/download":{"get":{"tags":["reports"],"summary":"Download Report","description":"Download the report file.","operationId":"download_report_api_reports__report_id__download_get","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reports/{report_id}/grade":{"patch":{"tags":["reports"],"summary":"Grade Report","description":"Submit a grade for a report.","operationId":"grade_report_api_reports__report_id__grade_patch","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reports/agent/{agent_id}":{"get":{"tags":["reports"],"summary":"Agent Reports","description":"Get reports for a specific agent.","operationId":"agent_reports_api_reports_agent__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"report_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Type"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"30d","title":"Period"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/deliverables":{"get":{"tags":["deliverables"],"summary":"List Deliverables","description":"List deliverables for the current workspace, each saying whether the owner added\nit to knowledge (F354: ``knowledge_document_id``).","operationId":"list_deliverables_api_deliverables_get","parameters":[{"name":"artifact_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by artifact_type (report, image, document, code, slide, spreadsheet, archive, audio, video)","title":"Artifact Type"},"description":"Filter by artifact_type (report, image, document, code, slide, spreadsheet, archive, audio, video)"},{"name":"source_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source (chat, task, mission, heartbeat, playbook, trigger, upload)","title":"Source Type"},"description":"Filter by source (chat, task, mission, heartbeat, playbook, trigger, upload)"},{"name":"source_type_exclude","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated source_types to exclude (e.g. 'heartbeat')","title":"Source Type Exclude"},"description":"Comma-separated source_types to exclude (e.g. 'heartbeat')"},{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by originating mission/task/heartbeat id (PRD-164: mission deliverables tab)","title":"Source Id"},"description":"Filter by originating mission/task/heartbeat id (PRD-164: mission deliverables tab)"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by agent id","title":"Agent Id"},"description":"Filter by agent id"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO timestamp — include rows created_at >= date_from","title":"Date From"},"description":"ISO timestamp — include rows created_at >= date_from"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO timestamp — include rows created_at <= date_to","title":"Date To"},"description":"ISO timestamp — include rows created_at <= date_to"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive search over title, summary, file_path","title":"Search"},"description":"Case-insensitive search over title, summary, file_path"},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only Deliverables carrying this tag, any case (7 Oct)","title":"Tag"},"description":"Only Deliverables carrying this tag, any case (7 Oct)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":24,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/deliverables/stats":{"get":{"tags":["deliverables"],"summary":"Deliverable Stats","description":"Aggregate deliverable stats for the workspace.","operationId":"deliverable_stats_api_deliverables_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/deliverables/retention":{"post":{"tags":["deliverables"],"summary":"Apply Retention","description":"Prune old deliverables — keeps the N most recent per agent for a given source_type.","operationId":"apply_retention_api_deliverables_retention_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_apply_retention_api_deliverables_retention_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/deliverables/{deliverable_id}":{"get":{"tags":["deliverables"],"summary":"Get Deliverable","description":"Fetch a single deliverable (404 if missing / not in workspace), saying whether the\nowner added it to knowledge (F354: ``knowledge_document_id``).","operationId":"get_deliverable_api_deliverables__deliverable_id__get","parameters":[{"name":"deliverable_id","in":"path","required":true,"schema":{"type":"string","title":"Deliverable Id"}},{"name":"include_content","in":"query","required":false,"schema":{"type":"boolean","description":"When true, reads file content via WorkspaceClient","default":false,"title":"Include Content"},"description":"When true, reads file content via WorkspaceClient"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["deliverables"],"summary":"Delete Deliverable","description":"Soft-delete a deliverable (sets deleted_at = NOW()).","operationId":"delete_deliverable_api_deliverables__deliverable_id__delete","parameters":[{"name":"deliverable_id","in":"path","required":true,"schema":{"type":"string","title":"Deliverable Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/deliverables/{deliverable_id}/thumbnail":{"get":{"tags":["deliverables"],"summary":"Get Deliverable Thumbnail","description":"The PNG of the Deliverable's first page; 404 when it has none or is not the caller's.","operationId":"get_deliverable_thumbnail_api_deliverables__deliverable_id__thumbnail_get","parameters":[{"name":"deliverable_id","in":"path","required":true,"schema":{"type":"string","title":"Deliverable Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/deliverables/{deliverable_id}/knowledge":{"post":{"tags":["deliverables"],"summary":"Add Deliverable To Knowledge","description":"The Deliverable's document becomes the owner's document. 409 for a file that is\nnot a document or cannot be read, 404 for one outside the workspace.","operationId":"add_deliverable_to_knowledge_api_deliverables__deliverable_id__knowledge_post","parameters":[{"name":"deliverable_id","in":"path","required":true,"schema":{"type":"string","title":"Deliverable Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Deliverable To Knowledge Api Deliverables  Deliverable Id  Knowledge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["deliverables"],"summary":"Remove Deliverable From Knowledge","description":"Remove the owner's document the Deliverable was added as; the Deliverable stays.\n404 for one outside the workspace.","operationId":"remove_deliverable_from_knowledge_api_deliverables__deliverable_id__knowledge_delete","parameters":[{"name":"deliverable_id","in":"path","required":true,"schema":{"type":"string","title":"Deliverable Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Deliverable From Knowledge Api Deliverables  Deliverable Id  Knowledge Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks":{"post":{"tags":["board-tasks"],"summary":"Create Task","description":"Create a new board task. F276: the answer is the ticket as the board lists\nit, with its number (#0042); what a request may file is checked in\napi/board_task_create.py.","operationId":"create_task_api_v1_tasks_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"get":{"tags":["board-tasks"],"summary":"List Tasks","description":"List board tasks with optional filters.\n\nF225: the board asked for the newest 200 tickets, so an old ticket still in\nReview fell off it (9 of 33 showed while Needs you counted 33). With\n``finished_limit`` every open ticket comes back and only Done, Cancelled and\nClosed are windowed, newest first; ``limit`` and ``offset`` then do not apply.\nA plain ``def``: a synchronous session never runs on the event loop (F105).","operationId":"list_tasks_api_v1_tasks_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated statuses","title":"Status"},"description":"Comma-separated statuses"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Id"}},{"name":"priority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"parent_task_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Task Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"finished_limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"description":"The board's view: every open ticket, whatever its age, and this many finished ones","title":"Finished Limit"},"description":"The board's view: every open ticket, whatever its age, and this many finished ones"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/stream":{"get":{"tags":["board-tasks"],"summary":"Stream Board Events","description":"Real-time board SSE via Postgres ``LISTEN/NOTIFY`` (PRD-180 S1, F090).\n\nReplaces the old timed ping: the stream ``LISTEN``s the ``board_events``\nchannel and forwards each board-task mutation (insert / status change /\nclaim / requeue) to this client sub-second, scoped to the caller's\nworkspace. A heartbeat comment keeps the connection alive but does not drive\nrefreshes — real NOTIFY events do. Rides the read-only ``TASKS_READ`` scope\n(Q42): the shared hybrid auth is untouched and no write scope is introduced.","operationId":"stream_board_events_api_v1_tasks_stream_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/tasks/{task_id}":{"get":{"tags":["board-tasks"],"summary":"Get Task","description":"Get a single board task.","operationId":"get_task_api_v1_tasks__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["board-tasks"],"summary":"Update Task","description":"Update a board task (partial).\n\nF259: a status in the body moves the ticket as the board's own status route\ndoes (PRD-252 R6): the same refusals, judged on the ticket as this PATCH leaves\nit, Run now's start and Cancel's stop. A refusal comes before anything is\ncommitted, and the fields it carried are not stored either.","operationId":"update_task_api_v1_tasks__task_id__patch","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["board-tasks"],"summary":"Delete Task","description":"Delete a board task.","operationId":"delete_task_api_v1_tasks__task_id__delete","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/approve":{"post":{"tags":["board-tasks"],"summary":"Approve Task","description":"Approve a board task in review status.\nIf the task has an approval_action in planning_data, execute it\n(e.g., publish a blog post). Then move the task to done.","operationId":"approve_task_api_v1_tasks__task_id__approve_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/reject":{"post":{"tags":["board-tasks"],"summary":"Reject Task","description":"Reject a board task in review status with reviewer feedback (PRD-161 Q44).\n\nReturns the task to the SAME agent as 'assigned' — not dumped back to inbox —\nwith the feedback carried into the next execution's context (review_feedback),\nso the agent redoes the work with the correction. The dispatch loop picks the\nre-assigned task up immediately. F092: a DONE ticket can be sent back the\nsame way; what it had finished with is kept in its history first.","operationId":"reject_task_api_v1_tasks__task_id__reject_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/run-now":{"post":{"tags":["board-tasks"],"summary":"Run Task Now","description":"PRD-161 S5: dispatch a task immediately.\n\nResets the task to a fresh ``assigned`` claim (clears lease + attempts) and\nnotifies the dispatch loop, so a failed, idle, or just-created task can be\nre-run on demand from the board. A task already in_progress is left alone.","operationId":"run_task_now_api_v1_tasks__task_id__run_now_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/status":{"patch":{"tags":["board-tasks"],"summary":"Update Task Status","description":"Update only the status of a task (for drag-and-drop on the board).\n\nPRD-252 R6: a drag does what the matching button does. A move into In\nprogress is Run Now; a move into Cancelled is Cancel (F245); a move that\nneeds a verdict is refused, naming the button that gives it.","operationId":"update_task_status_api_v1_tasks__task_id__status_patch","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/session-decision":{"post":{"tags":["board-tasks"],"summary":"Decide Session Permission Route","description":"PRD-235 W2 S3: answer a Claude Code session's permission question (the card on\nthe ticket's Canvas). The host receives the answer on its next event flush.","operationId":"decide_session_permission_route_api_v1_tasks__task_id__session_decision_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDecisionBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/cancel":{"post":{"tags":["board-tasks"],"summary":"Cancel Task","description":"PRD-234 S1a: cancel a task that has not finished.\n\nTerminal ``cancelled`` at once, whatever lane owns it: a queued/blocked task\nsimply stops being claimable; a CLI-host session is told to stop on its next\nevent batch (``control: [\"cancel\"]``) and its late result is a no-op; an API\nrun still finishes in the background but its result is dropped honestly —\nthe completion writer only writes ``in_progress`` rows. F245: a playbook's\ncard stops its run and a mission's card cancels the mission; a failed\nticket can be cancelled, which closes it.","operationId":"cancel_task_api_v1_tasks__task_id__cancel_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/plan":{"post":{"tags":["board-tasks"],"summary":"Plan Task","description":"Start planning mode: accepts a raw prompt, returns 3-4 clarifying\nmultiple-choice questions from the orchestrator LLM.","operationId":"plan_task_api_v1_tasks_plan_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/tasks/plan/refine":{"post":{"tags":["board-tasks"],"summary":"Refine Task","description":"Refine a task: accepts raw_prompt + answers to planning questions,\nreturns a refined description + suggested title + priority.","operationId":"refine_task_api_v1_tasks_plan_refine_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/tasks/{task_id}/rebrief":{"post":{"tags":["board-tasks"],"summary":"Rebrief Task","description":"PRD-252 R2 (Discuss): \"Update ticket and re-queue\". The brief the owner and\nAuto agreed becomes the ticket's description, the owner's correction says so,\nthe old brief and the last run stay on record, and the ticket goes back to\nits agent. F243: a playbook's card runs its playbook again with the agreed\nbrief, a step of a running mission goes back to its mission with it, and any\nother mission ticket is refused up front (409), saying why and what to do; a\nrunning ticket is not re-briefed under its run (409).","operationId":"rebrief_task_api_v1_tasks__task_id__rebrief_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RebriefBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/pull-request":{"delete":{"tags":["board-tasks"],"summary":"Remove Ticket Pull Request","description":"Take the ticket's pull request off it. A plain ``def``: the session is synchronous (F105).","operationId":"remove_ticket_pull_request_api_v1_tasks__task_id__pull_request_delete","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Ticket Pull Request Api V1 Tasks  Task Id  Pull Request Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/add-to-knowledge":{"post":{"tags":["board-tasks"],"summary":"Add Card To Knowledge","description":"The approved card's answer becomes the owner's document, once (adding again\nanswers ``already_added``). 409 for a card that is not approved (or has no\nanswer), 404 for one outside the workspace.","operationId":"add_card_to_knowledge_api_v1_tasks__task_id__add_to_knowledge_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Card To Knowledge Api V1 Tasks  Task Id  Add To Knowledge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["board-tasks"],"summary":"Remove Card From Knowledge","description":"Remove the owner's copy of the card's answer; the card stays. 404 for one\noutside the workspace.","operationId":"remove_card_from_knowledge_api_v1_tasks__task_id__add_to_knowledge_delete","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Card From Knowledge Api V1 Tasks  Task Id  Add To Knowledge Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reports/{report_id}/add-to-knowledge":{"post":{"tags":["reports"],"summary":"Add Report To Knowledge","description":"The report's text (without its Execution Metrics) becomes the owner's document,\nonce. 409 while its ticket is not approved, 404 for one outside the workspace.","operationId":"add_report_to_knowledge_api_reports__report_id__add_to_knowledge_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Report To Knowledge Api Reports  Report Id  Add To Knowledge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["reports"],"summary":"Remove Report From Knowledge","description":"Remove the owner's copy of the report; the report stays. 404 for one outside\nthe workspace.","operationId":"remove_report_from_knowledge_api_reports__report_id__add_to_knowledge_delete","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Report From Knowledge Api Reports  Report Id  Add To Knowledge Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions":{"post":{"tags":["missions"],"summary":"Create Mission","description":"Create a new mission from a natural-language goal.","operationId":"create_mission_api_missions_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissionCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["missions"],"summary":"List Missions","description":"List missions for the current workspace, paginated and optionally filtered by state.","operationId":"list_missions_api_missions_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by state (e.g., 'running', 'completed')","title":"State"},"description":"Filter by state (e.g., 'running', 'completed')"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/import-plan":{"post":{"tags":["missions"],"summary":"Import Mission Plan","description":"PRD-163 S2: create a mission from a pre-built (possibly chat-edited) plan and\nexecute it verbatim — the planner is NOT re-run, so the executed DAG matches the\ngiven plan exactly (Q54). The mission lands in awaiting_approval.","operationId":"import_mission_plan_api_missions_import_plan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanImportRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/approval-policy":{"get":{"tags":["missions"],"summary":"Get Mission Approval Policy","description":"PRD-163 S3: the workspace's mission approval policy.","operationId":"get_mission_approval_policy_api_missions_approval_policy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["missions"],"summary":"Set Mission Approval Policy","description":"PRD-163 S3: update the workspace's mission approval policy.","operationId":"set_mission_approval_policy_api_missions_approval_policy_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalPolicyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/stats":{"get":{"tags":["missions"],"summary":"Get Mission Stats","description":"Aggregate mission statistics for the current workspace.","operationId":"get_mission_stats_api_missions_stats_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(7d|30d|90d|all)$","description":"Stats period","default":"30d","title":"Period"},"description":"Stats period"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/archive":{"get":{"tags":["missions"],"summary":"List Archived Missions","description":"List archived missions for the current workspace, with optional search and state filter.","operationId":"list_archived_missions_api_missions_archive_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search archived missions by goal text","title":"Search"},"description":"Search archived missions by goal text"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by terminal state","title":"State"},"description":"Filter by terminal state"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/archive/{archive_id}":{"get":{"tags":["missions"],"summary":"Get Archived Mission","description":"Get full archived mission detail including the complete snapshot.","operationId":"get_archived_mission_api_missions_archive__archive_id__get","parameters":[{"name":"archive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Archive Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/upload":{"post":{"tags":["missions"],"summary":"Upload Mission File","description":"Upload a file attachment for use in a mission.\n\nMax 20 MB. Allowed types: pdf, md, txt, doc, docx, json, csv, xlsx.\nRuns through DocumentManager pipeline (S3 + chunking + embedding for RAG).\nReturns document_id and file metadata.","operationId":"upload_mission_file_api_missions_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_mission_file_api_missions_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/{mission_id}":{"get":{"tags":["missions"],"summary":"Get Mission","description":"Get full mission detail: run + tasks + recent events.","operationId":"get_mission_api_missions__mission_id__get","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["missions"],"summary":"Delete Mission","description":"Delete a mission. Only allowed for terminal-state missions.","operationId":"delete_mission_api_missions__mission_id__delete","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/{mission_id}/events":{"get":{"tags":["missions"],"summary":"Get Mission Events","description":"Paginated events for a mission run, optionally filtered by event_type.","operationId":"get_mission_events_api_missions__mission_id__events_get","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by event_type","title":"Event Type"},"description":"Filter by event_type"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/{mission_id}/cost":{"get":{"tags":["missions"],"summary":"Get Mission Cost","description":"Token usage breakdown and estimated cost for a mission.","operationId":"get_mission_cost_api_missions__mission_id__cost_get","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/{mission_id}/field/query":{"post":{"tags":["missions"],"summary":"Query Mission Field","description":"PRD-166 S4: retrieval-trace inspector data source — run a query against\nthe mission's field and return which patterns *fired*, with their resonance\n+ similarity/strength breakdown, so the UI can show why each surfaced.","operationId":"query_mission_field_api_missions__mission_id__field_query_post","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissionFieldQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/{mission_id}/field":{"get":{"tags":["missions"],"summary":"Get Mission Field","description":"Get the live state of the mission's shared semantic field (PRD-108).\n\nReturns all patterns with decayed strengths, stability metrics,\nand instrumentation data for the field visualizer.\n\n`status` values:\n  - `not_created` — mission has no field_id (mission is queued or\n    was created before PRD-108 shipped)\n  - `missing` — field_id present but the underlying Qdrant\n    collection is gone (stale id; coordinator will recreate on\n    next tick if mission is still running — see PR #312)\n  - `empty` — collection exists but no patterns injected yet\n  - `active` — collection exists with patterns\n  - `unavailable` — shared context backend is down (Qdrant\n    unreachable, etc)","operationId":"get_mission_field_api_missions__mission_id__field_get","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"mission","title":"Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/{mission_id}/plan":{"patch":{"tags":["missions"],"summary":"Update Mission Plan","description":"PRD-163 S4/Q57: apply approval-time task/agent edits before approval.\n\nEdits the OrchestrationTask rows the dispatcher will execute (so an edited\nagent_role persists into execution) and mirrors them into the plan snapshot.\nValid only while the mission is awaiting approval.","operationId":"update_mission_plan_api_missions__mission_id__plan_patch","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissionPlanEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/{mission_id}/approve":{"post":{"tags":["missions"],"summary":"Approve Plan","description":"Approve a mission plan and start execution.","operationId":"approve_plan_api_missions__mission_id__approve_post","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissionApproveRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/{mission_id}/reject":{"post":{"tags":["missions"],"summary":"Reject Plan","description":"Reject a mission plan.","operationId":"reject_plan_api_missions__mission_id__reject_post","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissionRejectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/{mission_id}/replan":{"post":{"tags":["missions"],"summary":"Replan Mission","description":"Replan a failed mission — generate replacement tasks for the failed subtree.","operationId":"replan_mission_api_missions__mission_id__replan_post","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissionReplanRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/{mission_id}/save-as-routine":{"post":{"tags":["missions"],"summary":"Save As Routine","description":"Save a completed mission as a reusable routine template.","operationId":"save_as_routine_api_missions__mission_id__save_as_routine_post","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveAsRoutineRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/{mission_id}/pause":{"post":{"tags":["missions"],"summary":"Pause Mission","description":"Pause a running mission. Running tasks continue but no new dispatches.","operationId":"pause_mission_api_missions__mission_id__pause_post","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/{mission_id}/resume":{"post":{"tags":["missions"],"summary":"Resume Mission","description":"Resume a paused mission, optionally increasing its budget.","operationId":"resume_mission_api_missions__mission_id__resume_post","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/{mission_id}/cancel":{"post":{"tags":["missions"],"summary":"Cancel Mission","description":"Cancel a mission. Nothing new is dispatched, and a step run by a Claude Code\nsession stops with it (F224); an in-process step finishes its current call.","operationId":"cancel_mission_api_missions__mission_id__cancel_post","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/mission-history":{"get":{"tags":["agent-telemetry"],"summary":"Get Agent Mission History","description":"Agent mission performance: tasks completed, failure rate, recent missions.","operationId":"get_agent_mission_history_api_agents__agent_id__mission_history_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/missions/{mission_id}/settings":{"patch":{"tags":["missions"],"summary":"Update Mission Settings","description":"Turn the owner's check of each step on or off on a mission that can still\nrun. The setting is written as ``check_each_step`` from here on, whatever\nspelling the mission started with (``with_step_checks``). A mission already\ncompleted, failed or cancelled refuses: there is nothing left for the\nsetting to change.","operationId":"update_mission_settings_api_missions__mission_id__settings_patch","parameters":[{"name":"mission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissionSettingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/assignments/recommended":{"get":{"tags":["assignments"],"summary":"Get Recommended","description":"Marketplace discovery feed for the Assignments page.\n\nReturns approved marketplace playbooks the workspace has NOT yet installed,\nranked by featured > install_count > recency. Excludes anything already\ncloned into this workspace (via cloned_from_id).","operationId":"get_recommended_api_assignments_recommended_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"default":12,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Recommended Api Assignments Recommended Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/scheduled-tasks":{"get":{"tags":["Scheduled Tasks"],"summary":"List Scheduled Tasks","description":"List all scheduled tasks for the workspace (a room's only for a member of its room, PRD-289 §5.11).","operationId":"list_scheduled_tasks_api_v1_scheduled_tasks_get","parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by agent (creator or target)","title":"Agent Id"},"description":"Filter by agent (creator or target)"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Scheduled Tasks"],"summary":"Create Scheduled Board Task","description":"Schedule a board ticket for later.\n\nThe row waits on the Command Centre calendar and is filed on the board when\nit fires — assigned to ``assigned_agent_id`` (the dispatcher then runs it) or\ninto the Inbox. The operator is recorded on the row: on the local edition\ntheir scheduling is the PRD-234 consent when the ticket is filed.","operationId":"create_scheduled_board_task_api_v1_scheduled_tasks_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduledBoardTaskRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/scheduled-tasks/{task_id}/status":{"patch":{"tags":["Scheduled Tasks"],"summary":"Update Task Status","description":"Cancel, pause, or resume a scheduled task.","operationId":"update_task_status_api_v1_scheduled_tasks__task_id__status_patch","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/scheduled-tasks/{task_id}/cancel":{"post":{"tags":["Scheduled Tasks"],"summary":"Cancel Task","description":"Stop this schedule for good.","operationId":"cancel_task_api_v1_scheduled_tasks__task_id__cancel_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/scheduled-tasks/{task_id}/pause":{"post":{"tags":["Scheduled Tasks"],"summary":"Pause Task","description":"Stop this schedule firing until it is resumed.","operationId":"pause_task_api_v1_scheduled_tasks__task_id__pause_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/scheduled-tasks/{task_id}/resume":{"post":{"tags":["Scheduled Tasks"],"summary":"Resume Task","description":"Start a paused schedule firing again.","operationId":"resume_task_api_v1_scheduled_tasks__task_id__resume_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/scheduled-tasks/{task_id}":{"delete":{"tags":["Scheduled Tasks"],"summary":"Delete Task","description":"Cancel this schedule. The row is kept so its history stays readable.","operationId":"delete_task_api_v1_scheduled_tasks__task_id__delete","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approval-grants":{"get":{"tags":["approval-grants"],"summary":"List Grants","description":"List this workspace's approval grants, newest first.\n\nFilter by ``status`` and/or ``kind``: the Questions tab reuses THIS route with ``kind=question`` (PRD-225), its rows\nenriched with their blocked cascade. PRD-292: any role reads ``kind=question`` (``services.question_reads``).","operationId":"list_grants_api_v1_approval_grants_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Grants Api V1 Approval Grants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approval-grants/{grant_id}/grant":{"post":{"tags":["approval-grants"],"summary":"Grant Approval","description":"Approve a pending grant (a human says yes) and re-queue any blocked subject.","operationId":"grant_approval_api_v1_approval_grants__grant_id__grant_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"integer","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Grant Approval Api V1 Approval Grants  Grant Id  Grant Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approval-grants/{grant_id}/deny":{"post":{"tags":["approval-grants"],"summary":"Deny Approval","description":"Refuse a pending grant. An approval denial FAILS the subject; a question\ndenial is a *dismiss* — the subject stays blocked and the asker may re-ask\n(PRD-225 baked decision), so no answer is fabricated and the trail is kept.","operationId":"deny_approval_api_v1_approval_grants__grant_id__deny_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"integer","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Deny Approval Api V1 Approval Grants  Grant Id  Deny Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approval-grants/{grant_id}/revoke":{"post":{"tags":["approval-grants"],"summary":"Revoke Approval","description":"Retract a granted authorisation before it expires.","operationId":"revoke_approval_api_v1_approval_grants__grant_id__revoke_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"integer","title":"Grant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Approval Api V1 Approval Grants  Grant Id  Revoke Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approval-grants/{grant_id}/answer":{"post":{"tags":["approval-grants"],"summary":"Answer Question","description":"Answer a pending question: record the answer, resume the parked subject\nthrough the SAME machinery a grant uses, and confirm into chat.\n\n``pending → granted`` on a ``kind='question'`` row. The Q&A is appended to the\nsubject's execution context (board task ``planning_data.human_qa`` or the\ntool-call resume payload) so the agent's next run reads the answer verbatim.","operationId":"answer_question_api_v1_approval_grants__grant_id__answer_post","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"integer","title":"Grant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Answer Question Api V1 Approval Grants  Grant Id  Answer Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gdpr/export":{"get":{"tags":["gdpr"],"summary":"Export My Workspace","description":"Export this workspace's data (SQL + field memory + durable memory) as a JSON bundle.","operationId":"export_my_workspace_api_v1_gdpr_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/gdpr/erase":{"post":{"tags":["gdpr"],"summary":"Erase My Workspace","description":"Erase this whole workspace across every store (irreversible).\n\nRequires ``{\"confirm_workspace_id\": \"<this workspace id>\"}`` to guard against\nan accidental fire. An erasure that answered 503 left the workspace closed; its\nowner may call this again to finish it (``core/auth/workspace_eraser.py``).","operationId":"erase_my_workspace_api_v1_gdpr_erase_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Erase My Workspace Api V1 Gdpr Erase Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gdpr/erase-subject":{"post":{"tags":["gdpr"],"summary":"Erase Subject","description":"Erase a single data subject's data within this workspace where a subject\ntag exists (PRD-196 S6 made field + durable real deletes). Stores lacking a\nsubject tag (SQL) are reported in ``gaps``; pre-tag rows in ``untagged_history``.\n\nBody: ``{\"subject_id\": \"<id>\"}``. This is the platform entrypoint the Shopify\n``customers/redact`` webhook calls (the Remix handler itself is out of scope\nfor this repo — flagged for the Shopify pod).","operationId":"erase_subject_api_v1_gdpr_erase_subject_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Erase Subject Api V1 Gdpr Erase Subject Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspace-move/export":{"post":{"tags":["workspace-move"],"summary":"Start Export","description":"Start exporting this workspace to one file; poll the job, then download it once.","operationId":"start_export_api_workspace_move_export_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Start Export Api Workspace Move Export Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspace-move/export/{job_id}":{"get":{"tags":["workspace-move"],"summary":"Export Status","description":"The export's status, its counts and its file's name and size.","operationId":"export_status_api_workspace_move_export__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Export Status Api Workspace Move Export  Job Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspace-move/export/{job_id}/file":{"get":{"tags":["workspace-move"],"summary":"Download Export","description":"The export file, once. It is deleted after it has been sent; a second call is 410.","operationId":"download_export_api_workspace_move_export__job_id__file_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/governance/audit-log":{"get":{"tags":["governance"],"summary":"Get Audit Log","description":"Read this workspace's audit log, newest first, paginated + filterable.\n\nFAIL-CLOSED tenancy: the ``workspace_id`` filter comes from ``ctx``, never\nfrom a parameter — no combination of filters can return another workspace's\nrows. Filters: ``action_prefix`` (``policy:`` / ``gdpr:`` /\n``approval_grant:``), ``actor_type``, ``resource_type``, ``since``/``until``.","operationId":"get_audit_log_api_v1_governance_audit_log_get","parameters":[{"name":"action_prefix","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Prefix"}},{"name":"actor_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Type"}},{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Until"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Audit Log Api V1 Governance Audit Log Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/governance/status":{"get":{"tags":["governance"],"summary":"Get Status","description":"The honest governance status: is the policy plane enforcing, how many\ngrants sit in each state, the recent policy-verdict counts, and the audit\nretention window. An OFF plane reports ``enforcing: false`` loudly — the\noperator is never falsely reassured (governance-policy §I.5).","operationId":"get_status_api_v1_governance_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Status Api V1 Governance Status Get"}}}}}}},"/api/v1/governance/policy":{"get":{"tags":["governance"],"summary":"Get Policy","description":"This workspace's policy posture (Balanced/Strict/Permissive), per-risk\n``route_overrides``, and ``agents_inherit_admin``. Fail-safe to Balanced.","operationId":"get_policy_api_v1_governance_policy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Policy Api V1 Governance Policy Get"}}}}}},"put":{"tags":["governance"],"summary":"Put Policy","description":"Set the policy posture / overrides / inherit-admin. Invalid posture or\noverride map surfaces as 422 (from ``set_policy_document``'s own validation).\nThe change only becomes user-visible when the plane is enforcing (S3 tile).","operationId":"put_policy_api_v1_governance_policy_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Put Policy Api V1 Governance Policy Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/governance/budget":{"get":{"tags":["governance"],"summary":"Get Budget","description":"This workspace's spend/token ceiling under ``plan_limits.budget`` (empty\n⇒ no ceiling; the gate is inert).","operationId":"get_budget_api_v1_governance_budget_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Budget Api V1 Governance Budget Get"}}}}}},"put":{"tags":["governance"],"summary":"Put Budget","description":"Set the budget ceiling. Only the documented keys are accepted\n(``max_cost_usd`` ≥ 0, ``max_total_tokens`` int ≥ 0, ``window`` ∈\nday|month|all); anything else is 422. Lands under ``plan_limits.budget`` —\nno new column.","operationId":"put_budget_api_v1_governance_budget_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Put Budget Api V1 Governance Budget Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/watches":{"get":{"tags":["watches"],"summary":"List Watches","description":"This workspace's watches, newest first. Live-only unless asked. A room's only for a member of its room\n(PRD-289 §5.11: ``services.rooms.listed``).","operationId":"list_watches_api_v1_watches_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by exact watch status (e.g. 'watching')","title":"Status"},"description":"Filter by exact watch status (e.g. 'watching')"},{"name":"watch_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by watch type (mission / playbook_execution / scheduled_playbook)","title":"Watch Type"},"description":"Filter by watch type (mission / playbook_execution / scheduled_playbook)"},{"name":"include_closed","in":"query","required":false,"schema":{"type":"boolean","description":"Without a status filter, include closed watches too","default":false,"title":"Include Closed"},"description":"Without a status filter, include closed watches too"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Watches Api V1 Watches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/watches/{watch_id}":{"get":{"tags":["watches"],"summary":"Get Watch","description":"One watch (with lineage) plus its recent events, newest first.","operationId":"get_watch_api_v1_watches__watch_id__get","parameters":[{"name":"watch_id","in":"path","required":true,"schema":{"type":"string","title":"Watch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Watch Api V1 Watches  Watch Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/watches/{watch_id}/cancel":{"post":{"tags":["watches"],"summary":"Cancel Watch","description":"Cancel a live watch. Closed watches refuse (422); unknown ids 404.","operationId":"cancel_watch_api_v1_watches__watch_id__cancel_post","parameters":[{"name":"watch_id","in":"path","required":true,"schema":{"type":"string","title":"Watch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Watch Api V1 Watches  Watch Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/fleet":{"get":{"tags":["fleet"],"summary":"Get Fleet","description":"Live fleet state for the caller's workspace (PRD-228 read-model).","operationId":"get_fleet_api_v1_fleet_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/cli-hosts":{"get":{"tags":["cli-hosts"],"summary":"List Cli Hosts","operationId":"list_cli_hosts_api_v1_cli_hosts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/cli-hosts/health":{"get":{"tags":["cli-hosts"],"summary":"Cli Host Health","description":"PRD-235 W3: is a Claude Code host online for this workspace, since when\nwas one last seen, and how many CLI tickets are waiting. The board banner\nreads it; the ticket line says the same thing per ticket.","operationId":"cli_host_health_api_v1_cli_hosts_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/cli-hosts/workspace-check":{"get":{"tags":["cli-hosts"],"summary":"Workspace Check","description":"PRD-239 S6: what a cli agent's working directory would mean before it is\nsaved — valid, browsable in the Canvas (as which root), and inside the\npaired host's allowed directories. Read-only; nothing is written.","operationId":"workspace_check_api_v1_cli_hosts_workspace_check_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024,"description":"An agent's working_directory as typed","title":"Path"},"description":"An agent's working_directory as typed"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cli-hosts/{host_id}/terminal":{"post":{"tags":["cli-hosts"],"summary":"Open Terminal","description":"PRD-239 S7: mint a single-use grant for the operator's own shell on the\npaired host (served on the host's loopback for the browser on that machine).\nNothing runs here; the host opens the shell when the browser connects.","operationId":"open_terminal_api_v1_cli_hosts__host_id__terminal_post","parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Host Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cli-hosts/settings":{"get":{"tags":["cli-hosts"],"summary":"Session Mode Settings","description":"PRD-239 S6c: the session-mode settings and the projects-folder state the\nSettings tab explains (the folder itself is a Docker mount from .env).","operationId":"session_mode_settings_api_v1_cli_hosts_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["cli-hosts"],"summary":"Save Session Mode Settings","operationId":"save_session_mode_settings_api_v1_cli_hosts_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionModeSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cli-hosts/sessions":{"post":{"tags":["cli-hosts"],"summary":"Open Session","description":"PRD-239 S7 v2: the Runtime Canvas. Picking a session agent in a chat (or\nreopening it) gets ONE ticket per chat + agent whose Claude Code session the\nCanvas terminal starts or resumes on the operator's paired host. Nothing is\ndispatched: the human drives the session.","operationId":"open_session_api_v1_cli_hosts_sessions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cli-hosts/pairing-codes":{"post":{"tags":["cli-hosts"],"summary":"Create Pairing Code","description":"Issue a one-time pairing code. Shown ONCE; expires in ten minutes.","operationId":"create_pairing_code_api_v1_cli_hosts_pairing_codes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingCodeCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cli-hosts/pair":{"post":{"tags":["cli-hosts"],"summary":"Pair","description":"Exchange a pairing code for a host token (returned exactly once).","operationId":"pair_api_v1_cli_hosts_pair_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__cli_hosts__PairRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cli-hosts/{host_id}/heartbeat":{"post":{"tags":["cli-hosts"],"summary":"Heartbeat","operationId":"heartbeat_api_v1_cli_hosts__host_id__heartbeat_post","parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Host Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cli-hosts/{host_id}/claim":{"post":{"tags":["cli-hosts"],"summary":"Claim","operationId":"claim_api_v1_cli_hosts__host_id__claim_post","parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Host Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cli-hosts/{host_id}/tasks/{task_id}/events":{"post":{"tags":["cli-hosts"],"summary":"Events","operationId":"events_api_v1_cli_hosts__host_id__tasks__task_id__events_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}},{"name":"host_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Host Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cli-hosts/{host_id}/tasks/{task_id}/files":{"put":{"tags":["cli-hosts"],"summary":"Upload File","description":"#848: one file the session left in the ticket's deliverables folder, as the\nraw request body, from a host that shares no folder with this backend.","operationId":"upload_file_api_v1_cli_hosts__host_id__tasks__task_id__files_put","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}},{"name":"host_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Host Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024,"title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cli-hosts/{host_id}/tasks/{task_id}/result":{"post":{"tags":["cli-hosts"],"summary":"Result","operationId":"result_api_v1_cli_hosts__host_id__tasks__task_id__result_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}},{"name":"host_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Host Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/session-tools/mcp":{"post":{"tags":["session-tools"],"summary":"Session Tools Mcp","description":"The MCP endpoint. JSON-RPC in, JSON-RPC out; 202 for a notification.","operationId":"session_tools_mcp_api_v1_session_tools_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/session-tools/manifest":{"get":{"tags":["session-tools"],"summary":"Session Tools Manifest","description":"What this session may call, for a human reading the ticket. The same list\nthe endpoint advertises — never a second definition.","operationId":"session_tools_manifest_api_v1_session_tools_manifest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Session Tools Manifest Api V1 Session Tools Manifest Get"}}}}}}},"/api/profile":{"get":{"tags":["profile"],"summary":"Get Profile","description":"Who the platform thinks is talking (every edition).","operationId":"get_profile_api_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}}}},"put":{"tags":["profile"],"summary":"Update Profile","description":"Edit the caller's own profile row, where profiles are edited in Automatos (the local edition).","operationId":"update_profile_api_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/provenance/{sha256}":{"get":{"tags":["Provenance"],"summary":"Check Provenance","description":"Whether a file with this SHA-256 is one Automatos AI made and marked.\n\nA plain ``def`` (AGENTS.md): one indexed read on a synchronous session, in the\nthreadpool. A re-encoded or edited file has a different hash and answers no.\nA database error answers 503; its text carries the bound hash, so only its type\nis logged.","operationId":"check_provenance_api_public_provenance__sha256__get","parameters":[{"name":"sha256","in":"path","required":true,"schema":{"type":"string","title":"Sha256"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Check Provenance Api Public Provenance  Sha256  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports":{"post":{"tags":["Content reports"],"summary":"Report Content","description":"File a report: 201 for a new one, 200 for one this reporter already made.\n\n``async def``: it awaits the rate limiter and the notice dispatcher. A new\nreport's moderation post runs after the response, from its summary text alone\n(never this request's session); a duplicate posts nothing.","operationId":"report_content_api_v1_reports_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Report Content Api V1 Reports Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mobile/pairing-codes":{"post":{"tags":["mobile"],"summary":"Create Pairing Code","description":"Mint a one-time code that pairs a phone or a browser to the caller. Shown once; ten minutes.\n\nIn enterprise a person makes ``mobile_codes_person`` codes a window (429 beyond), holds\none at a time, and none while they hold the most active devices (409 ``device_limit_reached``).","operationId":"create_pairing_code_api_v1_mobile_pairing_codes_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Create Pairing Code Api V1 Mobile Pairing Codes Post"}}}}}}},"/api/v1/mobile/pair":{"post":{"tags":["mobile"],"summary":"Pair","description":"Exchange a one-time code for a device token, returned exactly once (PUBLIC: module docstring).","operationId":"pair_api_v1_mobile_pair_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__mobile_devices__PairRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Pair Api V1 Mobile Pair Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mobile/sign-in/exchange":{"post":{"tags":["mobile"],"summary":"Exchange Sign In Code","description":"Exchange a phone's one-time sign-in code and its PKCE verifier for a device token, returned once.\n\nPUBLIC, as ``/pair`` is (PRD-277 US-603): the code and the verifier are the phone's only\ncredential. Any code found is spent, so a wrong verifier ends it. An unknown, used, expired or\nwrong-verifier code, or one whose person reached the device cap since Continue, is\n``401 {\"code\": \"invalid_sign_in_code\"}`` and nothing more. ``device:paired`` names a phone that\nkept its earlier row, and who had revoked it (``Exchanged.re_enrolment``).","operationId":"exchange_sign_in_code_api_v1_mobile_sign_in_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Exchange Sign In Code Api V1 Mobile Sign In Exchange Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mobile/devices":{"get":{"tags":["mobile"],"summary":"List Devices","description":"The caller's devices; a workspace owner/admin (and the local operator) sees the workspace's.","operationId":"list_devices_api_v1_mobile_devices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"object","title":"Response List Devices Api V1 Mobile Devices Get"}}}}}},"post":{"tags":["mobile"],"summary":"Register Device","description":"Register this phone, or update its row: ``{device_id, push_key}``, the key only the first time.","operationId":"register_device_api_v1_mobile_devices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterDeviceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Response Register Device Api V1 Mobile Devices Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mobile/devices/{device_id}":{"patch":{"tags":["mobile"],"summary":"Update Device","description":"Change the push switch, digest time or time zone of one of the caller's own devices.","operationId":"update_device_api_v1_mobile_devices__device_id__patch","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Device Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDeviceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Device Api V1 Mobile Devices  Device Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["mobile"],"summary":"Revoke Device","description":"Revoke a device (its person, or a workspace owner/admin); its next call is 401 device_revoked.","operationId":"revoke_device_api_v1_mobile_devices__device_id__delete","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Device Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Device Api V1 Mobile Devices  Device Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mobile/devices/{device_id}/rotate":{"post":{"tags":["mobile"],"summary":"Rotate Device Token","description":"Swap the calling device's token for a new one, returned once; the old one lives on briefly.","operationId":"rotate_device_token_api_v1_mobile_devices__device_id__rotate_post","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Device Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Rotate Device Token Api V1 Mobile Devices  Device Id  Rotate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/sign-out":{"post":{"tags":["auth"],"summary":"Sign Out","description":"Revoke the caller's own session and clear the cookie (US-303).","operationId":"sign_out_api_v1_auth_sign_out_post","responses":{"204":{"description":"Successful Response"}}}},"/api/v1/auth/people/{user_id}/sessions":{"get":{"tags":["auth"],"summary":"List Sessions","description":"A person's sessions, newest first, for an install admin.","operationId":"list_sessions_api_v1_auth_people__user_id__sessions_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":true}},"title":"Response List Sessions Api V1 Auth People  User Id  Sessions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/sessions/{session_id}/revoke":{"post":{"tags":["auth"],"summary":"Revoke Session","description":"End one session (US-303); ``revoked`` is false when it had already ended.\n\nA session a confirmed step-up replaced (US-406) had already ended, and its successor, a\ndifferent session, is still live: the answer is ``{\"revoked\": false, \"replaced\": true}``, and\nthis route leaves the successor as it is. Ending everything a person has is the \"end all\nsessions\" route, ``POST /people/{user_id}/sessions/revoke``.","operationId":"revoke_session_api_v1_auth_sessions__session_id__revoke_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Revoke Session Api V1 Auth Sessions  Session Id  Revoke Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/people/{user_id}/sessions/revoke":{"post":{"tags":["auth"],"summary":"Revoke Persons Sessions","description":"End every session of a person (US-303); how many were live.\n\nAn admin ending ANOTHER person's sessions also revokes every device that person holds, in the\nsame transaction (PRD-277 US-601, ``people.end_access_of``): a paired phone is their access too.\nAn admin ending their own sessions leaves their phones, which they manage in Settings.","operationId":"revoke_persons_sessions_api_v1_auth_people__user_id__sessions_revoke_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer"},"title":"Response Revoke Persons Sessions Api V1 Auth People  User Id  Sessions Revoke Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/people/{user_id}/deactivate":{"post":{"tags":["auth"],"summary":"Deactivate Person","description":"Deactivate a person: their sessions and devices end in the same transaction (US-303).","operationId":"deactivate_person_api_v1_auth_people__user_id__deactivate_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer"},"title":"Response Deactivate Person Api V1 Auth People  User Id  Deactivate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/people/{user_id}/system-role":{"post":{"tags":["auth"],"summary":"Set Install Role","description":"Give a person an install-wide role (US-405): make another install admin, or take it away.\n\nThe admin acts only on a person whose role theirs satisfies, gives only a role theirs satisfies,\nand never leaves the install without an active install admin (409). Audited.","operationId":"set_install_role_api_v1_auth_people__user_id__system_role_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallRoleChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Install Role Api V1 Auth People  User Id  System Role Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/oidc/start":{"get":{"tags":["auth"],"summary":"Start","description":"303 to the provider's sign-in page, with this browser's sign-in bound to it by cookie.\n\n``step_up=1`` (US-406) signs the person in again for the session this browser's cookie holds.\nA phone's start (US-603) names its app link, PKCE challenge and device; malformed is 400.","operationId":"start_api_v1_auth_oidc_start_get","parameters":[{"name":"return_to","in":"query","required":false,"schema":{"type":"string","default":"/","title":"Return To"}},{"name":"step_up","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Step Up"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/oidc/callback":{"get":{"tags":["auth"],"summary":"Callback","description":"303 to where the person was going, signed in; or to the sign-in page with the refusal's code.\n\nA phone's sign-in (US-603) goes to the confirmation page with its cookie and never gets a session\ncookie; its refusals go to its app link, or to the confirmation page (``_refused``).","operationId":"callback_api_v1_auth_oidc_callback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/oidc/phone/waiting":{"get":{"tags":["auth"],"summary":"Waiting","description":"What awaits the person in this browser, the four fields only; 404 ``nothing_waiting``.","operationId":"waiting_api_v1_auth_oidc_phone_waiting_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/oidc/phone/continue":{"post":{"tags":["auth"],"summary":"Continue Sign In","description":"Continue: the app link carrying the one-time code, once; the cookie cleared.","operationId":"continue_sign_in_api_v1_auth_oidc_phone_continue_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/oidc/phone/cancel":{"post":{"tags":["auth"],"summary":"Cancel Sign In","description":"Cancel: what waits is deleted and the cookie cleared; 204 whether or not anything waited.","operationId":"cancel_sign_in_api_v1_auth_oidc_phone_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Who Am I","description":"The session's person, their install role and their workspaces (US-501); 401 once it has ended.","operationId":"who_am_i_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response"}}}},"/api/v1/auth/sign-in-page":{"get":{"tags":["auth"],"summary":"Sign In Page","description":"The sign-in page's one button names the provider (US-502); public, one setting, nothing else.","operationId":"sign_in_page_api_v1_auth_sign_in_page_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/workspaces/{workspace_id}/team/waiting":{"get":{"tags":["team"],"summary":"List Waiting","description":"A page of the people waiting for a workspace, oldest first, for an install admin on this Team page.","operationId":"list_waiting_api_workspaces__workspace_id__team_waiting_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":1000000,"minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Waiting Api Workspaces  Workspace Id  Team Waiting Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/team/waiting/{user_id}":{"post":{"tags":["team"],"summary":"Give Workspace","description":"Make a waiting person a member of this workspace in ``role`` (US-504), audited.","operationId":"give_workspace_api_workspaces__workspace_id__team_waiting__user_id__post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiveWorkspace"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Give Workspace Api Workspaces  Workspace Id  Team Waiting  User Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mobile/push-consent":{"get":{"tags":["mobile"],"summary":"Get Push Consent","description":"The operator's answer: ``{agreed, answered, answered_at}``; 503 when it cannot be read.","operationId":"get_push_consent_api_v1_mobile_push_consent_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Push Consent Api V1 Mobile Push Consent Get"}}}}}},"put":{"tags":["mobile"],"summary":"Put Push Consent","description":"Record whether this install may send notifications through Expo, and when it was asked.","operationId":"put_push_consent_api_v1_mobile_push_consent_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushConsentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Put Push Consent Api V1 Mobile Push Consent Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mobile/push-settings":{"put":{"tags":["mobile"],"summary":"Put Push Settings","description":"Send the caller's workspace's question pushes generic, or with their text again.","operationId":"put_push_settings_api_v1_mobile_push_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Put Push Settings Api V1 Mobile Push Settings Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mobile/digest/now":{"post":{"tags":["mobile"],"summary":"Send Digest Now","description":"Today's brief for the caller, now: 202 queued; 429 within the interval; 503 when it cannot start.","operationId":"send_digest_now_api_v1_mobile_digest_now_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/automatos.json":{"get":{"tags":["mobile"],"summary":"Discovery Document","description":"The §4.1 discovery document: edition, addresses, sign-in modes and capabilities.","operationId":"discovery_document__well_known_automatos_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Discovery Document  Well Known Automatos Json Get"}}}}}}},"/api/proactive/suggestions":{"get":{"tags":["proactive"],"summary":"List Suggestions","description":"The suggestions in ``status``, newest first: the workspace's for an owner or admin, else the caller's.","operationId":"list_suggestions_api_proactive_suggestions_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["open","started","hidden","expired"],"type":"string","default":"open","title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/proactive/suggestions/{suggestion_id}/start":{"post":{"tags":["proactive"],"summary":"Start Suggestion","description":"Start the suggestion: the ticket it files, or the chat to open; 409 when it can't start now.","operationId":"start_suggestion_api_proactive_suggestions__suggestion_id__start_post","parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Suggestion Id"}},{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StartRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/proactive/suggestions/{suggestion_id}/hide":{"post":{"tags":["proactive"],"summary":"Hide Suggestion","description":"Hide the suggestion, never gated: its addressee, or an owner or admin.","operationId":"hide_suggestion_api_proactive_suggestions__suggestion_id__hide_post","parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Suggestion Id"}},{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/HideRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/proactive/runs":{"get":{"tags":["proactive"],"summary":"List Runs","description":"The workspace's check-in runs since ``since`` (the last 7 days by default), newest first.","operationId":"list_runs_api_proactive_runs_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}},{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/proactive/settings":{"get":{"tags":["proactive"],"summary":"Get Settings","description":"The workspace switch and its caps, each over its default, and the workspace's effective mode.","operationId":"get_settings_api_proactive_settings_get","parameters":[{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["proactive"],"summary":"Put Settings","description":"Switch the workspace's check-ins on or off and change its caps.","operationId":"put_settings_api_proactive_settings_put","parameters":[{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/proactive/me":{"get":{"tags":["proactive"],"summary":"Get My Settings","description":"The caller's own proactive settings in this workspace, ``{paused, quiet_start, quiet_end, timezone}``, and\nthe workspace's effective mode.","operationId":"get_my_settings_api_proactive_me_get","parameters":[{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["proactive"],"summary":"Put My Settings","description":"Pause or resume the caller's suggestions in this workspace, and set or clear their quiet hours.","operationId":"put_my_settings_api_proactive_me_put","parameters":[{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/proactive/brief/open":{"post":{"tags":["proactive"],"summary":"Open Brief","description":"The caller's brief for their local date: posted now, the day's message, or pending.","operationId":"open_brief_api_proactive_brief_open_post","parameters":[{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BriefOpenRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/proactive/follow-ups":{"get":{"tags":["proactive"],"summary":"List My Follow Ups","description":"The caller's own follow-ups in this workspace: pending ones by default, or all; in one chat when named.","operationId":"list_my_follow_ups_api_proactive_follow_ups_get","parameters":[{"name":"chat_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Chat Id"}},{"name":"status","in":"query","required":false,"schema":{"enum":["pending","all"],"type":"string","default":"pending","title":"Status"}},{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/proactive/follow-ups/{follow_up_id}/cancel":{"post":{"tags":["proactive"],"summary":"Cancel My Follow Up","description":"Cancel the caller's own pending follow-up; 409 when it already fired, was cancelled or was missed.","operationId":"cancel_my_follow_up_api_proactive_follow_ups__follow_up_id__cancel_post","parameters":[{"name":"follow_up_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMaximum":1000000000000000000,"exclusiveMinimum":0,"title":"Follow Up Id"}},{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/readiness":{"get":{"tags":["readiness"],"summary":"Get Readiness","description":"``Readiness@1``: the last check while it is held, else a check now.","operationId":"get_readiness_api_readiness_get","parameters":[{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/readiness/check":{"post":{"tags":["readiness"],"summary":"Check Readiness","description":"Check again: every item now, limited per workspace.","operationId":"check_readiness_api_readiness_check_post","parameters":[{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/approval-grants/{grant_id}/view":{"get":{"tags":["approval-grants"],"summary":"Get Approval View","description":"The ApprovalView@1 of the grant, or the Mission plan, ``grant_id`` names, in the caller's language. A room's\ncard is its asker's to read (PRD-289 §5.6): anyone else is answered as for a card that does not exist.","operationId":"get_approval_view_api_v1_approval_grants__grant_id__view_get","parameters":[{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","title":"Grant Id"}},{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Approval View Api V1 Approval Grants  Grant Id  View Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auto/calibration":{"get":{"tags":["auto"],"summary":"Read Calibration","description":"The caller's calibration in this workspace, and whether to offer it.","operationId":"read_calibration_api_auto_calibration_get","parameters":[{"name":"locale","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":35},{"type":"null"}],"title":"Locale"}},{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["auto"],"summary":"Offer Calibration","description":"The caller's answer to the consent line: declined, or one calibration posted.","operationId":"offer_calibration_api_auto_calibration_post","parameters":[{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalibrationConsent"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auto/calibration/{calibration_id}/lines/{line_id}/reject":{"post":{"tags":["auto"],"summary":"Reject Calibration Line","description":"Reject one line of the caller's calibration; Auto remembers the correction.","operationId":"reject_calibration_line_api_auto_calibration__calibration_id__lines__line_id__reject_post","parameters":[{"name":"calibration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Calibration Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9_-]+$","title":"Line Id"}},{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auto/calibration/{calibration_id}/accept":{"post":{"tags":["auto"],"summary":"Accept Calibration","description":"Sounds right: accept every line of the caller's calibration not rejected; Auto remembers each.","operationId":"accept_calibration_api_auto_calibration__calibration_id__accept_post","parameters":[{"name":"calibration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Calibration Id"}},{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/catalog":{"get":{"tags":["Marketplace"],"summary":"Get Catalog","description":"The catalogue (200), or 304 when ``If-None-Match`` names its ETag; 404 in the local edition; 503 when\nthe keys file or a theme.json can't be read, the catalogue is over its size, or another caller's build\noutlasts the wait with none held; 429 over the per-IP limit.","operationId":"get_catalog_api_marketplace_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/marketplace/catalog/files/{digest}/{path}":{"get":{"tags":["Marketplace"],"summary":"Get Catalog File","description":"A listed version's package or listed screenshot (200), or 304 when ``If-None-Match`` names its ETag; 403\nfor a service worker; 404 in the local edition and for anything else; 503 when storage fails or no rebuild\nslot comes free; 429 over the per-IP limit.","operationId":"get_catalog_file_api_marketplace_catalog_files__digest___path__get","parameters":[{"name":"digest","in":"path","required":true,"schema":{"type":"string","title":"Digest"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/marketplace/featured":{"get":{"tags":["Marketplace"],"summary":"Get Public Featured","description":"The Featured agents and the Popular agents and Playbooks, ``{featured, popular}`` (200), or 304 when\n``If-None-Match`` names its ETag; 404 in the local edition; 429 over the per-IP limit; 503 when the\ndatabase fails the read.","operationId":"get_public_featured_api_public_marketplace_featured_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/public/marketplace/counts":{"get":{"tags":["Marketplace"],"summary":"Get Public Counts","description":"The approved Marketplace agents and Playbooks counted, ``{items, installs}`` (200), or 304 when\n``If-None-Match`` names its ETag; 404 in the local edition; 429 over the per-IP limit; 503 when the\ndatabase fails the read.","operationId":"get_public_counts_api_public_marketplace_counts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/public/marketplace/{type}":{"get":{"tags":["Marketplace"],"summary":"Get Public Marketplace","description":"One page of the type's public items (200), or 304 when ``If-None-Match`` names its ETag; 404 in the\nlocal edition and for an unknown type; 422 for a limit or offset out of range; 429 over the per-IP\nlimit; 503 when the database fails the read.","operationId":"get_public_marketplace_api_public_marketplace__type__get","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","title":"Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":100000,"minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/cloud-sync/status":{"get":{"tags":["Marketplace"],"summary":"Get Cloud Sync Status","description":"The Sync's status: on or off, the origin in use, the last attempt, success and error, the counts,\nthe themes held from Automatos Cloud and whether the last success is over a week old.","operationId":"get_cloud_sync_status_api_marketplace_cloud_sync_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Cloud Sync Status Api Marketplace Cloud Sync Status Get"}}}}}}},"/api/marketplace/cloud-sync":{"post":{"tags":["Marketplace"],"summary":"Run Cloud Sync","description":"Sync now: pull the catalogue once, bring its plugins and items, move the unpinned installs to the newest\nCloud versions, and answer the counts (the whole Sync's), each item type's, the plugins waiting, the installs\nmoved, the themes whose update failed and the status; or why the Sync didn't run.","operationId":"run_cloud_sync_api_marketplace_cloud_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Run Cloud Sync Api Marketplace Cloud Sync Post"}}}}}}},"/api/marketplace/catalog/bundles/{revision}":{"get":{"tags":["Marketplace"],"summary":"Get Catalog Bundle","description":"A listed bundle's canonical bytes (200), or 304 when ``If-None-Match`` names its ETag; 404 in the\nlocal edition and for any revision the catalogue doesn't list; 503 when the database fails; 429 over\nthe per-IP limit.","operationId":"get_catalog_bundle_api_marketplace_catalog_bundles__revision__get","parameters":[{"name":"revision","in":"path","required":true,"schema":{"type":"string","title":"Revision"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/catalog/plugins/{slug}/{version}/package.zip":{"get":{"tags":["Marketplace"],"summary":"Get Catalog Plugin Package","description":"An exported plugin's zip (200), or 304 when ``If-None-Match`` names its ETag; 404 in the local\nedition and for any plugin or version the export doesn't list; 503 when the database or storage fails,\nor the build doesn't start within the wait; 429 over the per-IP limit.","operationId":"get_catalog_plugin_package_api_marketplace_catalog_plugins__slug___version__package_zip_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"version","in":"path","required":true,"schema":{"type":"string","title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/cloud-sync/items":{"get":{"tags":["Marketplace"],"summary":"Get Cloud Items","description":"The Cloud agents, Playbooks, packages and plugins this install holds, by the keys their installs take.","operationId":"get_cloud_items_api_marketplace_cloud_sync_items_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Cloud Items Api Marketplace Cloud Sync Items Get"}}}}}}},"/api/marketplace/cloud-sync/items/{kind}/{key}/disclosure":{"get":{"tags":["Marketplace"],"summary":"Get Cloud Item Disclosure","description":"Everything the Cloud item will use (its prompt, model, apps, skills, plugins, steps, members or reports),\nfrom this install's rows; 404 unless it is a Cloud item of that kind.","operationId":"get_cloud_item_disclosure_api_marketplace_cloud_sync_items__kind___key__disclosure_get","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Cloud Item Disclosure Api Marketplace Cloud Sync Items  Kind   Key  Disclosure Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/cloud-sync/updates":{"get":{"tags":["Marketplace"],"summary":"Get Cloud Updates","description":"This workspace's copies of Cloud agents and Playbooks with a newer version, and the Cloud plugins it\nenabled that have moved since.","operationId":"get_cloud_updates_api_marketplace_cloud_sync_updates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Cloud Updates Api Marketplace Cloud Sync Updates Get"}}}}}}},"/api/hosted-services":{"get":{"tags":["Editions"],"summary":"Get Hosted Services","description":"Which of Automatos's hosted services this install calls.","operationId":"get_hosted_services_api_hosted_services_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response Get Hosted Services Api Hosted Services Get"}}}}}}},"/api/modules":{"get":{"tags":["modules"],"summary":"List Modules","description":"Every module the install knows, with its states for this workspace.","operationId":"list_modules_api_modules_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Modules Api Modules Get"}}}}}}},"/api/modules/{module_id}":{"get":{"tags":["modules"],"summary":"Read Module","description":"One module, with its states for this workspace.","operationId":"read_module_api_modules__module_id__get","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Read Module Api Modules  Module Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/on":{"post":{"tags":["modules"],"summary":"Switch Module On","description":"Switch the module on in this workspace and mint its key; 409 with the reason when it may not be.","operationId":"switch_module_on_api_modules__module_id__on_post","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwitchOnBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Switch Module On Api Modules  Module Id  On Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/off":{"post":{"tags":["modules"],"summary":"Switch Module Off","description":"Switch the module off in this workspace and revoke its key; 409 while a module that needs it is on.\nWith no readable package, the workspace's row is switched off and its keys revoked (``{\"module\": null}``).","operationId":"switch_module_off_api_modules__module_id__off_post","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Switch Module Off Api Modules  Module Id  Off Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/install-request":{"post":{"tags":["modules"],"summary":"Request Module Install","description":"File one ticket asking for the module, or answer the open one; 409 for a module that can't be asked for.","operationId":"request_module_install_api_modules__module_id__install_request_post","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Request Module Install Api Modules  Module Id  Install Request Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/defaults/{kind}/{key}/replace":{"post":{"tags":["modules"],"summary":"Replace Module Default","description":"Replace this workspace's copy of the module's agent or Playbook with its newer default; 409 with the reason\nwhen there is none.","operationId":"replace_module_default_api_modules__module_id__defaults__kind___key__replace_post","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"kind","in":"path","required":true,"schema":{"type":"string","pattern":"^(agent|playbook)$","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Replace Module Default Api Modules  Module Id  Defaults  Kind   Key  Replace Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/package":{"put":{"tags":["modules"],"summary":"Put Module Package","description":"Add or replace the module's package; the module's row for this workspace. 422 says what to change;\n409 when another request added the same new module at the same moment.","operationId":"put_module_package_api_modules__module_id__package_put","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__module_packages__PackageBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Put Module Package Api Modules  Module Id  Package Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["modules"],"summary":"Delete Module Package","description":"Remove the module's package, switching it off and revoking its keys in every workspace; the rows stay.","operationId":"delete_module_package_api_modules__module_id__package_delete","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Module Package Api Modules  Module Id  Package Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/records":{"get":{"tags":["module-records"],"summary":"Read Record Types","description":"The module's types and actions as this caller may use them, whether anything may be written now and why\nnot, and when its records were last exported.","operationId":"read_record_types_api_modules__module_id__records_get","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Read Record Types Api Modules  Module Id  Records Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["module-records"],"summary":"Delete Module Records","description":"Delete every record of the module in this workspace, in any state of the module (D39): the owner, after\nthe fresh sign-in check and an export that finished after the newest change. A record its type still keeps\nstays: ``{deleted, kept}``.","operationId":"delete_module_records_api_modules__module_id__records_delete","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer"},"title":"Response Delete Module Records Api Modules  Module Id  Records Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/records/{type}":{"get":{"tags":["module-records"],"summary":"List Module Records","description":"A page of the type's records: ``limit``, ``cursor``, ``sort``, ``order`` and ``where.<field>`` filters.","operationId":"list_module_records_api_modules__module_id__records__type__get","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"type","in":"path","required":true,"schema":{"type":"string","title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Module Records Api Modules  Module Id  Records  Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["module-records"],"summary":"Create Module Record","description":"Make a record of the type from ``data``: 201 with the record.","operationId":"create_module_record_api_modules__module_id__records__type__post","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"type","in":"path","required":true,"schema":{"type":"string","title":"Type"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Module Record Api Modules  Module Id  Records  Type  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/records/{type}/count":{"get":{"tags":["module-records"],"summary":"Count Module Records","description":"How many of the type's records match the ``where.<field>`` filters.","operationId":"count_module_records_api_modules__module_id__records__type__count_get","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"type","in":"path","required":true,"schema":{"type":"string","title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Count Module Records Api Modules  Module Id  Records  Type  Count Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/records/{type}/{record_id}":{"get":{"tags":["module-records"],"summary":"Read Module Record","description":"One record of the type, in this workspace.","operationId":"read_module_record_api_modules__module_id__records__type___record_id__get","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"type","in":"path","required":true,"schema":{"type":"string","title":"Type"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Read Module Record Api Modules  Module Id  Records  Type   Record Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["module-records"],"summary":"Change Module Record","description":"Change the fields ``data`` names (a null removes an optional one); the whole record is checked again.","operationId":"change_module_record_api_modules__module_id__records__type___record_id__patch","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"type","in":"path","required":true,"schema":{"type":"string","title":"Type"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Change Module Record Api Modules  Module Id  Records  Type   Record Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["module-records"],"summary":"Delete Module Record","description":"Remove the record: 204. A record its type still keeps (``keep_days``) is a 409 naming the day it ends.","operationId":"delete_module_record_api_modules__module_id__records__type___record_id__delete","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"type","in":"path","required":true,"schema":{"type":"string","title":"Type"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/records/{type}/{record_id}/actions/{action}":{"post":{"tags":["module-records"],"summary":"Run Module Record Action","description":"Run a declared action of the type on the record: the record after it.","operationId":"run_module_record_action_api_modules__module_id__records__type___record_id__actions__action__post","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"type","in":"path","required":true,"schema":{"type":"string","title":"Type"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}},{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Module Record Action Api Modules  Module Id  Records  Type   Record Id  Actions  Action  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/records-export":{"post":{"tags":["module-records"],"summary":"Export Module Records","description":"A page of every record of the module here, for a manager in any state of the module, sensitive values\nincluded; the body's ``cursor`` continues (none, or no body, for the first page). The page with no\n``next_cursor`` marks the export as taken (the store stamps it).","operationId":"export_module_records_api_modules__module_id__records_export_post","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ExportBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Export Module Records Api Modules  Module Id  Records Export Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/pages/{page_id}":{"get":{"tags":["modules"],"summary":"Get Module Page","description":"The page as this caller sees it: its document, where it came from, and what the caller may do with it.","operationId":"get_module_page_api_modules__module_id__pages__page_id__get","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"page_id","in":"path","required":true,"schema":{"type":"string","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Module Page Api Modules  Module Id  Pages  Page Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/pages/{page_id}/opens":{"get":{"tags":["modules"],"summary":"Get Module Page Opens","description":"``{\"opens\": {<button id>: {\"room\": <id>} | {\"ticket\": <id>}}}``: what the page's room and ticket buttons open\nfor the record ``record``, only those this caller may open.","operationId":"get_module_page_opens_api_modules__module_id__pages__page_id__opens_get","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"page_id","in":"path","required":true,"schema":{"type":"string","title":"Page Id"}},{"name":"record","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Record"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Module Page Opens Api Modules  Module Id  Pages  Page Id  Opens Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/pages/{page_id}/version":{"put":{"tags":["modules"],"summary":"Put Module Page Version","description":"Save the workspace's own version of the page; the page as it now stands.","operationId":"put_module_page_version_api_modules__module_id__pages__page_id__version_put","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"page_id","in":"path","required":true,"schema":{"type":"string","title":"Page Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageVersionBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Put Module Page Version Api Modules  Module Id  Pages  Page Id  Version Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["modules"],"summary":"Delete Module Page Version","description":"Back to the module's default, with any version that waits; the page as it now stands.","operationId":"delete_module_page_version_api_modules__module_id__pages__page_id__version_delete","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"page_id","in":"path","required":true,"schema":{"type":"string","title":"Page Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Module Page Version Api Modules  Module Id  Pages  Page Id  Version Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/pages/{page_id}/compare":{"get":{"tags":["modules"],"summary":"Compare Module Page","description":"The two documents side by side, ``against`` the default or the version that waits, with what changed.","operationId":"compare_module_page_api_modules__module_id__pages__page_id__compare_get","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"page_id","in":"path","required":true,"schema":{"type":"string","title":"Page Id"}},{"name":"against","in":"query","required":true,"schema":{"type":"string","title":"Against"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Compare Module Page Api Modules  Module Id  Pages  Page Id  Compare Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/pages/{page_id}/versions/{version_id}/approve":{"post":{"tags":["modules"],"summary":"Approve Module Page Version","description":"Show the version that waits; the page as it now stands.","operationId":"approve_module_page_version_api_modules__module_id__pages__page_id__versions__version_id__approve_post","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"page_id","in":"path","required":true,"schema":{"type":"string","title":"Page Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Approve Module Page Version Api Modules  Module Id  Pages  Page Id  Versions  Version Id  Approve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/modules/{module_id}/pages/{page_id}/versions/{version_id}/refuse":{"post":{"tags":["modules"],"summary":"Refuse Module Page Version","description":"Drop the version that waits; the page as it now stands.","operationId":"refuse_module_page_version_api_modules__module_id__pages__page_id__versions__version_id__refuse_post","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"page_id","in":"path","required":true,"schema":{"type":"string","title":"Page Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Refuse Module Page Version Api Modules  Module Id  Pages  Page Id  Versions  Version Id  Refuse Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/menu":{"get":{"tags":["menu"],"summary":"Get Menu","description":"The menu this caller sees in this workspace: core's entries, then each visible module's.","operationId":"get_menu_api_menu_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Menu Api Menu Get"}}}}}}},"/api/settings/edition":{"get":{"tags":["settings"],"summary":"Get Edition","description":"What this install's edition offers (``edition_facts``).","operationId":"get_edition_api_settings_edition_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Edition Api Settings Edition Get"}}}}}}},"/api/settings/attention":{"get":{"tags":["settings"],"summary":"Get Attention","description":"The sections the caller sees that need attention, each with its word; none outside their sight.","operationId":"get_attention_api_settings_attention_get","parameters":[{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}},"title":"Response Get Attention Api Settings Attention Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/llm/azure/deployments":{"get":{"tags":["LLM Marketplace"],"summary":"List Deployments","description":"The deployments this workspace named, by name; never another workspace's.","operationId":"list_deployments_api_marketplace_llm_azure_deployments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LLMModelOut"},"type":"array","title":"Response List Deployments Api Marketplace Llm Azure Deployments Get"}}}}}},"post":{"tags":["LLM Marketplace"],"summary":"Add Deployment","description":"Name a deployment: active, this workspace's (the row is the deployment named), its facts borrowed. A name this\nworkspace already named is a 409; another workspace's deployment of the same name is no clash.","operationId":"add_deployment_api_marketplace_llm_azure_deployments_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AzureDeploymentCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketplace/llm/azure/deployments/{model_row_id}":{"patch":{"tags":["LLM Marketplace"],"summary":"Change Deployment","description":"Change a deployment this workspace named: which model it runs (its facts borrowed again), its size\nwhere the catalogue states none, its shown name. Never its name.","operationId":"change_deployment_api_marketplace_llm_azure_deployments__model_row_id__patch","parameters":[{"name":"model_row_id","in":"path","required":true,"schema":{"type":"integer","title":"Model Row Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AzureDeploymentChanges"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["LLM Marketplace"],"summary":"Remove Deployment","description":"Remove a deployment this workspace named, unless one of its agents uses it (the answer names them).","operationId":"remove_deployment_api_marketplace_llm_azure_deployments__model_row_id__delete","parameters":[{"name":"model_row_id","in":"path","required":true,"schema":{"type":"integer","title":"Model Row Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/models/azure/deployments":{"get":{"tags":["models"],"summary":"List Install Deployments","description":"The deployments named on the install's Azure, by name; never a workspace's own.","operationId":"list_install_deployments_api_models_azure_deployments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LLMModelOut"},"type":"array","title":"Response List Install Deployments Api Models Azure Deployments Get"}}}}}},"post":{"tags":["models"],"summary":"Add Install Deployment","description":"Name a deployment on the install's Azure: active, no workspace's, its facts borrowed. A name the\ninstall already named is a 409; a workspace's deployment of the same name is no clash.","operationId":"add_install_deployment_api_models_azure_deployments_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AzureDeploymentCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/models/azure/deployments/{model_row_id}":{"patch":{"tags":["models"],"summary":"Change Install Deployment","description":"Change a deployment named on the install's Azure: which model it runs (its facts borrowed again),\nits size where the catalogue states none, its shown name. Never its name.","operationId":"change_install_deployment_api_models_azure_deployments__model_row_id__patch","parameters":[{"name":"model_row_id","in":"path","required":true,"schema":{"type":"integer","title":"Model Row Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AzureDeploymentChanges"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMModelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["models"],"summary":"Remove Install Deployment","description":"Remove a deployment named on the install's Azure, unless an agent it serves uses it (409 with how\nmany agents, in how many workspaces).","operationId":"remove_install_deployment_api_models_azure_deployments__model_row_id__delete","parameters":[{"name":"model_row_id","in":"path","required":true,"schema":{"type":"integer","title":"Model Row Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/models/limit/models":{"get":{"tags":["models"],"summary":"Read Limit","description":"Whether the caller's workspace is limited to chosen models, its list, its default and whether the\ncaller may change them.","operationId":"read_limit_api_models_limit_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitOut"}}}}}},"post":{"tags":["models"],"summary":"Add To Limit","description":"Add models to the list. An unknown model, or one the install lock bars or that is no longer offered,\nrefuses the whole request (422) and nothing is written.","operationId":"add_to_limit_api_models_limit_models_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/models/limit/switch":{"put":{"tags":["models"],"summary":"Set Limit","description":"Switch the limit on or off. Without ``confirm``: the agents switching it on would stop, and nothing\nchanges. With it: done, after moving those agents to the default when ``move_agents`` is set.","operationId":"set_limit_api_models_limit_switch_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwitchIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/models/limit/models/remove":{"post":{"tags":["models"],"summary":"Take Off Limit","description":"Take models off the list. A model not on it refuses (422). Without ``confirm``: the agents this would\nstop while the limit is on, and nothing changes. With it: done, after moving them when asked.","operationId":"take_off_limit_api_models_limit_models_remove_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/models/agents/cannot-run":{"get":{"tags":["models"],"summary":"Agents That Cannot Run","description":"Each agent of the caller's workspace that cannot run, its reason and its fix; and those that run\nthrough a fallback, with the provider that serves them (R6).","operationId":"agents_that_cannot_run_api_models_agents_cannot_run_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CannotRunOut"}}}}}}},"/api/models/agents/move":{"post":{"tags":["models"],"summary":"Move Named Agents","description":"Move the named agents of the caller's workspace to the default or to their fix, each through the\nchecked save; the answer lists those moved and those not, with why.","operationId":"move_named_agents_api_models_agents_move_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/alerts/ingest":{"post":{"tags":["alerts"],"summary":"Ingest Alerts","operationId":"ingest_alerts_api_alerts_ingest_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-alert-source","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Alert-Source"}},{"name":"x-alert-priority","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Alert-Priority"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertManagerPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/alerts":{"get":{"tags":["alerts"],"summary":"List Alerts","operationId":"list_alerts_api_alerts_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/logs/query":{"get":{"tags":["logs"],"summary":"Query Logs","description":"Query logs from Loki (super-admin only — see router dependency).\n\nSupports raw LogQL or convenience parameters that auto-build the query.","operationId":"query_logs_api_logs_query_get","parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Raw LogQL query","title":"Query"},"description":"Raw LogQL query"},{"name":"service","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by service label","title":"Service"},"description":"Filter by service label"},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by log level","title":"Level"},"description":"Filter by log level"},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by workspace ID","title":"Workspace Id"},"description":"Filter by workspace ID"},{"name":"error_fingerprint","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by error fingerprint","title":"Error Fingerprint"},"description":"Filter by error fingerprint"},{"name":"request_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by request ID","title":"Request Id"},"description":"Filter by request ID"},{"name":"module","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by module","title":"Module"},"description":"Filter by module"},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start time (ISO8601 or relative)","title":"Start"},"description":"Start time (ISO8601 or relative)"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End time (ISO8601 or relative)","title":"End"},"description":"End time (ISO8601 or relative)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Max entries to return","default":100,"title":"Limit"},"description":"Max entries to return"},{"name":"direction","in":"query","required":false,"schema":{"type":"string","description":"Sort direction: backward or forward","default":"backward","title":"Direction"},"description":"Sort direction: backward or forward"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/logs/labels":{"get":{"tags":["logs"],"summary":"List Labels","description":"List available Loki label names (super-admin only).","operationId":"list_labels_api_logs_labels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/logs/label/{label_name}/values":{"get":{"tags":["logs"],"summary":"Label Values","description":"List values for a specific Loki label (super-admin only).","operationId":"label_values_api_logs_label__label_name__values_get","parameters":[{"name":"label_name","in":"path","required":true,"schema":{"type":"string","title":"Label Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/exports/{file_path}":{"get":{"tags":["Exports"],"summary":"Serve Export","description":"Serve exported files (charts, etc.) with authentication.","operationId":"serve_export_exports__file_path__get","parameters":[{"name":"file_path","in":"path","required":true,"schema":{"type":"string","title":"File Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health/ready":{"get":{"tags":["🏥 System Health"],"summary":"Readiness probe","operationId":"readiness_probe_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"tags":["🏥 System Health"],"summary":"🏥 System Health Check","description":"Get comprehensive system health status including all components and services","operationId":"health_check_health_get","responses":{"200":{"description":"Detailed system health information","content":{"application/json":{"schema":{}}}}}}},"/health/bootstrap":{"get":{"tags":["System Health"],"summary":"Bootstrap Report","description":"Detailed bootstrap stage timing and status report (PRD-123 Pattern #10)","operationId":"bootstrap_health_health_bootstrap_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health/endpoints":{"get":{"tags":["🏥 System Health"],"summary":"📡 API Endpoint Health","description":"Get health statistics for all API endpoints including call counts and response times","operationId":"api_endpoint_health_api_health_endpoints_get","responses":{"200":{"description":"API endpoint health and performance statistics","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"tags":["🏠 Getting Started"],"summary":"🏠 API Overview & Navigation","description":"Get comprehensive API information, endpoints overview, and quick navigation links","operationId":"root__get","responses":{"200":{"description":"API overview with navigation information","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ABSetRequest":{"properties":{"policy_a":{"type":"string","title":"Policy A"},"policy_b":{"type":"string","title":"Policy B"},"active":{"type":"string","title":"Active"}},"type":"object","required":["policy_a","policy_b","active"],"title":"ABSetRequest"},"AcceptInvitationRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"AcceptInvitationRequest"},"AcceptInvitationResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"workspace_name":{"type":"string","title":"Workspace Name"},"role":{"type":"string","title":"Role"},"already_member":{"type":"boolean","title":"Already Member"}},"type":"object","required":["workspace_id","workspace_name","role","already_member"],"title":"AcceptInvitationResponse"},"ActionLeaderboardEntry":{"properties":{"action_name":{"type":"string","title":"Action Name"},"app_name":{"type":"string","title":"App Name"},"total_usage_count":{"type":"integer","title":"Total Usage Count"},"agent_count":{"type":"integer","title":"Agent Count"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["action_name","app_name","total_usage_count","agent_count"],"title":"ActionLeaderboardEntry"},"ActionPerformance":{"properties":{"action_name":{"type":"string","title":"Action Name"},"app_name":{"type":"string","title":"App Name"},"total_calls":{"type":"integer","title":"Total Calls"},"success_count":{"type":"integer","title":"Success Count"},"error_count":{"type":"integer","title":"Error Count"},"error_rate":{"type":"number","title":"Error Rate"},"avg_latency_ms":{"type":"number","title":"Avg Latency Ms"},"max_latency_ms":{"type":"number","title":"Max Latency Ms"},"cache_hit_rate":{"type":"number","title":"Cache Hit Rate"},"last_executed":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Executed"}},"type":"object","required":["action_name","app_name","total_calls","success_count","error_count","error_rate","avg_latency_ms","max_latency_ms","cache_hit_rate"],"title":"ActionPerformance"},"ActionResponse":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"app_name":{"type":"string","title":"App Name"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters","default":{}},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["name","display_name","app_name"],"title":"ActionResponse","description":"Composio action information."},"AddMemberRequest":{"properties":{"type":{"type":"string","enum":["user","agent"],"title":"Type"},"id":{"type":"integer","maximum":2147483647.0,"exclusiveMinimum":0.0,"title":"Id"},"role":{"type":"string","title":"Role","default":"member"}},"additionalProperties":false,"type":"object","required":["type","id"],"title":"AddMemberRequest","description":"``POST /api/rooms/{room_id}/members``."},"AdminCostAnalyticsResponse":{"properties":{"total_platform_cost":{"type":"number","title":"Total Platform Cost"},"total_tokens":{"type":"integer","title":"Total Tokens"},"total_requests":{"type":"integer","title":"Total Requests"},"byok_split":{"anyOf":[{"$ref":"#/components/schemas/ByokCostSplit"},{"type":"null"}]},"cost_by_workspace":{"items":{"$ref":"#/components/schemas/WorkspaceCostEntry"},"type":"array","title":"Cost By Workspace"},"cost_by_provider":{"items":{"$ref":"#/components/schemas/CostBreakdown"},"type":"array","title":"Cost By Provider"},"daily_cost_trend":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Daily Cost Trend"}},"type":"object","required":["total_platform_cost","total_tokens","total_requests"],"title":"AdminCostAnalyticsResponse"},"AgentByFallbackOut":{"properties":{"agent_id":{"type":"integer","title":"Agent Id"},"name":{"type":"string","title":"Name"},"provider":{"type":"string","title":"Provider"},"provider_label":{"type":"string","title":"Provider Label"},"model_id":{"type":"string","title":"Model Id"},"is_auto":{"type":"boolean","title":"Is Auto","default":false},"served_by":{"type":"string","title":"Served By"},"served_by_label":{"type":"string","title":"Served By Label"},"message":{"type":"string","title":"Message"}},"type":"object","required":["agent_id","name","provider","provider_label","model_id","served_by","served_by_label","message"],"title":"AgentByFallbackOut"},"AgentCannotRunOut":{"properties":{"agent_id":{"type":"integer","title":"Agent Id"},"name":{"type":"string","title":"Name"},"provider":{"type":"string","title":"Provider"},"provider_label":{"type":"string","title":"Provider Label"},"model_id":{"type":"string","title":"Model Id"},"is_auto":{"type":"boolean","title":"Is Auto","default":false},"reason":{"$ref":"#/components/schemas/api__model_moves_out__ReasonOut"},"fix":{"anyOf":[{"$ref":"#/components/schemas/FixOut"},{"type":"null"}]}},"type":"object","required":["agent_id","name","provider","provider_label","model_id","reason"],"title":"AgentCannotRunOut"},"AgentCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"job_title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Job Title"},"agent_type":{"type":"string","title":"Agent Type"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"},"skill_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Skill Ids","default":[]},"tool_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Tool Ids","default":[]},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","default":[]},"marketplace_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marketplace Category"},"team":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Team"},"reports_to_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reports To Id"}},"type":"object","required":["name","agent_type"],"title":"AgentCreate"},"AgentDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"public_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team"},"reports_to_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reports To Id"},"agent_type":{"type":"string","title":"Agent Type"},"status":{"type":"string","title":"Status"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"},"performance_metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Performance Metrics"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"skills":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Skills","default":[]},"tools":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Tools","default":[]},"plugins":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Plugins","default":[]},"agent_model_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent Model Config"},"model_usage_stats":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Model Usage Stats"},"is_system_agent":{"type":"boolean","title":"Is System Agent","default":false},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"required_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Role"},"marketplace_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marketplace Category"},"session_tool_gaps":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Session Tool Gaps"},"unavailable":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unavailable"},"session_tool_groups":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Session Tool Groups"}},"type":"object","required":["id","name","description","agent_type","status","configuration","created_at","updated_at"],"title":"AgentDetailResponse","description":"One agent, with the session tool groups the agent page switches."},"AgentModelOut":{"properties":{"agent_id":{"type":"integer","title":"Agent Id"},"name":{"type":"string","title":"Name"},"provider":{"type":"string","title":"Provider"},"provider_label":{"type":"string","title":"Provider Label"},"model_id":{"type":"string","title":"Model Id"}},"type":"object","required":["agent_id","name","provider","provider_label","model_id"],"title":"AgentModelOut"},"AgentNotCallableOut":{"properties":{"agent_id":{"type":"integer","title":"Agent Id"},"name":{"type":"string","title":"Name"},"provider":{"type":"string","title":"Provider"},"provider_label":{"type":"string","title":"Provider Label"},"model_id":{"type":"string","title":"Model Id"},"is_auto":{"type":"boolean","title":"Is Auto","default":false},"reason":{"$ref":"#/components/schemas/api__model_moves_out__ReasonOut"}},"type":"object","required":["agent_id","name","provider","provider_label","model_id","reason"],"title":"AgentNotCallableOut"},"AgentOut":{"properties":{"agent_id":{"type":"integer","title":"Agent Id"},"name":{"type":"string","title":"Name"},"provider":{"type":"string","title":"Provider"},"model_id":{"type":"string","title":"Model Id"}},"type":"object","required":["agent_id","name","provider","model_id"],"title":"AgentOut"},"AgentPersonaOut":{"properties":{"agent_id":{"type":"integer","title":"Agent Id"},"persona_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Id"},"persona_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Name"},"persona_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona Slug"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"voice_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Description"},"custom_persona_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Persona Prompt"},"use_custom_persona":{"type":"boolean","title":"Use Custom Persona","default":false}},"type":"object","required":["agent_id"],"title":"AgentPersonaOut"},"AgentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"public_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Title"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team"},"reports_to_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reports To Id"},"agent_type":{"type":"string","title":"Agent Type"},"status":{"type":"string","title":"Status"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"},"performance_metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Performance Metrics"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"skills":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Skills","default":[]},"tools":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Tools","default":[]},"plugins":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Plugins","default":[]},"agent_model_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent Model Config"},"model_usage_stats":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Model Usage Stats"},"is_system_agent":{"type":"boolean","title":"Is System Agent","default":false},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"required_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Role"},"marketplace_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marketplace Category"},"session_tool_gaps":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Session Tool Gaps"},"unavailable":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unavailable"}},"type":"object","required":["id","name","description","agent_type","status","configuration","created_at","updated_at"],"title":"AgentResponse"},"AgentRunRequest":{"properties":{"input":{"type":"string","maxLength":20000,"minLength":1,"title":"Input","description":"What the agent should do."},"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title","description":"The ticket's title; the input's first line when left out."},"callback_url":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Callback Url","description":"An https URL the run's ending is POSTed to, signed with the workspace's signing secret."}},"additionalProperties":false,"type":"object","required":["input"],"title":"AgentRunRequest","description":"What the agent is asked to do."},"AgentSkillsResponse":{"properties":{"skills":{"items":{"$ref":"#/components/schemas/EnhancedSkillResponse"},"type":"array","title":"Skills"},"total_estimated_tokens":{"type":"integer","title":"Total Estimated Tokens","default":0},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning"}},"type":"object","required":["skills"],"title":"AgentSkillsResponse"},"AgentStatistics":{"properties":{"total_agents":{"type":"integer","title":"Total Agents"},"active_agents":{"type":"integer","title":"Active Agents"},"inactive_agents":{"type":"integer","title":"Inactive Agents"},"agents_by_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"Agents By Type"},"average_performance":{"type":"number","title":"Average Performance"},"total_executions":{"type":"integer","title":"Total Executions"},"successful_executions":{"type":"integer","title":"Successful Executions"},"failed_executions":{"type":"integer","title":"Failed Executions"}},"type":"object","required":["total_agents","active_agents","inactive_agents","agents_by_type","average_performance","total_executions","successful_executions","failed_executions"],"title":"AgentStatistics","description":"Agent statistics for dashboard"},"AgentStatus":{"type":"string","enum":["active","inactive","training","paused"],"title":"AgentStatus"},"AgentTemplate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"agent_type":{"$ref":"#/components/schemas/AgentType"},"default_skills":{"items":{"type":"string"},"type":"array","title":"Default Skills"},"default_configuration":{"additionalProperties":true,"type":"object","title":"Default Configuration"}},"type":"object","required":["name","description","agent_type","default_skills","default_configuration"],"title":"AgentTemplate","description":"Agent template for creation wizard"},"AgentToolEntry":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"app_name":{"type":"string","title":"App Name"},"usage_count":{"type":"integer","title":"Usage Count"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["tool_name","app_name","usage_count","enabled"],"title":"AgentToolEntry"},"AgentToolMapping":{"properties":{"agent_id":{"type":"integer","title":"Agent Id"},"agent_name":{"type":"string","title":"Agent Name"},"tools":{"items":{"$ref":"#/components/schemas/AgentToolEntry"},"type":"array","title":"Tools"}},"type":"object","required":["agent_id","agent_name","tools"],"title":"AgentToolMapping"},"AgentType":{"type":"string","enum":["custom","system","specialized","code_architect","security_expert","performance_optimizer","data_analyst","infrastructure_manager"],"title":"AgentType"},"AgentUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"job_title":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Job Title"},"agent_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Type"},"marketplace_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marketplace Category"},"status":{"anyOf":[{"$ref":"#/components/schemas/AgentStatus"},{"type":"null"}]},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"},"skill_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Skill Ids"},"tool_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Tool Ids"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"team":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Team"},"reports_to_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reports To Id"}},"type":"object","title":"AgentUpdate"},"AgentsToMoveOut":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/AgentNotCallableOut"},"type":"array","title":"Agents"},"total":{"type":"integer","title":"Total"},"more":{"type":"integer","title":"More"},"listed_max":{"type":"integer","title":"Listed Max","default":50},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["agents","total","more"],"title":"AgentsToMoveOut","description":"The agents whose model still cannot be called after a key (US-403), for \"Move them too\"."},"AiLabelRequest":{"properties":{"on":{"type":"boolean","title":"On"}},"additionalProperties":false,"type":"object","required":["on"],"title":"AiLabelRequest","description":"The post's AI-generated label: on or off (unknown fields are refused)."},"Alert":{"properties":{"status":{"type":"string","title":"Status"},"labels":{"additionalProperties":true,"type":"object","title":"Labels"},"annotations":{"additionalProperties":true,"type":"object","title":"Annotations","default":{}},"startsAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Startsat"},"endsAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endsat"},"generatorURL":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generatorurl"},"fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fingerprint"}},"type":"object","required":["status","labels"],"title":"Alert"},"AlertManagerPayload":{"properties":{"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"groupKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Groupkey"},"truncatedAlerts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Truncatedalerts","default":0},"status":{"type":"string","title":"Status"},"receiver":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receiver"},"groupLabels":{"additionalProperties":true,"type":"object","title":"Grouplabels","default":{}},"commonLabels":{"additionalProperties":true,"type":"object","title":"Commonlabels","default":{}},"commonAnnotations":{"additionalProperties":true,"type":"object","title":"Commonannotations","default":{}},"externalURL":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalurl"},"alerts":{"items":{"$ref":"#/components/schemas/Alert"},"type":"array","title":"Alerts"}},"type":"object","required":["status","alerts"],"title":"AlertManagerPayload"},"AnswerRequest":{"properties":{"answer_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer Text"},"option":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Option"}},"type":"object","title":"AnswerRequest","description":"The human's answer: free text and/or one of the offered options."},"ApiKeyCreate":{"properties":{"provider":{"type":"string","title":"Provider","description":"LLM provider name"},"api_key":{"type":"string","title":"Api Key","description":"The raw API key (may be empty where the provider's key is optional)"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Friendly label"},"base_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Base Url","description":"The key's own endpoint (Azure: https://<resource>.openai.azure.com)"},"workspace_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Workspace Id","description":"Anthropic only: the workspace an organization-level key bills (wrkspc_…)"}},"type":"object","required":["provider","api_key"],"title":"ApiKeyCreate"},"ApiKeyCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Human-readable key name"},"key_type":{"type":"string","title":"Key Type","description":"'public' or 'server'","default":"server"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","description":"Granted permission scopes"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Domains","description":"Origins allowed (required for public keys)"},"allowed_ips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Ips","description":"Not supported yet: a key's IP allow-list is not enforced, so a non-empty list is refused"},"rate_limit_requests":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Rate Limit Requests","description":"Max requests per minute"},"rate_limit_tokens":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Rate Limit Tokens","description":"Max tokens per minute"},"default_agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Agent Id","description":"Lock this key to a specific agent ID"},"team":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Team","description":"Lock this key to a specific team for document scoping"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Expiration timestamp (UTC)"},"model_allow_list":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"Model Allow List","description":"PRD-274: models a request through this key may ask a lean agent for, as [{provider, model_id}]; each must be on the agent's own list too"}},"type":"object","required":["name"],"title":"ApiKeyCreateRequest"},"ApiKeyCreateResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key":{"type":"string","title":"Key","description":"Full API key — shown only on creation"},"key_type":{"type":"string","title":"Key Type"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Domains"},"allowed_ips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Ips"},"rate_limit_requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Requests"},"rate_limit_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Tokens"},"default_agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Agent Id"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team"},"model_allow_list":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"Model Allow List"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","name","key","key_type","permissions"],"title":"ApiKeyCreateResponse"},"ApiKeyListItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix","description":"Masked key prefix"},"key_type":{"type":"string","title":"Key Type"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Domains"},"allowed_ips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Ips"},"rate_limit_requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Requests"},"rate_limit_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Tokens"},"default_agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Agent Id"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"module_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module Id","description":"The module this key belongs to (PRD-288), or null"},"model_allow_list":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"Model Allow List","description":"PRD-287 US-408: the models a request through this key may name, as [{provider, model_id}]; null: none"}},"type":"object","required":["id","name","key_prefix","key_type","permissions"],"title":"ApiKeyListItem","description":"One key as the list shows it: masked, with the module it belongs to (PRD-288), if any."},"ApiKeyModelListUpdate":{"properties":{"model_allow_list":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"Model Allow List","description":"Models a request through this key may ask a lean agent for, as [{provider, model_id}]; null clears it"}},"additionalProperties":false,"type":"object","required":["model_allow_list"],"title":"ApiKeyModelListUpdate","description":"PRD-287 US-408: a server key's model allow-list, and nothing else. A list replaces it; null (or an empty\nlist) clears it. Any other field is refused, so this body can never change a key's scopes, name, type or\nexpiry."},"ApiKeyOut":{"properties":{"id":{"type":"integer","title":"Id"},"provider":{"type":"string","title":"Provider"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"masked_key":{"type":"string","title":"Masked Key"},"is_active":{"type":"boolean","title":"Is Active"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"usage_count":{"type":"integer","title":"Usage Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"validation":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyValidation"},{"type":"null"}]},"check_status":{"type":"string","title":"Check Status","default":"not_checked"},"checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked At"},"check_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check Message"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"set_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Set At"},"set_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Set By Name"},"auto_move":{"anyOf":[{"$ref":"#/components/schemas/AutoMoveOut"},{"type":"null"}]},"agents_to_move":{"anyOf":[{"$ref":"#/components/schemas/AgentsToMoveOut"},{"type":"null"}]}},"type":"object","required":["id","provider","display_name","masked_key","is_active","last_used_at","usage_count","created_at"],"title":"ApiKeyOut"},"ApiKeyTestResult":{"properties":{"valid":{"type":"boolean","title":"Valid"},"message":{"type":"string","title":"Message"},"provider":{"type":"string","title":"Provider"},"auto_move":{"anyOf":[{"$ref":"#/components/schemas/AutoMoveOut"},{"type":"null"}]},"agents_to_move":{"anyOf":[{"$ref":"#/components/schemas/AgentsToMoveOut"},{"type":"null"}]}},"type":"object","required":["valid","message","provider"],"title":"ApiKeyTestResult"},"ApiKeyValidation":{"properties":{"valid":{"type":"boolean","title":"Valid"},"message":{"type":"string","title":"Message"},"tested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Tested At"}},"type":"object","required":["valid","message"],"title":"ApiKeyValidation","description":"Live provider-test result carried on a key save (PRD-222 US-006).\n\nThe badge must never lie: a key is only trusted (``is_active`` / BYOK-enabled)\nwhen ``valid`` is True. The save response embeds this so the power-up card\n(US-013) renders the outcome in-flow, provider error text and all.\n\nPRD-287 R4: ``checked`` is False when nothing was asked (``NotChecked``), and ``failure`` says why a\ncheck failed (``FAILED_KEY``, ``FAILED_CHECK``, ``FAILED_ERROR``). Both stay on the server: the state\nthey decide is the key's own (``ApiKeyOut.check_status``)."},"AppOut":{"properties":{"id":{"type":"integer","title":"Id"},"app_name":{"type":"string","title":"App Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"auth_schemes":{"items":{"type":"string"},"type":"array","title":"Auth Schemes"},"action_count":{"type":"integer","title":"Action Count","default":0},"trigger_count":{"type":"integer","title":"Trigger Count","default":0},"status":{"type":"string","title":"Status","default":"ACTIVE"},"is_connected":{"type":"boolean","title":"Is Connected","default":false},"triggers":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Triggers"}},"type":"object","required":["id","app_name","display_name"],"title":"AppOut"},"AppResponse":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","default":[]},"is_connected":{"type":"boolean","title":"Is Connected","default":false},"action_count":{"type":"integer","title":"Action Count","default":0},"auth_schemes":{"items":{"type":"string"},"type":"array","title":"Auth Schemes","default":[]},"triggers":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Triggers","default":[]},"trigger_count":{"type":"integer","title":"Trigger Count","default":0}},"type":"object","required":["name","display_name"],"title":"AppResponse","description":"Composio app information."},"ApprovalPolicyRequest":{"properties":{"policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy","description":"always_ask | auto_below_budget | full_auto"},"approval_dollar_ceiling":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Approval Dollar Ceiling"},"auto_proceed_after_seconds":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Auto Proceed After Seconds"}},"type":"object","title":"ApprovalPolicyRequest"},"ApproveBatchRequest":{"properties":{"posts":{"items":{"$ref":"#/components/schemas/ShownPostRequest"},"type":"array","maxItems":200,"minItems":1,"title":"Posts"},"comment":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Comment"}},"additionalProperties":false,"type":"object","required":["posts"],"title":"ApproveBatchRequest"},"ApproveRequest":{"properties":{"content_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Content Hash"},"override_unsourced":{"type":"boolean","title":"Override Unsourced","default":false},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"post_now":{"type":"boolean","title":"Post Now","default":false}},"additionalProperties":false,"type":"object","required":["content_hash"],"title":"ApproveRequest"},"ApproveSeriesRequest":{"properties":{"posts":{"items":{"$ref":"#/components/schemas/ShownPostRequest"},"type":"array","maxItems":200,"minItems":1,"title":"Posts"},"comment":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Comment"}},"additionalProperties":false,"type":"object","required":["posts"],"title":"ApproveSeriesRequest"},"ArmVoiceRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Retell API key (first arm)"},"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id","description":"Voice for the created agent"}},"type":"object","title":"ArmVoiceRequest","description":"One-click arming from the Auto Live card (S7)."},"AssembleRequest":{"properties":{"q":{"type":"string","title":"Q"},"slot_values":{"additionalProperties":{"type":"string"},"propertyNames":{"enum":["INSTRUCTION","MEMORY","RETRIEVAL","CODE","TOOLS","CONSTRAINTS"]},"type":"object","title":"Slot Values"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["q","slot_values"],"title":"AssembleRequest"},"AttachmentResponse":{"properties":{"attachment_id":{"type":"string","title":"Attachment Id"},"filename":{"type":"string","title":"Filename"},"mime":{"type":"string","title":"Mime"},"media_type":{"type":"string","title":"Media Type"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["attachment_id","filename","mime","media_type","size_bytes"],"title":"AttachmentResponse","description":"Response model for attachment uploads."},"AutoMoveOut":{"properties":{"moved":{"type":"boolean","title":"Moved"},"code":{"type":"string","title":"Code"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["moved","code"],"title":"AutoMoveOut","description":"What a passing key did to Auto (US-402). ``reason`` says why Auto, which cannot run, did not move."},"AutoReindexRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"AutoReindexRequest","description":"Toggle push-driven auto-reindex for a project (PRD-183 S4, F022)."},"AzureDeploymentChanges":{"properties":{"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"base_model":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Base Model"},"context_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Window"},"max_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Output Tokens"},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"AzureDeploymentChanges","description":"``PATCH /deployments/{id}``: any of these. ``max_output_tokens: null`` resets it to the default.\n``model_id`` is accepted only to refuse a new name with a sentence: the name cannot change."},"AzureDeploymentCreate":{"properties":{"model_id":{"type":"string","maxLength":255,"minLength":1,"title":"Model Id"},"base_model":{"type":"string","maxLength":100,"minLength":1,"title":"Base Model"},"context_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Window"},"max_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Output Tokens"},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["model_id","base_model"],"title":"AzureDeploymentCreate","description":"``POST /deployments``. ``model_id`` is the deployment's name as Azure shows it; ``base_model`` the\nmodel it runs. A size is taken only when the catalogue has no entry for that model."},"BatchFeatureToggleRequest":{"properties":{"features":{"items":{"$ref":"#/components/schemas/FeatureToggleRequest"},"type":"array","title":"Features"}},"type":"object","required":["features"],"title":"BatchFeatureToggleRequest","description":"Request to toggle multiple features."},"Body_apply_retention_api_deliverables_retention_post":{"properties":{"source_type":{"type":"string","title":"Source Type","default":"heartbeat"},"keep_per_agent":{"type":"integer","title":"Keep Per Agent","default":50}},"type":"object","title":"Body_apply_retention_api_deliverables_retention_post"},"Body_handle_request_api_documents_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"},"team_access":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Access"}},"type":"object","required":["file"],"title":"Body_handle_request_api_documents_upload_post"},"Body_import_graph_api_knowledge_graph_import_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"merge":{"type":"boolean","title":"Merge","default":false}},"type":"object","required":["file"],"title":"Body_import_graph_api_knowledge_graph_import_post"},"Body_import_theme_api_themes_import_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"signature":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Signature"}},"type":"object","required":["file"],"title":"Body_import_theme_api_themes_import_post"},"Body_submit_theme_api_marketplace_themes_submit_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_submit_theme_api_marketplace_themes_submit_post"},"Body_upload_attachment_api_attachments_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_attachment_api_attachments_post"},"Body_upload_brand_font_api_documents_brand_kit_fonts_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"family":{"type":"string","title":"Family"},"weight":{"type":"integer","title":"Weight","default":400},"style":{"type":"string","title":"Style","default":"normal"}},"type":"object","required":["file","family"],"title":"Body_upload_brand_font_api_documents_brand_kit_fonts_post"},"Body_upload_brand_logo_api_documents_brand_kit_logo_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_brand_logo_api_documents_brand_kit_logo_post"},"Body_upload_brand_logo_dark_api_documents_brand_kit_logo_dark_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_brand_logo_dark_api_documents_brand_kit_logo_dark_post"},"Body_upload_brand_logo_mark_api_documents_brand_kit_logo_mark_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_brand_logo_mark_api_documents_brand_kit_logo_mark_post"},"Body_upload_brand_logo_mono_api_documents_brand_kit_logo_mono_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_brand_logo_mono_api_documents_brand_kit_logo_mono_post"},"Body_upload_cover_image_api_blog_cover_image_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_cover_image_api_blog_cover_image_upload_post"},"Body_upload_document_multimodal_api_knowledge_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"team_access":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Access"},"extract_tables":{"type":"boolean","title":"Extract Tables","default":true},"extract_images":{"type":"boolean","title":"Extract Images","default":true},"extract_formulas":{"type":"boolean","title":"Extract Formulas","default":true}},"type":"object","required":["file"],"title":"Body_upload_document_multimodal_api_knowledge_upload_post"},"Body_upload_docx_template_api_documents_templates_upload_post":{"properties":{"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category","default":"general"},"description":{"type":"string","title":"Description"},"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["name","file"],"title":"Body_upload_docx_template_api_documents_templates_upload_post"},"Body_upload_mission_file_api_missions_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_mission_file_api_missions_upload_post"},"Body_upload_plugin_api_admin_plugins_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"source_type":{"type":"string","title":"Source Type","default":"upload"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"}},"type":"object","required":["file"],"title":"Body_upload_plugin_api_admin_plugins_upload_post"},"Body_upload_social_post_media_api_socials_posts__post_id__media_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"slot":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Slot"}},"type":"object","title":"Body_upload_social_post_media_api_socials_posts__post_id__media_post"},"Body_upload_style_reference_api_documents_brand_kit_references_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"note":{"type":"string","title":"Note","default":""},"stance":{"type":"string","title":"Stance","default":"like"}},"type":"object","required":["file"],"title":"Body_upload_style_reference_api_documents_brand_kit_references_post"},"BrandKitPut":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"tagline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tagline"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"primary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Color"},"secondary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secondary Color"},"text_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Color"},"font_family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Font Family"},"company":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Company"},"heading_font":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Heading Font"},"logo_mark_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Mark Url"},"social_handles":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Social Handles"},"voice":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Voice"},"palette":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Palette"},"palette_source":{"anyOf":[{"type":"string","const":"derived"},{"additionalProperties":{"type":"string","enum":["set","derived"]},"type":"object"},{"type":"null"}],"title":"Palette Source"},"accent_use":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent Use"},"type_scale":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Type Scale"},"spacing_unit_pt":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spacing Unit Pt"},"page_margin_mm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Page Margin Mm"},"logo_rules":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Logo Rules"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"date_style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Style"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"if_updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"If Updated At"}},"type":"object","title":"BrandKitPut","description":"The PUT's body: a kit patch and, optionally, the kit's ``updated_at`` as the caller loaded it (F372).\n\nSent (the Brand kit page sends it with every save), a stamp that is no longer the\nstored one is a 409 and nothing is saved: checked on the workspace row locked for the\nwrite (``brand_kit.update_brand_kit``), so two saves loaded at one stamp never both\npass. Left out (the agent tool, the designer's save, an API caller), the PUT saves as\nit always did. Not a kit field."},"BriefOpenRequest":{"properties":{"local_date":{"type":"string","format":"date","title":"Local Date"},"timezone":{"type":"string","maxLength":64,"minLength":1,"title":"Timezone"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"}},"additionalProperties":false,"type":"object","required":["local_date","timezone"],"title":"BriefOpenRequest","description":"``POST /brief/open``: the caller's local date, their IANA time zone and, optionally, their language."},"BugReportContext":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"viewport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Viewport"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"console_errors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Console Errors"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","title":"BugReportContext"},"BugReportRequest":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"description":{"type":"string","maxLength":5000,"minLength":1,"title":"Description"},"severity":{"type":"string","title":"Severity","default":"Minor"},"category":{"type":"string","title":"Category","default":"Other"},"screenshot_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screenshot Base64"},"context":{"$ref":"#/components/schemas/BugReportContext"}},"type":"object","required":["title","description"],"title":"BugReportRequest"},"BugReportResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"jira_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Key"},"jira_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jira Url"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"BugReportResponse"},"BulkUpdateItem":{"properties":{"id":{"type":"integer","title":"Id"},"value":{"type":"string","title":"Value","default":""},"remove":{"type":"boolean","title":"Remove","default":false},"set_here":{"type":"boolean","title":"Set Here","description":"The person chose this value on the screen, even if it equals the value shown.","default":false}},"type":"object","required":["id"],"title":"BulkUpdateItem","description":"One item of a bulk update: the row's new ``value``; or, for a secret only, ``remove: true``,\nwhich empties it. A secret sent with an empty ``value`` keeps the value it has. ``set_here: true`` says a\nperson chose the value on a screen: see ``_chosen_here``."},"ByokCostSplit":{"properties":{"platform_cost":{"type":"number","title":"Platform Cost"},"platform_requests":{"type":"integer","title":"Platform Requests"},"byok_cost":{"type":"number","title":"Byok Cost"},"byok_requests":{"type":"integer","title":"Byok Requests"}},"type":"object","required":["platform_cost","platform_requests","byok_cost","byok_requests"],"title":"ByokCostSplit"},"CadenceRow":{"properties":{"id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Id"},"channels":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Channels"},"format":{"type":"string","title":"Format"},"length_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Length Seconds"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"days":{"items":{"type":"string"},"type":"array","maxItems":7,"minItems":1,"title":"Days"},"time":{"type":"string","title":"Time"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"visual":{"anyOf":[{"$ref":"#/components/schemas/RowVisual"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["channels","format","days","time"],"title":"CadenceRow"},"CalibrationConsent":{"properties":{"consent":{"type":"boolean","title":"Consent"},"chat_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Chat Id"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"}},"additionalProperties":false,"type":"object","required":["consent"],"title":"CalibrationConsent","description":"``POST /calibration``: the answer to the consent line, the chat the person is in, their language."},"CallbackAccepted":{"properties":{"accepted":{"type":"boolean","title":"Accepted"},"request_id":{"type":"string","title":"Request Id"},"eta_phrase":{"type":"string","title":"Eta Phrase"}},"type":"object","required":["accepted","request_id","eta_phrase"],"title":"CallbackAccepted"},"CallbackRequest":{"properties":{"session_id":{"type":"string","maxLength":64,"minLength":1,"title":"Session Id"},"phone":{"type":"string","maxLength":32,"title":"Phone"},"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"product_context":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Product Context"},"urgency":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Urgency"},"preferred_time":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Preferred Time"}},"type":"object","required":["session_id","phone","name"],"title":"CallbackRequest"},"CallbackTestDestinationResult":{"properties":{"destination_type":{"type":"string","title":"Destination Type"},"success":{"type":"boolean","title":"Success"},"latency_ms":{"type":"integer","title":"Latency Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target"}},"type":"object","required":["destination_type","success","latency_ms"],"title":"CallbackTestDestinationResult"},"CallbackTestResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"destinations_attempted":{"type":"integer","title":"Destinations Attempted"},"results":{"items":{"$ref":"#/components/schemas/CallbackTestDestinationResult"},"type":"array","title":"Results"}},"type":"object","required":["request_id","destinations_attempted","results"],"title":"CallbackTestResponse"},"CancelTurnRequest":{"properties":{"messageId":{"type":"string","format":"uuid","title":"Messageid"}},"additionalProperties":false,"type":"object","required":["messageId"],"title":"CancelTurnRequest","description":"``POST /api/rooms/{room_id}/cancel``: the person's message whose post's turns stop."},"CannotRunOut":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/AgentCannotRunOut"},"type":"array","title":"Agents"},"total":{"type":"integer","title":"Total"},"more":{"type":"integer","title":"More"},"listed_max":{"type":"integer","title":"Listed Max","default":100},"running_by_fallback":{"items":{"$ref":"#/components/schemas/AgentByFallbackOut"},"type":"array","title":"Running By Fallback"},"limited":{"type":"boolean","title":"Limited"}},"type":"object","required":["agents","total","more","running_by_fallback","limited"],"title":"CannotRunOut"},"CanvasAutoAcceptRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"CanvasAutoAcceptRequest"},"CanvasCommitRequest":{"properties":{"message":{"type":"string","maxLength":4096,"minLength":1,"title":"Message"},"cwd":{"type":"string","maxLength":1024,"minLength":1,"title":"Cwd"},"remote":{"type":"string","maxLength":128,"title":"Remote","default":"origin"}},"type":"object","required":["message","cwd"],"title":"CanvasCommitRequest"},"CanvasDecisionRequest":{"properties":{"request_id":{"type":"string","maxLength":128,"minLength":1,"title":"Request Id"},"approved":{"type":"boolean","title":"Approved"}},"type":"object","required":["request_id","approved"],"title":"CanvasDecisionRequest"},"CanvasMessageRequest":{"properties":{"prompt":{"type":"string","maxLength":10000,"minLength":1,"title":"Prompt"}},"type":"object","required":["prompt"],"title":"CanvasMessageRequest"},"CapsChange":{"properties":{"max_model_runs_per_day":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Model Runs Per Day"},"max_suggestions_per_run":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Suggestions Per Run"},"max_new_per_person_per_day":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max New Per Person Per Day"},"max_open_per_person":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Open Per Person"},"max_open_per_agent":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Open Per Agent"},"min_interval_minutes":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Min Interval Minutes"},"max_interval_minutes":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Interval Minutes"}},"additionalProperties":false,"type":"object","title":"CapsChange","description":"The caps a ``PUT …/settings`` changes: each a whole number, or null for its default."},"CatalogOut":{"properties":{"models":{"items":{"$ref":"#/components/schemas/LLMModelOut"},"type":"array","title":"Models"},"total":{"type":"integer","title":"Total"},"providers":{"additionalProperties":{"type":"integer"},"type":"object","title":"Providers"},"provider_labels":{"additionalProperties":{"type":"string"},"type":"object","title":"Provider Labels"},"vendors":{"additionalProperties":{"type":"integer"},"type":"object","title":"Vendors"},"last_synced":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Last Synced"},"syncable":{"items":{"type":"string"},"type":"array","title":"Syncable"},"provider_groups":{"anyOf":[{"items":{"$ref":"#/components/schemas/ProviderGroupOut"},"type":"array"},{"type":"null"}],"title":"Provider Groups"},"limited":{"type":"boolean","title":"Limited","default":false}},"type":"object","required":["models","total","providers","provider_labels","vendors","last_synced","syncable"],"title":"CatalogOut"},"ChangeOut":{"properties":{"done":{"type":"boolean","title":"Done"},"preview":{"$ref":"#/components/schemas/PreviewOut"},"moved":{"items":{"$ref":"#/components/schemas/AgentOut"},"type":"array","title":"Moved"},"limit":{"$ref":"#/components/schemas/LimitOut"}},"type":"object","required":["done","preview","moved","limit"],"title":"ChangeOut"},"ChartGenerateRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Natural language query describing the chart"},"chart_type":{"$ref":"#/components/schemas/ChartType","description":"Chart type hint","default":"auto"}},"type":"object","required":["query"],"title":"ChartGenerateRequest"},"ChartGenerateResponse":{"properties":{"summary":{"type":"string","title":"Summary"},"charts":{"items":{"type":"string"},"type":"array","title":"Charts","description":"Base64-encoded PNG chart images"},"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data","description":"Raw data rows"}},"type":"object","required":["summary"],"title":"ChartGenerateResponse"},"ChartPreset":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"query":{"type":"string","title":"Query"},"chart_type":{"type":"string","title":"Chart Type"}},"type":"object","required":["id","title","description","query","chart_type"],"title":"ChartPreset"},"ChartType":{"type":"string","enum":["bar","line","pie","area","scatter","auto"],"title":"ChartType"},"ChatMessageRequest":{"properties":{"role":{"type":"string","title":"Role","default":"user"},"parts":{"anyOf":[{"items":{"$ref":"#/components/schemas/MessagePart"},"type":"array"},{"type":"null"}],"title":"Parts"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"attachment_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Attachment Ids"}},"type":"object","title":"ChatMessageRequest","description":"The message being sent: AI SDK ``parts``, or a plain ``content`` string."},"ChatRequest":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"message":{"$ref":"#/components/schemas/ChatMessageRequest"},"messages":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChatMessageRequest"},"type":"array"},{"type":"null"}],"title":"Messages"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"appContext":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"string"},{"type":"null"}],"title":"Appcontext"},"endUserId":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},{"type":"null"}],"title":"Enduserid"},"selectedVisibilityType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selectedvisibilitytype","default":"private"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"agentId":{"anyOf":[{"type":"integer"},{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agentid"},"missionMode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Missionmode","default":false},"planMode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Planmode","default":false},"spokenMode":{"type":"boolean","title":"Spokenmode","default":false},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"},"turnRef":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnref"}},"type":"object","required":["message"],"title":"ChatRequest","description":"The body of ``POST /api/chat``."},"ChatSessionRequest":{"properties":{"activeChatId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activechatid"},"draftOpen":{"type":"boolean","title":"Draftopen","default":false},"openChatIds":{"items":{"type":"string"},"type":"array","title":"Openchatids","default":[]},"lastReadAt":{"additionalProperties":true,"type":"object","title":"Lastreadat","default":{}}},"type":"object","title":"ChatSessionRequest"},"ChecklistUpdateRequest":{"properties":{"dismissed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dismissed"},"academy_done":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Academy Done"}},"type":"object","title":"ChecklistUpdateRequest"},"CheckoutBody":{"properties":{"kind":{"type":"string","enum":["plan","topup"],"title":"Kind"},"plan":{"anyOf":[{"type":"string","maxLength":32,"minLength":1},{"type":"null"}],"title":"Plan"},"accept_terms":{"type":"boolean","title":"Accept Terms","default":false}},"type":"object","required":["kind"],"title":"CheckoutBody"},"ChoiceBody":{"properties":{"choice":{"type":"string","maxLength":64,"minLength":1,"title":"Choice"}},"additionalProperties":false,"type":"object","required":["choice"],"title":"ChoiceBody","description":"``PUT /api/themes/choice``: 'classic' | 'studio' | an install id (else 400)."},"ClaimRequest":{"properties":{"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":1}},"type":"object","title":"ClaimRequest"},"CloneRequest":{"properties":{"repo_url":{"type":"string","title":"Repo Url","description":"Git clone URL (HTTPS)"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch","description":"Branch to clone (default: repo default)"}},"type":"object","required":["repo_url"],"title":"CloneRequest"},"CloudConnectionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"app_name":{"type":"string","title":"App Name"},"status":{"type":"string","title":"Status"},"connected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Connected At"},"sync_enabled":{"type":"boolean","title":"Sync Enabled","default":false},"total_documents_synced":{"type":"integer","title":"Total Documents Synced","default":0},"last_successful_sync":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Successful Sync"},"root_folder_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Folder Path"}},"type":"object","required":["id","app_name","status"],"title":"CloudConnectionResponse"},"CloudFileResponse":{"properties":{"external_file_id":{"type":"string","title":"External File Id"},"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path","default":""},"mime_type":{"type":"string","title":"Mime Type","default":""},"size":{"type":"integer","title":"Size","default":0},"modified_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modified At"},"is_synced":{"type":"boolean","title":"Is Synced","default":false},"sync_status":{"type":"string","title":"Sync Status","default":"pending"},"sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Error"},"chunk_count":{"type":"integer","title":"Chunk Count","default":0},"last_synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Synced At"}},"type":"object","required":["external_file_id","name"],"title":"CloudFileResponse"},"CodeQuestionRequest":{"properties":{"question":{"type":"string","minLength":1,"title":"Question","description":"Natural language question about the codebase"}},"type":"object","required":["question"],"title":"CodeQuestionRequest","description":"Request to ask a natural language question about code."},"ComponentHealth":{"properties":{"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"last_check":{"type":"string","format":"date-time","title":"Last Check"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"}},"type":"object","required":["name","status","last_check"],"title":"ComponentHealth","description":"Health status of individual system component"},"ComposeRequest":{"properties":{"brief":{"type":"string","maxLength":4000,"minLength":1,"title":"Brief"},"channels":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10},{"type":"null"}],"title":"Channels"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"length_seconds":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Length Seconds"},"given_variables":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string","maxLength":2000}]},"propertyNames":{"maxLength":120,"minLength":1},"type":"object","maxProperties":200},{"type":"null"}],"title":"Given Variables"}},"additionalProperties":false,"type":"object","required":["brief"],"title":"ComposeRequest"},"ConnectRequest":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"shop_domain":{"type":"string","title":"Shop Domain"},"access_token":{"type":"string","title":"Access Token"}},"type":"object","required":["workspace_id","shop_domain","access_token"],"title":"ConnectRequest"},"ConnectedAppStats":{"properties":{"app_name":{"type":"string","title":"App Name"},"status":{"type":"string","title":"Status"},"total_actions_used":{"type":"integer","title":"Total Actions Used"},"agent_count":{"type":"integer","title":"Agent Count"},"documents_synced":{"type":"integer","title":"Documents Synced"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["app_name","status","total_actions_used","agent_count","documents_synced"],"title":"ConnectedAppStats"},"ConnectionResponse":{"properties":{"app_name":{"type":"string","title":"App Name"},"status":{"type":"string","title":"Status"},"connected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Connected At"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id"}},"type":"object","required":["app_name","status"],"title":"ConnectionResponse","description":"App connection status."},"ConsolidateRequest":{"properties":{"memory_ids":{"items":{"type":"string"},"type":"array","title":"Memory Ids"},"strategy":{"type":"string","title":"Strategy","default":"merge"}},"type":"object","required":["memory_ids"],"title":"ConsolidateRequest"},"ContextAddRequest":{"properties":{"type":{"type":"string","title":"Type"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["type","content"],"title":"ContextAddRequest"},"ContextPolicy":{"properties":{"policy_id":{"type":"string","title":"Policy Id"},"slots":{"additionalProperties":{"$ref":"#/components/schemas/Slot"},"propertyNames":{"enum":["INSTRUCTION","MEMORY","RETRIEVAL","CODE","TOOLS","CONSTRAINTS"]},"type":"object","title":"Slots"},"max_total_chars":{"type":"integer","title":"Max Total Chars","default":12000},"version":{"type":"integer","title":"Version","default":1}},"type":"object","required":["policy_id","slots"],"title":"ContextPolicy"},"CorrectionRequest":{"properties":{"request_id":{"type":"string","format":"uuid","title":"Request Id"},"correct_agent_id":{"type":"integer","title":"Correct Agent Id"}},"type":"object","required":["request_id","correct_agent_id"],"title":"CorrectionRequest"},"CostBreakdown":{"properties":{"key":{"type":"string","title":"Key"},"input_cost":{"type":"number","title":"Input Cost"},"output_cost":{"type":"number","title":"Output Cost"},"total_cost":{"type":"number","title":"Total Cost"},"request_count":{"type":"integer","title":"Request Count"}},"type":"object","required":["key","input_cost","output_cost","total_cost","request_count"],"title":"CostBreakdown"},"CostProjectionResponse":{"properties":{"current_period_cost":{"type":"number","title":"Current Period Cost"},"daily_average":{"type":"number","title":"Daily Average"},"projected_monthly":{"type":"number","title":"Projected Monthly"},"change_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Percent"},"projected_by_model":{"items":{"$ref":"#/components/schemas/ProjectedItem"},"type":"array","title":"Projected By Model"},"projected_by_provider":{"items":{"$ref":"#/components/schemas/ProjectedItem"},"type":"array","title":"Projected By Provider"}},"type":"object","required":["current_period_cost","daily_average","projected_monthly"],"title":"CostProjectionResponse"},"CreateBlogMissionRequest":{"properties":{"topic":{"type":"string","maxLength":500,"minLength":3,"title":"Topic"},"category":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Category"}},"type":"object","required":["topic"],"title":"CreateBlogMissionRequest"},"CreateCampaignRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"approval_mode":{"type":"string","title":"Approval Mode","default":"per_post"}},"additionalProperties":false,"type":"object","required":["name"],"title":"CreateCampaignRequest"},"CreatePersonaBody":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"voice_description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Voice Description"},"category":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Category"},"suggested_temperature":{"type":"number","maximum":2.0,"minimum":0.0,"title":"Suggested Temperature","default":0.7}},"type":"object","required":["name"],"title":"CreatePersonaBody"},"CreatePostRequest":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"content":{"type":"string","minLength":1,"title":"Content"},"excerpt":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Excerpt"},"cover_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Image Url"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"status":{"type":"string","title":"Status","default":"draft"},"seo_title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Seo Title"},"seo_description":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Seo Description"}},"type":"object","required":["title","content"],"title":"CreatePostRequest"},"CreateReviewRequest":{"properties":{"rating":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Rating"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","required":["rating"],"title":"CreateReviewRequest"},"CreateRoomRequest":{"properties":{"title":{"type":"string","maxLength":255,"title":"Title"},"roomKind":{"type":"string","title":"Roomkind","default":"channel"},"members":{"items":{"$ref":"#/components/schemas/NewMemberRequest"},"type":"array","maxItems":200,"title":"Members"}},"additionalProperties":false,"type":"object","required":["title"],"title":"CreateRoomRequest","description":"``POST /api/rooms``."},"CreateRuleRequest":{"properties":{"source_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Pattern"},"intent_keywords":{"items":{"type":"string"},"type":"array","title":"Intent Keywords"},"target_agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Agent Id"},"target_workflow_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Workflow Id"},"priority":{"type":"integer","title":"Priority","default":0}},"type":"object","title":"CreateRuleRequest"},"CreateScheduledBoardTaskRequest":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description","default":""},"schedule":{"type":"string","title":"Schedule"},"task_type":{"type":"string","title":"Task Type","default":"one_shot"},"priority":{"type":"string","title":"Priority","default":"medium"},"assigned_agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assigned Agent Id"},"review_mode":{"type":"string","title":"Review Mode","default":"auto"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"max_runs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Runs"}},"type":"object","required":["title","schedule"],"title":"CreateScheduledBoardTaskRequest","description":"A board ticket to file later: what the Create Task dialog sends when the\noperator picks a time instead of \"now\"."},"CreateSiteRequest":{"properties":{"type":{"type":"string","title":"Type","description":"One of ['shopify', 'wix', 'woocommerce', 'custom']"},"display_name":{"type":"string","maxLength":255,"minLength":1,"title":"Display Name"},"external_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Id"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"}},"type":"object","required":["type","display_name"],"title":"CreateSiteRequest"},"CreateSkillBody":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"content":{"type":"string","minLength":1,"title":"Content","description":"SKILL.md content (frontmatter + body)"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"skill_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Type","description":"cognitive | technical | communication"},"acknowledge_warnings":{"type":"boolean","title":"Acknowledge Warnings","description":"Allow save when only 'high'-severity findings exist.","default":false}},"type":"object","required":["name","content"],"title":"CreateSkillBody"},"CreateSocialPostRequest":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"brief":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brief"},"copy":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Copy"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Variables"},"sources":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sources"},"media":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Media"},"voice":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Voice"},"footage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Footage"},"music":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Music"},"look":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Look"},"length_seconds":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Length Seconds"}},"additionalProperties":false,"type":"object","required":["title"],"title":"CreateSocialPostRequest"},"CreateTeamRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"CreateTeamRequest"},"CreateWidgetRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"display_name":{"type":"string","maxLength":200,"minLength":1,"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"long_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Long Description"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"pricing_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Type","default":"free"},"price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Cents"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url"},"screenshots":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Screenshots"},"readme":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Readme"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"bundle_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Url"},"permissions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Permissions"},"min_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Plan"}},"type":"object","required":["name","display_name"],"title":"CreateWidgetRequest"},"CredentialAuditLogResponse":{"properties":{"id":{"type":"integer","title":"Id"},"credential_id":{"type":"string","title":"Credential Id"},"tool_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Id"},"action":{"type":"string","title":"Action"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","required":["id","credential_id","tool_id","action","user_id","ip_address","success","error_message","timestamp"],"title":"CredentialAuditLogResponse","description":"Audit log entry"},"CredentialCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"User-friendly name"},"credential_type_id":{"type":"integer","title":"Credential Type Id","description":"ID of credential type"},"credential_data":{"additionalProperties":true,"type":"object","title":"Credential Data","description":"Credential field values (will be encrypted)"},"environment":{"type":"string","title":"Environment","description":"Target environment","default":"production"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tags for organization","default":[]},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Expiration date"}},"type":"object","required":["name","credential_type_id","credential_data"],"title":"CredentialCreate","description":"Create a new credential"},"CredentialResolveRequest":{"properties":{"credential_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credential Id","description":"Credential ID"},"credential_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credential Name","description":"Credential name"},"environment":{"type":"string","title":"Environment","description":"Environment","default":"production"},"service_name":{"type":"string","title":"Service Name","description":"Requesting service name"}},"type":"object","required":["service_name"],"title":"CredentialResolveRequest","description":"Internal request to resolve credential (for service use)"},"CredentialResolveResponse":{"properties":{"credential_id":{"type":"integer","title":"Credential Id"},"credential_name":{"type":"string","title":"Credential Name"},"credential_type":{"type":"string","title":"Credential Type"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"environment":{"type":"string","title":"Environment"},"resolved_at":{"type":"string","format":"date-time","title":"Resolved At"}},"type":"object","required":["credential_id","credential_name","credential_type","data","environment","resolved_at"],"title":"CredentialResolveResponse","description":"Decrypted credential data (internal use only)"},"CredentialResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"credential_type_id":{"type":"integer","title":"Credential Type Id"},"credential_type_name":{"type":"string","title":"Credential Type Name"},"credential_type_display_name":{"type":"string","title":"Credential Type Display Name"},"environment":{"type":"string","title":"Environment"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"is_active":{"type":"boolean","title":"Is Active"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"last_tested":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Tested"},"test_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Status"},"test_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Message"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"has_credentials":{"type":"boolean","title":"Has Credentials","description":"Indicates encrypted data exists","default":true},"field_names":{"items":{"type":"string"},"type":"array","title":"Field Names","description":"List of field names","default":[]},"credential_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Credential Data","description":"Decrypted credential values for editing"},"connection_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Status","description":"connected|pending_oauth|unsupported|bridge_error"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id"},"auth_config_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Config Id"},"auth_scheme":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Scheme"},"oauth_redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Redirect Url","description":"If status=pending_oauth, open in popup"},"connection_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Error"}},"type":"object","required":["id","name","credential_type_id","credential_type_name","credential_type_display_name","environment","description","tags","is_active","expires_at","last_tested","test_status","test_message","created_by","created_at","updated_at"],"title":"CredentialResponse","description":"Credential response with decrypted values for editing"},"CredentialTestResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"},"tested_at":{"type":"string","format":"date-time","title":"Tested At"}},"type":"object","required":["success","message","tested_at"],"title":"CredentialTestResponse","description":"Result of credential test"},"CredentialTypeResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"logo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"schema_definition":{"title":"Schema Definition","description":"Field definitions"},"test_endpoint":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Test Endpoint"},"documentation_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentation Url"},"is_system":{"type":"boolean","title":"Is System"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","display_name","category","icon","logo","description","schema_definition","test_endpoint","documentation_url","is_system","is_active","created_at","updated_at"],"title":"CredentialTypeResponse","description":"Credential type response"},"CredentialUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"New name"},"credential_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Credential Data","description":"Updated credential values"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Updated description"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Updated tags"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Active status"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Expiration date"}},"type":"object","title":"CredentialUpdate","description":"Update an existing credential"},"CreditAdjustBody":{"properties":{"credits":{"type":"integer","maximum":1000000.0,"minimum":-1000000.0,"title":"Credits"},"bucket":{"type":"string","enum":["trial","monthly","topup"],"title":"Bucket","default":"trial"},"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason"},"request_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$"},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["credits","reason"],"title":"CreditAdjustBody"},"DailyVolume":{"properties":{"date":{"type":"string","title":"Date"},"total":{"type":"integer","title":"Total"},"successes":{"type":"integer","title":"Successes"},"errors":{"type":"integer","title":"Errors"},"avg_latency_ms":{"type":"number","title":"Avg Latency Ms"}},"type":"object","required":["date","total","successes","errors","avg_latency_ms"],"title":"DailyVolume"},"DashboardMetrics":{"properties":{"agent_success_rate":{"type":"number","title":"Agent Success Rate"},"avg_task_completion_time":{"type":"number","title":"Avg Task Completion Time"},"system_load_trend":{"additionalProperties":true,"type":"object","title":"System Load Trend"},"error_rate_by_agent_type":{"additionalProperties":{"type":"number"},"type":"object","title":"Error Rate By Agent Type"},"queue_depth":{"type":"integer","title":"Queue Depth"},"resource_utilization_efficiency":{"type":"integer","title":"Resource Utilization Efficiency"}},"type":"object","required":["agent_success_rate","avg_task_completion_time","system_load_trend","error_rate_by_agent_type","queue_depth","resource_utilization_efficiency"],"title":"DashboardMetrics"},"DatabaseKnowledgeSourceCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"credential_id":{"type":"integer","title":"Credential Id"},"dialect":{"type":"string","title":"Dialect"},"connection_pool_size":{"type":"integer","title":"Connection Pool Size","default":5},"max_rows_limit":{"type":"integer","title":"Max Rows Limit","default":10000},"query_timeout_seconds":{"type":"integer","title":"Query Timeout Seconds","default":30},"schema_cache_ttl":{"type":"integer","title":"Schema Cache Ttl","default":3600},"query_cache_ttl":{"type":"integer","title":"Query Cache Ttl","default":300}},"type":"object","required":["name","credential_id","dialect"],"title":"DatabaseKnowledgeSourceCreate","description":"Request to create a database knowledge source"},"DatabaseQueryRequest":{"properties":{"query":{"type":"string","title":"Query"},"source_id":{"type":"integer","title":"Source Id"},"visualization_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visualization Hint"},"max_rows":{"type":"integer","title":"Max Rows","default":1000},"use_cache":{"type":"boolean","title":"Use Cache","default":true},"include_explanation":{"type":"boolean","title":"Include Explanation","default":true}},"type":"object","required":["query","source_id"],"title":"DatabaseQueryRequest","description":"Natural language query request"},"DeactivateRequest":{"properties":{"external_id":{"type":"string","title":"External Id"},"source":{"type":"string","title":"Source","default":"shopify"}},"type":"object","required":["external_id"],"title":"DeactivateRequest"},"DefaultBody":{"properties":{"installId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Installid"}},"additionalProperties":false,"type":"object","required":["installId"],"title":"DefaultBody","description":"``PUT /api/themes/default``: an install id, or null to clear the default."},"DefaultOut":{"properties":{"provider":{"type":"string","title":"Provider"},"model_id":{"type":"string","title":"Model Id"},"inside":{"type":"boolean","title":"Inside"}},"type":"object","required":["provider","model_id","inside"],"title":"DefaultOut"},"DeveloperAnalyticsOut":{"properties":{"total_widgets":{"type":"integer","title":"Total Widgets","default":0},"total_installs":{"type":"integer","title":"Total Installs","default":0},"total_reviews":{"type":"integer","title":"Total Reviews","default":0},"average_rating":{"type":"number","title":"Average Rating","default":0.0}},"type":"object","title":"DeveloperAnalyticsOut"},"DiffLine":{"properties":{"kind":{"type":"string","title":"Kind"},"text":{"type":"string","title":"Text"}},"type":"object","required":["kind","text"],"title":"DiffLine"},"DigestFeedbackRequest":{"properties":{"state_hash":{"type":"string","maxLength":64,"minLength":1,"title":"State Hash"},"rating":{"type":"integer","title":"Rating"}},"type":"object","required":["state_hash","rating"],"title":"DigestFeedbackRequest"},"DisconnectResponse":{"properties":{"status":{"type":"string","title":"Status"},"vectors_deleted":{"type":"boolean","title":"Vectors Deleted"},"documents_affected":{"type":"integer","title":"Documents Affected"}},"type":"object","required":["status","vectors_deleted","documents_affected"],"title":"DisconnectResponse"},"DocsCategoryItem":{"properties":{"tag":{"type":"string","title":"Tag"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["tag","count"],"title":"DocsCategoryItem"},"DocsDetailResponse":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","title","content"],"title":"DocsDetailResponse"},"DocsSearchItem":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"snippet":{"type":"string","title":"Snippet"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","required":["id","title","snippet"],"title":"DocsSearchItem"},"DocsSearchRequest":{"properties":{"query":{"type":"string","minLength":1,"title":"Query","description":"Search query"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","description":"Max results","default":10},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team","description":"Team filter override"}},"type":"object","required":["query"],"title":"DocsSearchRequest"},"DocsSearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"results":{"items":{"$ref":"#/components/schemas/DocsSearchItem"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["query","results","total"],"title":"DocsSearchResponse"},"DocumentDetail":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","title","content"],"title":"DocumentDetail","description":"Full document returned by GET /documents/{document_id}."},"DocumentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"filename":{"type":"string","title":"Filename"},"original_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Filename"},"file_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Type"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash"},"status":{"type":"string","title":"Status"},"chunk_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Count"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"team_access":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Team Access"},"upload_date":{"type":"string","format":"date-time","title":"Upload Date"},"processed_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processed Date"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"last_accessed":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Accessed"},"rag_query_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rag Query Count","default":0},"source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type"},"kept_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kept Pct"},"partial":{"type":"boolean","title":"Partial","default":false}},"type":"object","required":["id","filename","original_filename","file_type","file_size","status","chunk_count","tags","description","upload_date","processed_date"],"title":"DocumentResponse"},"DocumentSearchItem":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"snippet":{"type":"string","title":"Snippet"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"}},"type":"object","required":["id","title","snippet"],"title":"DocumentSearchItem","description":"Single search result (one per surfaced document)."},"DocumentSearchRequest":{"properties":{"query":{"type":"string","minLength":1,"title":"Query","description":"Search query string"},"limit":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Limit","description":"Max results (1-20)","default":10}},"type":"object","required":["query"],"title":"DocumentSearchRequest","description":"Body for POST /documents/search."},"DocumentSearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"results":{"items":{"$ref":"#/components/schemas/DocumentSearchItem"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["query","results","total"],"title":"DocumentSearchResponse","description":"Response for POST /documents/search."},"DraftSourcesIn":{"properties":{"knowledge":{"type":"boolean","title":"Knowledge","default":true},"website":{"type":"boolean","title":"Website","default":true},"deliverables":{"type":"boolean","title":"Deliverables","default":true}},"additionalProperties":false,"type":"object","title":"DraftSourcesIn","description":"What research may read for the plan: the person's choice."},"EmailAddress":{"properties":{"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["email"],"title":"EmailAddress"},"EmailAttachment":{"properties":{"filename":{"type":"string","title":"Filename"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["filename"],"title":"EmailAttachment"},"EmailDetail":{"properties":{"id":{"type":"string","title":"Id"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snippet"},"from_address":{"anyOf":[{"$ref":"#/components/schemas/EmailAddress"},{"type":"null"}]},"to_addresses":{"items":{"$ref":"#/components/schemas/EmailAddress"},"type":"array","title":"To Addresses"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"is_read":{"type":"boolean","title":"Is Read","default":true},"has_attachments":{"type":"boolean","title":"Has Attachments","default":false},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"body_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Text"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html"},"cc_addresses":{"items":{"$ref":"#/components/schemas/EmailAddress"},"type":"array","title":"Cc Addresses"},"bcc_addresses":{"items":{"$ref":"#/components/schemas/EmailAddress"},"type":"array","title":"Bcc Addresses"},"attachments":{"items":{"$ref":"#/components/schemas/EmailAttachment"},"type":"array","title":"Attachments"},"in_reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"In Reply To"},"references":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"References"}},"type":"object","required":["id"],"title":"EmailDetail","description":"Full email body returned by the single-email endpoint."},"EmailDetailResponse":{"properties":{"email":{"$ref":"#/components/schemas/EmailDetail"},"provider":{"type":"string","title":"Provider","default":"composio"}},"type":"object","required":["email"],"title":"EmailDetailResponse"},"EmailListResponse":{"properties":{"emails":{"items":{"$ref":"#/components/schemas/EmailSummary"},"type":"array","title":"Emails"},"total":{"type":"integer","title":"Total"},"next_page_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Page Token"},"provider":{"type":"string","title":"Provider","default":"composio"}},"type":"object","required":["emails","total"],"title":"EmailListResponse"},"EmailSummary":{"properties":{"id":{"type":"string","title":"Id"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snippet"},"from_address":{"anyOf":[{"$ref":"#/components/schemas/EmailAddress"},{"type":"null"}]},"to_addresses":{"items":{"$ref":"#/components/schemas/EmailAddress"},"type":"array","title":"To Addresses"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"is_read":{"type":"boolean","title":"Is Read","default":true},"has_attachments":{"type":"boolean","title":"Has Attachments","default":false},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"}},"type":"object","required":["id"],"title":"EmailSummary","description":"Lightweight representation returned by the list endpoint."},"EnablePluginBody":{"properties":{"plugin_id":{"type":"string","format":"uuid","title":"Plugin Id","description":"ID of the marketplace plugin to enable"}},"type":"object","required":["plugin_id"],"title":"EnablePluginBody"},"EnableSkillBody":{"properties":{"skill_id":{"type":"integer","title":"Skill Id","description":"ID of the marketplace skill to enable"}},"type":"object","required":["skill_id"],"title":"EnableSkillBody"},"EndUserConsent":{"properties":{"consent":{"type":"boolean","title":"Consent","description":"True: the product has the person's consent to remember them"},"retention_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Retention Days","description":"Days their memories are kept; null: until erased. Left out: unchanged for an end user who exists; for a new end user of a product's workspace, the product's default"}},"type":"object","required":["consent"],"title":"EndUserConsent","description":"The product's consent record for one end user."},"EnhancedSkillResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"skill_type":{"type":"string","title":"Skill Type"},"category":{"type":"string","title":"Category"},"skill_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Version"},"skill_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Source"},"git_repo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Git Repo Url"},"git_commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Git Commit Sha"},"filesystem_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filesystem Path"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"},"files":{"items":{"$ref":"#/components/schemas/SkillFileInfo"},"type":"array","title":"Files","default":[]},"estimated_tokens":{"type":"integer","title":"Estimated Tokens","default":0}},"type":"object","required":["id","name","description","skill_type","category","skill_version","skill_source","git_repo_url","git_commit_sha","filesystem_path","is_active","created_at","updated_at","last_sync_at"],"title":"EnhancedSkillResponse"},"ErrorBreakdown":{"properties":{"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_message":{"type":"string","title":"Error Message"},"count":{"type":"integer","title":"Count"},"last_seen":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen"},"app_name":{"type":"string","title":"App Name"},"action_name":{"type":"string","title":"Action Name"}},"type":"object","required":["error_message","count","app_name","action_name"],"title":"ErrorBreakdown"},"EventRequest":{"properties":{"shop":{"type":"string","title":"Shop"},"event":{"type":"string","title":"Event"},"data":{"title":"Data"}},"type":"object","required":["shop","event"],"title":"EventRequest"},"EventsRequest":{"properties":{"events":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Events"}},"type":"object","title":"EventsRequest"},"ExecRequest":{"properties":{"command":{"type":"string","maxLength":4096,"minLength":1,"title":"Command"},"cwd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cwd"},"timeout":{"type":"integer","maximum":300.0,"minimum":1.0,"title":"Timeout","default":120}},"type":"object","required":["command"],"title":"ExecRequest"},"ExecutionOverview":{"properties":{"total_executions":{"type":"integer","title":"Total Executions"},"success_count":{"type":"integer","title":"Success Count"},"error_count":{"type":"integer","title":"Error Count"},"timeout_count":{"type":"integer","title":"Timeout Count"},"success_rate":{"type":"number","title":"Success Rate"},"error_rate":{"type":"number","title":"Error Rate"},"avg_latency_ms":{"type":"number","title":"Avg Latency Ms"},"p50_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Latency Ms"},"p95_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P95 Latency Ms"},"max_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Latency Ms"},"cache_hit_rate":{"type":"number","title":"Cache Hit Rate"},"unique_actions":{"type":"integer","title":"Unique Actions"},"unique_apps":{"type":"integer","title":"Unique Apps"}},"type":"object","required":["total_executions","success_count","error_count","timeout_count","success_rate","error_rate","avg_latency_ms","cache_hit_rate","unique_actions","unique_apps"],"title":"ExecutionOverview"},"ExportBody":{"properties":{"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},"type":"object","title":"ExportBody","description":"Where the export continues: the ``next_cursor`` of the page before, or none for the first page."},"ExportRequest":{"properties":{"categories":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":7},{"type":"null"}],"title":"Categories"},"passphrase":{"anyOf":[{"type":"string","maxLength":1024,"minLength":12},{"type":"null"}],"title":"Passphrase"}},"additionalProperties":false,"type":"object","title":"ExportRequest","description":"What to export: §5.2's categories (the defaults when absent; Auto always) and an\noptional passphrase that seals every part but the manifest (§8-Q5)."},"Fact":{"properties":{"text":{"type":"string","maxLength":500,"title":"Text"},"source":{"anyOf":[{"$ref":"#/components/schemas/FactSource"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["text"],"title":"Fact"},"FactSource":{"properties":{"kind":{"type":"string","title":"Kind"},"ref":{"type":"string","maxLength":1000,"title":"Ref"},"label":{"type":"string","maxLength":200,"title":"Label"}},"additionalProperties":false,"type":"object","required":["kind","ref","label"],"title":"FactSource"},"FeatureToggleRequest":{"properties":{"action_name":{"type":"string","title":"Action Name"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["action_name","enabled"],"title":"FeatureToggleRequest","description":"Request to toggle a feature."},"FeedbackProcessRequest":{"properties":{"feedback_ids":{"items":{"type":"string"},"type":"array","title":"Feedback Ids","description":"List of feedback IDs to process"},"processing_options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Processing Options","description":"Processing options"}},"type":"object","required":["feedback_ids"],"title":"FeedbackProcessRequest","description":"Request model for processing feedback"},"FeedbackRequest":{"properties":{"feedback_type":{"type":"string","title":"Feedback Type","description":"Type of feedback"},"content":{"type":"string","title":"Content","description":"Feedback content"},"rating":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rating","description":"Rating (1-10)"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"}},"type":"object","required":["feedback_type","content"],"title":"FeedbackRequest","description":"Request model for learning feedback"},"FixOut":{"properties":{"provider":{"type":"string","title":"Provider"},"provider_label":{"type":"string","title":"Provider Label"},"model_id":{"type":"string","title":"Model Id"},"display_name":{"type":"string","title":"Display Name"}},"type":"object","required":["provider","provider_label","model_id","display_name"],"title":"FixOut"},"FolderResponse":{"properties":{"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"has_children":{"type":"boolean","title":"Has Children","default":true}},"type":"object","required":["name","path"],"title":"FolderResponse"},"GenerateDocumentRequest":{"properties":{"title":{"type":"string","title":"Title"},"format":{"type":"string","title":"Format"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Name"},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["title","format","data"],"title":"GenerateDocumentRequest"},"GenerateDocumentResponse":{"properties":{"status":{"type":"string","title":"Status"},"filename":{"type":"string","title":"Filename"},"format":{"type":"string","title":"Format"},"download_url":{"type":"string","title":"Download Url"},"size_kb":{"type":"integer","title":"Size Kb"},"deliverable_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deliverable Id"},"app_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Url"},"share_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Url"},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id"},"template_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Name"}},"type":"object","required":["status","filename","format","download_url","size_kb"],"title":"GenerateDocumentResponse"},"GitHubImportBody":{"properties":{"github_url":{"type":"string","minLength":1,"title":"Github Url","description":"GitHub repo URL to import"}},"type":"object","required":["github_url"],"title":"GitHubImportBody"},"GitSkillSourceCreate":{"properties":{"git_url":{"type":"string","title":"Git Url","description":"Git repository URL"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name","description":"Friendly name for this source"},"branch":{"type":"string","title":"Branch","description":"Git branch to clone","default":"main"},"auto_update":{"type":"boolean","title":"Auto Update","description":"Enable automatic updates","default":false},"update_frequency_hours":{"type":"integer","title":"Update Frequency Hours","description":"Update frequency in hours","default":24}},"type":"object","required":["git_url"],"title":"GitSkillSourceCreate"},"GiveWorkspace":{"properties":{"role":{"type":"string","maxLength":32,"title":"Role"}},"type":"object","required":["role"],"title":"GiveWorkspace","description":"The role the waiting person is given in this workspace (never owner)."},"GradeRequest":{"properties":{"grade":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Grade","description":"Rating from 1-5"},"grade_notes":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Grade Notes"}},"type":"object","required":["grade"],"title":"GradeRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HeartbeatConfigPayload":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"interval_minutes":{"type":"integer","maximum":1440.0,"minimum":5.0,"title":"Interval Minutes","default":60},"inherit_active_hours":{"type":"boolean","title":"Inherit Active Hours","default":true},"active_hours_start":{"type":"string","title":"Active Hours Start","default":"08:00"},"active_hours_end":{"type":"string","title":"Active Hours End","default":"20:00"},"prompt":{"type":"string","title":"Prompt","default":""},"auto_act":{"type":"boolean","title":"Auto Act","default":false},"report_to":{"type":"string","title":"Report To","default":"orchestrator"},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"}},"type":"object","title":"HeartbeatConfigPayload"},"HeartbeatRequest":{"properties":{"capabilities":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Capabilities"},"running":{"items":{"$ref":"#/components/schemas/RunningSession"},"type":"array","title":"Running"}},"type":"object","title":"HeartbeatRequest"},"HideRequest":{"properties":{"reason":{"anyOf":[{"type":"string","enum":["not_now","not_useful","wrong_agent"]},{"type":"null"}],"title":"Reason"},"via":{"anyOf":[{"type":"string","enum":["web","go","push","chat","telegram"]},{"type":"null"}],"title":"Via"}},"additionalProperties":false,"type":"object","title":"HideRequest","description":"``POST …/hide``: why the person hid it, and where."},"IndexGitHubRequest":{"properties":{"project_name":{"type":"string","title":"Project Name","description":"Unique project name"},"github_url":{"type":"string","title":"Github Url","description":"GitHub repository URL"},"branch":{"type":"string","title":"Branch","description":"Branch to index","default":"main"},"auth_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Token","description":"GitHub auth token for private repos"},"exclude_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exclude Patterns","description":"Additional exclude patterns"}},"type":"object","required":["project_name","github_url"],"title":"IndexGitHubRequest","description":"Request to index a GitHub repository"},"IndexResponse":{"properties":{"project_id":{"type":"integer","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"total_files":{"type":"integer","title":"Total Files"},"total_symbols":{"type":"integer","title":"Total Symbols"},"duration_seconds":{"type":"number","title":"Duration Seconds"},"status":{"type":"string","title":"Status"}},"type":"object","required":["project_id","project_name","total_files","total_symbols","duration_seconds","status"],"title":"IndexResponse","description":"Response from indexing operation"},"InitiateConnectionRequest":{"properties":{"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url"},"auth_scheme":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Scheme"},"auth_config_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Config Id"}},"type":"object","title":"InitiateConnectionRequest","description":"Request to initiate a hosted-auth connection."},"InitiateConnectionResponse":{"properties":{"redirect_url":{"type":"string","title":"Redirect Url"},"app_name":{"type":"string","title":"App Name"},"auth_config_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Config Id"},"auth_scheme":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Scheme"}},"type":"object","required":["redirect_url","app_name"],"title":"InitiateConnectionResponse","description":"Hosted-auth redirect URL + the chosen auth config (persisted on the workspace)."},"InstallBody":{"properties":{"packageId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Packageid"}},"additionalProperties":false,"type":"object","title":"InstallBody","description":"``POST …/install``: the version to install; omitted, the newest one this host runs."},"InstallRequest":{"properties":{"pack":{"additionalProperties":true,"type":"object","title":"Pack"},"credential_id":{"type":"integer","title":"Credential Id"},"agents":{"items":{"type":"integer"},"type":"array","maxItems":50,"title":"Agents"}},"type":"object","required":["pack","credential_id"],"title":"InstallRequest","description":"A pack, the id of the workspace's ``generic_api`` credential its calls use, and the\nagents that may use it (none: the pack is offered to no one)."},"InstallResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"cloned_items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Cloned Items"},"installed_dependencies":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Installed Dependencies"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["success","message"],"title":"InstallResponse"},"InstallRoleChange":{"properties":{"role":{"type":"string","maxLength":32,"title":"Role"}},"type":"object","required":["role"],"title":"InstallRoleChange","description":"The install-wide role to give a person."},"InstallationOut":{"properties":{"id":{"type":"string","title":"Id"},"widget_id":{"type":"string","title":"Widget Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"installed_at":{"type":"string","format":"date-time","title":"Installed At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"use_count":{"type":"integer","title":"Use Count","default":0},"widget":{"anyOf":[{"$ref":"#/components/schemas/WidgetSummaryOut"},{"type":"null"}]}},"type":"object","required":["id","widget_id","workspace_id","installed_at"],"title":"InstallationOut"},"IntegrationsStatusOut":{"properties":{"available":{"type":"boolean","title":"Available"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"key_configured":{"type":"boolean","title":"Key Configured"},"apps_cached":{"type":"integer","title":"Apps Cached"},"last_sync":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync"},"sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Status"},"sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Error"}},"type":"object","required":["available","key_configured","apps_cached"],"title":"IntegrationsStatusOut","description":"PRD-233 S2 — honest integration state for the Tools page."},"InvitationResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"expires_at":{"type":"string","title":"Expires At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","email","role","status","expires_at","created_at"],"title":"InvitationResponse"},"InviteMemberRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","title":"Role","default":"member"}},"type":"object","required":["email"],"title":"InviteMemberRequest"},"KnowledgeItemCreate":{"properties":{"kb_type":{"type":"string","title":"Kb Type","description":"Knowledge base type (document, table, image, etc.)"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Item title"},"content":{"type":"string","title":"Content","description":"Item content"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"Brief summary"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"quality_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Quality Score","default":0.5},"importance_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Importance Score","default":0.5},"visibility":{"type":"string","title":"Visibility","description":"public, private, system, team","default":"system"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Id"}},"type":"object","required":["kb_type","content"],"title":"KnowledgeItemCreate","description":"Request to create a knowledge item"},"KnowledgeItemResponse":{"properties":{"id":{"type":"integer","title":"Id"},"kb_type":{"type":"string","title":"Kb Type"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content_preview":{"type":"string","title":"Content Preview"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"quality_score":{"type":"number","title":"Quality Score"},"importance_score":{"type":"number","title":"Importance Score"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"multimodal_count":{"type":"integer","title":"Multimodal Count","default":0},"relationship_count":{"type":"integer","title":"Relationship Count","default":0}},"type":"object","required":["id","kb_type","title","content_preview","summary","quality_score","importance_score","status","created_at"],"title":"KnowledgeItemResponse","description":"Response with knowledge item details"},"KnowledgeSearchRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Search query"},"kb_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Kb Types","description":"Filter by knowledge types"},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","default":10},"min_quality":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Min Quality","default":0.0},"use_semantic":{"type":"boolean","title":"Use Semantic","description":"Use semantic (vector) search","default":true},"use_fulltext":{"type":"boolean","title":"Use Fulltext","description":"Use full-text search","default":true}},"type":"object","required":["query"],"title":"KnowledgeSearchRequest","description":"Request for knowledge search"},"KnowledgeSearchResult":{"properties":{"id":{"type":"integer","title":"Id"},"kb_type":{"type":"string","title":"Kb Type"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content_snippet":{"type":"string","title":"Content Snippet"},"relevance_score":{"type":"number","title":"Relevance Score"},"quality_score":{"type":"number","title":"Quality Score"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","kb_type","title","content_snippet","relevance_score","quality_score","created_at"],"title":"KnowledgeSearchResult","description":"Search result item"},"KnowledgeShareRequest":{"properties":{"title":{"type":"string","title":"Title","description":"Knowledge title"},"content":{"type":"string","title":"Content","description":"Knowledge content"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Knowledge category"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Knowledge tags"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"}},"type":"object","required":["title","content"],"title":"KnowledgeShareRequest","description":"Request model for knowledge sharing"},"KnowledgeTypeInfo":{"properties":{"type_name":{"type":"string","title":"Type Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"count":{"type":"integer","title":"Count"},"supports_search":{"type":"boolean","title":"Supports Search"},"supports_relationships":{"type":"boolean","title":"Supports Relationships"}},"type":"object","required":["type_name","display_name","description","icon","count","supports_search","supports_relationships"],"title":"KnowledgeTypeInfo","description":"Information about a knowledge base type"},"LLMModelOut":{"properties":{"id":{"type":"integer","title":"Id"},"provider":{"type":"string","title":"Provider"},"vendor":{"type":"string","title":"Vendor"},"serving_provider":{"type":"string","title":"Serving Provider"},"serving_provider_label":{"type":"string","title":"Serving Provider Label"},"route_label":{"type":"string","title":"Route Label"},"model_id":{"type":"string","title":"Model Id"},"display_name":{"type":"string","title":"Display Name"},"model_family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Family"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"context_window":{"type":"integer","title":"Context Window"},"max_output_tokens":{"type":"integer","title":"Max Output Tokens"},"input_cost_per_1k":{"type":"number","title":"Input Cost Per 1K"},"output_cost_per_1k":{"type":"number","title":"Output Cost Per 1K"},"is_free":{"type":"boolean","title":"Is Free","default":false},"price_known":{"type":"boolean","title":"Price Known","default":true},"price_tier":{"type":"string","title":"Price Tier","default":"premium"},"supports_functions":{"type":"boolean","title":"Supports Functions"},"supports_vision":{"type":"boolean","title":"Supports Vision"},"supports_streaming":{"type":"boolean","title":"Supports Streaming"},"status":{"type":"string","title":"Status"},"sourcing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourcing"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"is_default":{"type":"boolean","title":"Is Default","default":false},"is_suggested":{"type":"boolean","title":"Is Suggested","default":false},"requires_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requires Plan"},"key_available":{"type":"boolean","title":"Key Available","default":true},"terms_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Note"},"rate_limit_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Limit Note"},"input_modalities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Input Modalities"},"supports_json_mode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Json Mode"},"supports_reasoning":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Reasoning"},"takes_thinking_level":{"type":"boolean","title":"Takes Thinking Level","default":false},"callable":{"type":"boolean","title":"Callable","default":false},"who_pays":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Who Pays"},"choosable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Choosable"},"not_choosable_reason":{"anyOf":[{"$ref":"#/components/schemas/api__llm_marketplace__ReasonOut"},{"type":"null"}]},"note":{"anyOf":[{"$ref":"#/components/schemas/api__llm_marketplace__ReasonOut"},{"type":"null"}]},"served_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Served By"}},"type":"object","required":["id","provider","vendor","serving_provider","serving_provider_label","route_label","model_id","display_name","model_family","description","context_window","max_output_tokens","input_cost_per_1k","output_cost_per_1k","supports_functions","supports_vision","supports_streaming","status","sourcing","category","requires_plan"],"title":"LLMModelOut"},"LimitOut":{"properties":{"limited":{"type":"boolean","title":"Limited"},"can_change":{"type":"boolean","title":"Can Change"},"models":{"items":{"$ref":"#/components/schemas/ListedModelOut"},"type":"array","title":"Models"},"default":{"$ref":"#/components/schemas/DefaultOut"}},"type":"object","required":["limited","can_change","models","default"],"title":"LimitOut"},"ListedModelOut":{"properties":{"provider":{"type":"string","title":"Provider"},"provider_label":{"type":"string","title":"Provider Label"},"model_id":{"type":"string","title":"Model Id"},"display_name":{"type":"string","title":"Display Name"}},"type":"object","required":["provider","provider_label","model_id","display_name"],"title":"ListedModelOut"},"LooksUpdate":{"properties":{"looks":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Looks"},"active":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Active"}},"additionalProperties":false,"type":"object","required":["looks","active"],"title":"LooksUpdate","description":"The body's shape; each look is checked against the theme's own schema in the service.\n\nBoth fields are required (``active`` may be null): a save replaces the whole list, so a\nbody without ``looks`` must never empty it."},"MarketplaceItemDetail":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","title":"Type"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"creator_name":{"type":"string","title":"Creator Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"install_count":{"type":"integer","title":"Install Count","default":0},"is_featured":{"type":"boolean","title":"Is Featured","default":false},"is_approved":{"type":"boolean","title":"Is Approved","default":true},"version":{"type":"string","title":"Version","default":"1.0.0"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"owner_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Type"},"steps":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Steps"},"inputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outputs"},"execution_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Execution Config"},"schedule_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schedule Config"},"dependencies":{"additionalProperties":true,"type":"object","title":"Dependencies"}},"type":"object","required":["id","type","name","description","creator_name","created_at","updated_at"],"title":"MarketplaceItemDetail","description":"Extended model with dependency information"},"MarketplaceItemOut":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","title":"Type"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"creator_name":{"type":"string","title":"Creator Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"install_count":{"type":"integer","title":"Install Count","default":0},"is_featured":{"type":"boolean","title":"Is Featured","default":false},"is_approved":{"type":"boolean","title":"Is Approved","default":true},"version":{"type":"string","title":"Version","default":"1.0.0"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"owner_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Type"},"steps":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Steps"},"inputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Outputs"},"execution_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Execution Config"},"schedule_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schedule Config"}},"type":"object","required":["id","type","name","description","creator_name","created_at","updated_at"],"title":"MarketplaceItemOut"},"MarketplaceOut":{"properties":{"apps":{"items":{"$ref":"#/components/schemas/AppOut"},"type":"array","title":"Apps"},"total_apps":{"type":"integer","title":"Total Apps"},"total_actions":{"type":"integer","title":"Total Actions"},"categories":{"additionalProperties":true,"type":"object","title":"Categories"},"last_synced":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Synced"}},"type":"object","required":["apps","total_apps","total_actions","categories"],"title":"MarketplaceOut"},"MeRequest":{"properties":{"paused":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Paused"},"quiet_start":{"anyOf":[{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}],"title":"Quiet Start"},"quiet_end":{"anyOf":[{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}],"title":"Quiet End"},"timezone":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Timezone"}},"additionalProperties":false,"type":"object","title":"MeRequest","description":"``PUT …/me``: the caller's pause and quiet hours to change; what is left out stays."},"MediaToolsChange":{"properties":{"defaults":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Defaults"},"monthly_cap_usd":{"anyOf":[{"type":"number","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Monthly Cap Usd"},"per_post_cap_usd":{"anyOf":[{"type":"number","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Per Post Cap Usd"}},"additionalProperties":false,"type":"object","title":"MediaToolsChange"},"MemberRef":{"properties":{"type":{"type":"string","enum":["user","agent"],"title":"Type"},"id":{"type":"integer","maximum":2147483647.0,"exclusiveMinimum":0.0,"title":"Id"}},"type":"object","required":["type","id"],"title":"MemberRef","description":"A person (``user``, their ``users.id``) or an agent (``agent``, its ``agents.id``)."},"MemoryCreate":{"properties":{"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content","description":"Memory text content"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Arbitrary metadata"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tags for categorisation"}},"type":"object","required":["content"],"title":"MemoryCreate","description":"Body for POST /api/memory"},"MemoryDeleteResponse":{"properties":{"id":{"type":"string","title":"Id"},"deleted":{"type":"boolean","title":"Deleted"}},"type":"object","required":["id","deleted"],"title":"MemoryDeleteResponse","description":"Response for DELETE /api/memory/:id"},"MemoryItem":{"properties":{"id":{"type":"string","title":"Id"},"content":{"type":"string","title":"Content"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"workspace_id":{"type":"string","title":"Workspace Id"},"created_at":{"type":"string","title":"Created At"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"}},"type":"object","required":["id","content","workspace_id","created_at"],"title":"MemoryItem","description":"Single memory record returned by the API"},"MemoryListResponse":{"properties":{"memories":{"items":{"$ref":"#/components/schemas/MemoryItem"},"type":"array","title":"Memories"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["memories","total"],"title":"MemoryListResponse","description":"Response for GET /api/memory"},"MemorySearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"results":{"items":{"$ref":"#/components/schemas/MemoryItem"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["query","results","total"],"title":"MemorySearchResponse","description":"Response for GET /api/memory/search"},"MessagePart":{"properties":{"type":{"type":"string","title":"Type"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"mediaType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mediatype"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"attachment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attachment Id"}},"type":"object","required":["type"],"title":"MessagePart","description":"One part of a chat message: text, a file, or an ephemeral attachment reference."},"MintWebCallRequest":{"properties":{"chat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chat Id","description":"The on-screen chat to bind"},"agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Id","description":"Explicitly selected agent"}},"type":"object","title":"MintWebCallRequest","description":"The chat screen's ask: bind this call to the thread I'm looking at."},"MissionApproveRequest":{"properties":{"max_concurrent_override":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Max Concurrent Override","description":"Override max_concurrent for this mission"},"token_budget_override":{"anyOf":[{"type":"integer","minimum":1000.0},{"type":"null"}],"title":"Token Budget Override","description":"Override token budget estimate for this mission"},"skip_verification":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skip Verification","description":"Skip task verification (for benchmarks/testing)"},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note","description":"F291: the owner's note on the plan; every step's prompt carries it"}},"additionalProperties":false,"type":"object","title":"MissionApproveRequest"},"MissionCreateRequest":{"properties":{"goal":{"type":"string","maxLength":10000,"minLength":1,"title":"Goal","description":"Natural-language goal"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","description":"Optional mission config overrides"},"template_id":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Template Id","description":"Template ID hint — bypass LLM matching and use this template directly"},"plan_only":{"type":"boolean","title":"Plan Only","description":"PRD-163 S2: plan only — produce the plan and await approval, never auto-execute","default":false},"staffing":{"anyOf":[{"items":{"$ref":"#/components/schemas/StaffingEntry"},"type":"array","maxItems":20},{"type":"null"}],"title":"Staffing","description":"F142: when the owner names who does what — [{agent: name, slug or id, does: the work in the owner's words}]. Each named agent is pinned to its work."}},"type":"object","required":["goal"],"title":"MissionCreateRequest"},"MissionFieldQueryRequest":{"properties":{"query":{"type":"string","maxLength":2000,"minLength":1,"title":"Query","description":"Trace query"},"top_k":{"type":"integer","maximum":50.0,"minimum":0.0,"title":"Top K","description":"0 → config default","default":0}},"type":"object","required":["query"],"title":"MissionFieldQueryRequest"},"MissionPlanEditRequest":{"properties":{"task_edits":{"items":{"$ref":"#/components/schemas/MissionTaskEdit"},"type":"array","maxItems":200,"minItems":1,"title":"Task Edits","description":"Per-task field edits to apply before approval"}},"type":"object","required":["task_edits"],"title":"MissionPlanEditRequest"},"MissionRejectRequest":{"properties":{"reason":{"type":"string","maxLength":2000,"minLength":1,"title":"Reason","description":"Rejection reason"}},"type":"object","required":["reason"],"title":"MissionRejectRequest"},"MissionReplanRequest":{"properties":{"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Notes","description":"Optional user guidance for the replanner"},"staffing":{"anyOf":[{"items":{"$ref":"#/components/schemas/StaffingEntry"},"type":"array","maxItems":20},{"type":"null"}],"title":"Staffing","description":"F142: when the owner names who does what — [{agent: name, slug or id, does: the work in the owner's words}]. Each named agent is pinned to its work."}},"type":"object","title":"MissionReplanRequest"},"MissionSettingsRequest":{"properties":{"check_each_step":{"type":"boolean","title":"Check Each Step"}},"type":"object","required":["check_each_step"],"title":"MissionSettingsRequest"},"MissionTaskEdit":{"properties":{"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"Task row UUID"},"temp_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temp Id","description":"Planner temp id"},"sequence_number":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Sequence Number","description":"1-based task sequence"},"agent_id":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Agent Id","description":"The agent that runs this task"},"agent_role":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Agent Role"},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"}},"type":"object","title":"MissionTaskEdit"},"ModelComparisonItem":{"properties":{"model_id":{"type":"string","title":"Model Id"},"display_name":{"type":"string","title":"Display Name"},"provider":{"type":"string","title":"Provider"},"provider_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Label"},"billing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing"},"input_cost_per_1k":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Input Cost Per 1K"},"output_cost_per_1k":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Output Cost Per 1K"},"context_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Window"},"total_requests":{"type":"integer","title":"Total Requests","default":0},"total_tokens":{"type":"integer","title":"Total Tokens","default":0},"total_cost":{"type":"number","title":"Total Cost","default":0.0},"avg_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Latency Ms"},"error_rate":{"type":"number","title":"Error Rate","default":0.0},"success_rate":{"type":"number","title":"Success Rate","default":1.0}},"type":"object","required":["model_id","display_name","provider"],"title":"ModelComparisonItem"},"ModelsIn":{"properties":{"models":{"items":{"$ref":"#/components/schemas/RouteIn"},"type":"array","maxItems":200,"minItems":1,"title":"Models"}},"additionalProperties":false,"type":"object","required":["models"],"title":"ModelsIn","description":"Models to add to the list."},"MoveIn":{"properties":{"agent_ids":{"items":{"type":"integer"},"type":"array","maxItems":100,"minItems":1,"title":"Agent Ids"},"to":{"type":"string","enum":["default","fix"],"title":"To","default":"default"}},"additionalProperties":false,"type":"object","required":["agent_ids"],"title":"MoveIn","description":"The agents to move, and where: the workspace's default, or each one's fix."},"MoveOut":{"properties":{"moved":{"items":{"$ref":"#/components/schemas/AgentModelOut"},"type":"array","title":"Moved"},"not_moved":{"items":{"$ref":"#/components/schemas/NotMovedOut"},"type":"array","title":"Not Moved"}},"type":"object","required":["moved","not_moved"],"title":"MoveOut"},"NLQueryRequest":{"properties":{"question":{"type":"string","minLength":1,"title":"Question","description":"Natural language question"}},"type":"object","required":["question"],"title":"NLQueryRequest","description":"Natural language question to be translated to SQL."},"NLQueryResponse":{"properties":{"sql":{"type":"string","title":"Sql"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"rows":{"items":{"items":{},"type":"array"},"type":"array","title":"Rows"},"summary":{"type":"string","title":"Summary"}},"type":"object","required":["sql","columns","rows","summary"],"title":"NLQueryResponse","description":"Result of a natural language query."},"NewMemberRequest":{"properties":{"type":{"type":"string","enum":["user","agent"],"title":"Type"},"id":{"type":"integer","maximum":2147483647.0,"exclusiveMinimum":0.0,"title":"Id"},"role":{"type":"string","title":"Role","default":"member"}},"additionalProperties":false,"type":"object","required":["type","id"],"title":"NewMemberRequest","description":"A member to add, in a room role."},"NotMovedOut":{"properties":{"agent_id":{"type":"integer","title":"Agent Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["agent_id","reason"],"title":"NotMovedOut"},"NotificationDestinationOut":{"properties":{"value":{"type":"string","title":"Value"},"label":{"type":"string","title":"Label"},"outside":{"type":"boolean","title":"Outside"},"connected":{"type":"boolean","title":"Connected"}},"type":"object","required":["value","label","outside","connected"],"title":"NotificationDestinationOut"},"NotificationEventGroupOut":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"events":{"items":{"$ref":"#/components/schemas/NotificationEventOut"},"type":"array","title":"Events"}},"type":"object","required":["id","label","events"],"title":"NotificationEventGroupOut"},"NotificationEventOut":{"properties":{"event_type":{"type":"string","title":"Event Type"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"scope":{"type":"string","title":"Scope"}},"type":"object","required":["event_type","label","description","scope"],"title":"NotificationEventOut"},"NotificationEventsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"groups":{"items":{"$ref":"#/components/schemas/NotificationEventGroupOut"},"type":"array","title":"Groups"},"destinations":{"items":{"$ref":"#/components/schemas/NotificationDestinationOut"},"type":"array","title":"Destinations"},"can_change_workspace":{"type":"boolean","title":"Can Change Workspace"}},"type":"object","required":["success","groups","destinations","can_change_workspace"],"title":"NotificationEventsResponse"},"NotificationListResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"notifications":{"items":{"$ref":"#/components/schemas/NotificationRow"},"type":"array","title":"Notifications"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["success","notifications","total","limit","offset"],"title":"NotificationListResponse"},"NotificationRow":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"event_type":{"type":"string","title":"Event Type"},"title":{"type":"string","title":"Title"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"link_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Type"},"link_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Id"},"agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Id"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"status":{"type":"string","title":"Status"},"read_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Read At"},"dismissed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismissed At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","workspace_id","user_id","event_type","title","message","link_type","link_id","agent_id","agent_name","status","read_at","dismissed_at","created_at"],"title":"NotificationRow"},"OnboardingResetRequest":{"properties":{"reset_trial":{"type":"boolean","title":"Reset Trial","default":false},"wipe_built":{"type":"boolean","title":"Wipe Built","default":false},"wipe_credentials":{"type":"boolean","title":"Wipe Credentials","default":false}},"type":"object","title":"OnboardingResetRequest"},"OpenRouterCreditsResponse":{"properties":{"total_credits":{"type":"number","title":"Total Credits"},"total_usage":{"type":"number","title":"Total Usage"}},"type":"object","required":["total_credits","total_usage"],"title":"OpenRouterCreditsResponse"},"OpenRouterKeyInfoResponse":{"properties":{"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Limit"},"limit_remaining":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Limit Remaining"},"usage_daily":{"type":"number","title":"Usage Daily","default":0},"usage_weekly":{"type":"number","title":"Usage Weekly","default":0},"usage_monthly":{"type":"number","title":"Usage Monthly","default":0},"is_free_tier":{"type":"boolean","title":"Is Free Tier","default":false},"rate_limit":{"additionalProperties":true,"type":"object","title":"Rate Limit"}},"type":"object","title":"OpenRouterKeyInfoResponse"},"OpenRouterSyncResponse":{"properties":{"synced":{"type":"integer","title":"Synced"},"skipped":{"type":"integer","title":"Skipped"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["synced","skipped"],"title":"OpenRouterSyncResponse"},"OptionsRequest":{"properties":{"slot":{"type":"string","maxLength":64,"minLength":1,"title":"Slot"},"prompt":{"type":"string","maxLength":1000,"minLength":1,"title":"Prompt"}},"additionalProperties":false,"type":"object","required":["slot","prompt"],"title":"OptionsRequest"},"OrdersSyncResponse":{"properties":{"status":{"type":"string","title":"Status"},"workspace_id":{"type":"string","title":"Workspace Id"},"bulk_operation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bulk Operation Id"},"object_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Object Count"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"fbt_edges_added":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fbt Edges Added"},"stale_fbt_removed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stale Fbt Removed"},"total_orders_analysed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Orders Analysed"},"days_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Window"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["status","workspace_id"],"title":"OrdersSyncResponse"},"OwnServerModelChanges":{"properties":{"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"context_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Window"},"max_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Output Tokens"},"supports_functions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Functions"},"supports_vision":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Vision"},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"OwnServerModelChanges","description":"``PATCH /models/{id}``: any of these. ``max_output_tokens: null`` resets it to the default.\n``model_id`` is accepted only to refuse a new name with a sentence: the name cannot change."},"OwnServerModelCreate":{"properties":{"model_id":{"type":"string","maxLength":255,"minLength":1,"title":"Model Id"},"context_window":{"type":"integer","title":"Context Window"},"max_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Output Tokens"},"supports_functions":{"type":"boolean","title":"Supports Functions","default":true},"supports_vision":{"type":"boolean","title":"Supports Vision","default":false},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["model_id","context_window"],"title":"OwnServerModelCreate","description":"``POST /models``. ``max_output_tokens`` left out takes the default (a quarter of the window, at most 4,096)."},"PackageOut":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"vertical_tags":{"items":{"type":"string"},"type":"array","title":"Vertical Tags"},"matching":{"additionalProperties":true,"type":"object","title":"Matching"},"members":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Members"},"setup_manifest":{"additionalProperties":true,"type":"object","title":"Setup Manifest"},"showcase":{"type":"boolean","title":"Showcase","default":false}},"type":"object","required":["id","slug","name"],"title":"PackageOut"},"PageVersionBody":{"properties":{"document":{"title":"Document"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"additionalProperties":false,"type":"object","required":["document"],"title":"PageVersionBody","description":"A workspace's version of the page: its document, and a note for the people who read the history."},"PairingCodeCreate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"}},"type":"object","title":"PairingCodeCreate"},"PatternCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"pattern_type":{"type":"string","title":"Pattern Type"},"pattern_data":{"additionalProperties":true,"type":"object","title":"Pattern Data"}},"type":"object","required":["name","pattern_type","pattern_data"],"title":"PatternCreate"},"PauseBody":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"PauseBody"},"PersonaOut":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"voice_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Description"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"suggested_temperature":{"type":"number","title":"Suggested Temperature","default":0.7},"suggested_models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Suggested Models"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"scope":{"type":"string","title":"Scope","default":"global"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"is_active":{"type":"boolean","title":"Is Active","default":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","slug","name"],"title":"PersonaOut"},"PhotoRequest":{"properties":{"deliverable_id":{"type":"string","maxLength":64,"minLength":1,"title":"Deliverable Id"}},"additionalProperties":false,"type":"object","required":["deliverable_id"],"title":"PhotoRequest","description":"The Library picture a photo spot takes: one of the workspace's image Deliverables."},"PickRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"}},"additionalProperties":false,"type":"object","required":["name"],"title":"PickRequest"},"PinBody":{"properties":{"installId":{"type":"string","format":"uuid","title":"Installid"},"version":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Version"}},"additionalProperties":false,"type":"object","required":["installId","version"],"title":"PinBody","description":"One install's pin: a version it holds, or null to unpin."},"PinRequest":{"properties":{"pinned_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Pinned On"}},"additionalProperties":false,"type":"object","title":"PinRequest"},"PlanBody":{"properties":{"plan":{"type":"string","maxLength":32,"minLength":1,"title":"Plan"},"proration_date":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Proration Date"}},"type":"object","required":["plan"],"title":"PlanBody"},"PlanChangeBody":{"properties":{"plan":{"type":"string","maxLength":50,"minLength":1,"title":"Plan"}},"type":"object","required":["plan"],"title":"PlanChangeBody"},"PlanDraftRequest":{"properties":{"request":{"type":"string","maxLength":2000,"minLength":1,"title":"Request"},"timezone":{"type":"string","maxLength":64,"title":"Timezone","default":"UTC"},"sources":{"$ref":"#/components/schemas/DraftSourcesIn"}},"additionalProperties":false,"type":"object","required":["request"],"title":"PlanDraftRequest"},"PlanFields":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"goal":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Goal"},"audience":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Audience"},"starts_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Starts On"},"ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Ends On"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"},"cadence":{"anyOf":[{"items":{"$ref":"#/components/schemas/CadenceRow"},"type":"array","maxItems":20},{"type":"null"}],"title":"Cadence"},"sources":{"anyOf":[{"$ref":"#/components/schemas/PlanSources"},{"type":"null"}]},"make":{"anyOf":[{"$ref":"#/components/schemas/PlanMake"},{"type":"null"}]},"research":{"anyOf":[{"$ref":"#/components/schemas/PlanResearch"},{"type":"null"}]},"late_policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Late Policy"},"approval_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approval Mode"}},"additionalProperties":false,"type":"object","title":"PlanFields"},"PlanImportRequest":{"properties":{"goal":{"type":"string","maxLength":10000,"minLength":1,"title":"Goal","description":"Mission goal"},"plan":{"additionalProperties":true,"type":"object","title":"Plan","description":"Pre-built plan: {tasks:[...], dependencies:[...]}"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","description":"Optional mission config overrides"}},"type":"object","required":["goal","plan"],"title":"PlanImportRequest"},"PlanMake":{"properties":{"time":{"type":"string","title":"Time","default":"07:00"},"video_days_early":{"type":"integer","title":"Video Days Early","default":1},"image_days_early":{"type":"integer","title":"Image Days Early","default":0},"max_per_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Per Day"},"visual_mix":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Visual Mix"},"rhythm":{"type":"string","title":"Rhythm","default":"daily"},"batch_day":{"type":"string","title":"Batch Day","default":"sun"},"batch_date":{"type":"integer","title":"Batch Date","default":25},"remind_at":{"type":"string","title":"Remind At","default":"20:00"}},"additionalProperties":false,"type":"object","title":"PlanMake"},"PlanResearch":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"day":{"type":"string","title":"Day","default":"mon"},"time":{"type":"string","title":"Time","default":"06:00"},"repeat_after_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Repeat After Days","default":60}},"additionalProperties":false,"type":"object","title":"PlanResearch"},"PlanResponse":{"properties":{"profile_id":{"type":"string","title":"Profile Id"},"mission_id":{"type":"string","title":"Mission Id"},"goal":{"type":"string","title":"Goal"}},"type":"object","required":["profile_id","mission_id","goal"],"title":"PlanResponse"},"PlanSources":{"properties":{"knowledge":{"type":"boolean","title":"Knowledge","default":true},"deliverables":{"type":"boolean","title":"Deliverables","default":true},"website":{"type":"boolean","title":"Website","default":true},"github":{"type":"boolean","title":"Github","default":false},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"never_say":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Never Say"}},"additionalProperties":false,"type":"object","title":"PlanSources"},"PlatformHelpRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Help query or question"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context","description":"Additional context"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Help category"}},"type":"object","required":["query"],"title":"PlatformHelpRequest","description":"Request model for platform help queries"},"PlatformKeyCreate":{"properties":{"provider":{"type":"string","title":"Provider","description":"LLM provider name"},"api_key":{"type":"string","maxLength":4096,"minLength":8,"title":"Api Key","description":"The raw API key"}},"type":"object","required":["provider","api_key"],"title":"PlatformKeyCreate"},"PluginContentItem":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"PluginContentItem","description":"A skill, command, or agent inside a plugin."},"PluginContentOut":{"properties":{"plugin_id":{"type":"string","title":"Plugin Id"},"slug":{"type":"string","title":"Slug"},"version":{"type":"string","title":"Version"},"files":{"additionalProperties":{"type":"string"},"type":"object","title":"Files","description":"Map of file path to content"}},"type":"object","required":["plugin_id","slug","version"],"title":"PluginContentOut"},"PluginDetailOut":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"long_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Long Description"},"category_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Id"},"category_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Name"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"skills_count":{"type":"integer","title":"Skills Count","default":0},"commands_count":{"type":"integer","title":"Commands Count","default":0},"agents_count":{"type":"integer","title":"Agents Count","default":0},"hooks_count":{"type":"integer","title":"Hooks Count","default":0},"token_estimate":{"type":"integer","title":"Token Estimate","default":0},"recommended_models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recommended Models"},"enable_count":{"type":"integer","title":"Enable Count","default":0},"is_featured":{"type":"boolean","title":"Is Featured","default":false},"is_active":{"type":"boolean","title":"Is Active","default":true},"approval_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approval Status"},"security_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Security Status"},"source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"original_author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Author"},"license":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"manifest":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Manifest"},"skills":{"items":{"$ref":"#/components/schemas/PluginContentItem"},"type":"array","title":"Skills"},"commands":{"items":{"$ref":"#/components/schemas/PluginContentItem"},"type":"array","title":"Commands"},"agents":{"items":{"$ref":"#/components/schemas/PluginContentItem"},"type":"array","title":"Agents"}},"type":"object","required":["id","slug","name","version"],"title":"PluginDetailOut"},"PluginUploadOut":{"properties":{"plugin_id":{"type":"string","title":"Plugin Id"},"scan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scan Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"security_status":{"type":"string","title":"Security Status"},"approval_status":{"type":"string","title":"Approval Status"},"status":{"type":"string","title":"Status","default":"scanning"}},"type":"object","required":["plugin_id","slug","name","version","security_status","approval_status"],"title":"PluginUploadOut"},"PolicyUpsertRequest":{"properties":{"policy":{"$ref":"#/components/schemas/ContextPolicy"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Id"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},"type":"object","required":["policy"],"title":"PolicyUpsertRequest"},"PostMessageRequest":{"properties":{"parts":{"anyOf":[{"items":{"$ref":"#/components/schemas/RoomTextPart"},"type":"array","maxItems":20},{"type":"null"}],"title":"Parts"},"content":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}],"title":"Content"},"mentions":{"items":{"$ref":"#/components/schemas/MemberRef"},"type":"array","maxItems":50,"title":"Mentions"},"replyTo":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Replyto"}},"additionalProperties":false,"type":"object","title":"PostMessageRequest","description":"``POST /api/rooms/{room_id}/messages``: text parts, or ``content``, and mentions as data."},"PreferenceBulkUpdateRequest":{"properties":{"preferences":{"items":{"$ref":"#/components/schemas/PreferenceRow"},"type":"array","title":"Preferences"}},"type":"object","required":["preferences"],"title":"PreferenceBulkUpdateRequest"},"PreferenceBulkUpdateResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"updated_count":{"type":"integer","title":"Updated Count"}},"type":"object","required":["success","updated_count"],"title":"PreferenceBulkUpdateResponse"},"PreferenceListResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"preferences":{"items":{"$ref":"#/components/schemas/PreferenceRow"},"type":"array","title":"Preferences"},"push_types":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Push Types"}},"type":"object","required":["success","preferences","push_types"],"title":"PreferenceListResponse"},"PreferenceRow":{"properties":{"event_type":{"type":"string","title":"Event Type"},"destination":{"type":"string","title":"Destination"},"enabled":{"type":"boolean","title":"Enabled"},"channel_connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Connection Id"}},"type":"object","required":["event_type","destination","enabled"],"title":"PreferenceRow"},"PreviewBlocksRequest":{"properties":{"blocks":{"additionalProperties":true,"type":"object","title":"Blocks"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["blocks"],"title":"PreviewBlocksRequest","description":"Live-preview a block tree without persisting (PRD-167 S5)."},"PreviewOut":{"properties":{"would_stop":{"items":{"$ref":"#/components/schemas/AgentOut"},"type":"array","title":"Would Stop"},"default":{"$ref":"#/components/schemas/DefaultOut"},"move_offered":{"type":"boolean","title":"Move Offered"},"no_move_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"No Move Reason"}},"type":"object","required":["would_stop","default","move_offered"],"title":"PreviewOut"},"PreviewPageRequest":{"properties":{"values":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string","maxLength":2000}]},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","maxProperties":160,"title":"Values"},"size":{"anyOf":[{"type":"string","maxLength":9,"minLength":1},{"type":"null"}],"title":"Size"},"story":{"type":"boolean","title":"Story","default":false},"photos":{"items":{"type":"string","maxLength":64,"minLength":1},"type":"array","maxItems":12,"title":"Photos"},"look":{"anyOf":[{"additionalProperties":true,"type":"object","maxProperties":3},{"type":"null"}],"title":"Look"}},"additionalProperties":false,"type":"object","title":"PreviewPageRequest","description":"What the editor has on screen. A field it leaves out is empty; unknown keys are refused."},"ProductCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"agent_slugs":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":50},{"type":"null"}],"title":"Agent Slugs","description":"Marketplace agents each customer's workspace starts with"},"ops_manager_slug":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Ops Manager Slug","description":"The roster agent the others report to; one of agent_slugs"},"key_type":{"anyOf":[{"type":"string","enum":["public","server"]},{"type":"null"}],"title":"Key Type"},"key_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Key Scopes","description":"The scopes of the key each customer's workspace gets"},"reuse_existing_key":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reuse Existing Key","description":"Finding a workspace again mints no new key while it has an active one (default); false mints one each time"},"default_retention_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Default Retention Days","description":"Days an end user's memories are kept when the product records none for them; none: until erased"},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$","title":"Slug","description":"Lower-case letters, digits and hyphens"},"owner_workspace_id":{"type":"string","format":"uuid","title":"Owner Workspace Id","description":"The workspace that pays for the product's workspaces"}},"additionalProperties":false,"type":"object","required":["name","slug","owner_workspace_id"],"title":"ProductCreate"},"ProfileCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description","default":""},"focus":{"type":"string","maxLength":2000,"minLength":1,"title":"Focus"},"keep":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":20,"title":"Keep"},"skip":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":20,"title":"Skip"},"examples":{"items":{"$ref":"#/components/schemas/ProfileExample"},"type":"array","maxItems":10,"title":"Examples"},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$","title":"Slug"}},"type":"object","required":["name","focus","slug"],"title":"ProfileCreate","description":"A new profile of the workspace's own, under ``slug``."},"ProfileExample":{"properties":{"fact":{"type":"string","maxLength":500,"minLength":1,"title":"Fact"},"type":{"type":"string","title":"Type"}},"type":"object","required":["fact","type"],"title":"ProfileExample","description":"A worked example: a fact as distillation would return it."},"ProfileFields":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description","default":""},"focus":{"type":"string","maxLength":2000,"minLength":1,"title":"Focus"},"keep":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":20,"title":"Keep"},"skip":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":20,"title":"Skip"},"examples":{"items":{"$ref":"#/components/schemas/ProfileExample"},"type":"array","maxItems":10,"title":"Examples"}},"type":"object","required":["name","focus"],"title":"ProfileFields","description":"What a workspace's own profile says; the body of an update."},"ProfileOut":{"properties":{"edition":{"type":"string","title":"Edition"},"editable":{"type":"boolean","title":"Editable"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"system_role":{"type":"string","title":"System Role"},"email_note":{"type":"string","title":"Email Note"}},"type":"object","required":["edition","editable","system_role","email_note"],"title":"ProfileOut"},"ProfilePatch":{"properties":{"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"sectors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sectors"},"brands":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Brands"},"standards":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Standards"},"voice_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Notes"},"goals":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Goals"}},"type":"object","title":"ProfilePatch"},"ProfileUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"username":{"anyOf":[{"type":"string","maxLength":255,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$"},{"type":"null"}],"title":"Username"},"avatar_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Avatar Url"}},"additionalProperties":false,"type":"object","title":"ProfileUpdate","description":"Omitted fields are unchanged; ``name`` / ``avatar_url`` accept \"\" to clear."},"ProjectResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"source_type":{"type":"string","title":"Source Type"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"total_files":{"type":"integer","title":"Total Files"},"total_symbols":{"type":"integer","title":"Total Symbols"},"total_relationships":{"type":"integer","title":"Total Relationships"},"last_indexed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Indexed"},"index_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Index Duration Seconds"},"status":{"type":"string","title":"Status"},"auto_reindex":{"type":"boolean","title":"Auto Reindex"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","name","source_type","source_url","branch","language","total_files","total_symbols","total_relationships","last_indexed","index_duration_seconds","status","auto_reindex","created_at"],"title":"ProjectResponse","description":"Project metadata response"},"ProjectedItem":{"properties":{"key":{"type":"string","title":"Key"},"projected_monthly_cost":{"type":"number","title":"Projected Monthly Cost"},"current_period_cost":{"type":"number","title":"Current Period Cost"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"provider_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Label"},"billing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing"},"current_period_tokens":{"type":"integer","title":"Current Period Tokens","default":0}},"type":"object","required":["key","projected_monthly_cost","current_period_cost"],"title":"ProjectedItem"},"PromptCaseBody":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"input":{"additionalProperties":{"type":"string","maxLength":20000},"type":"object","maxProperties":16,"title":"Input"},"must_contain":{"items":{"type":"string","maxLength":500,"minLength":1},"type":"array","maxItems":20,"title":"Must Contain"},"must_not_contain":{"items":{"type":"string","maxLength":500,"minLength":1},"type":"array","maxItems":20,"title":"Must Not Contain"},"expectation":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Expectation"}},"additionalProperties":false,"type":"object","required":["name"],"title":"PromptCaseBody","description":"Add or edit a test case: the whole case. Its input's names are checked against the keys the prompt\ntakes (``case_input_keys``) by ``core.services.prompt_cases``, which knows the prompt."},"PromptCaseResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"input":{"additionalProperties":{"type":"string"},"type":"object","title":"Input"},"must_contain":{"items":{"type":"string"},"type":"array","title":"Must Contain"},"must_not_contain":{"items":{"type":"string"},"type":"array","title":"Must Not Contain"},"expectation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expectation"},"seeded":{"type":"boolean","title":"Seeded"},"created_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","input","must_contain","must_not_contain","seeded","created_at","updated_at"],"title":"PromptCaseResponse"},"PromptChangeResponse":{"properties":{"id":{"type":"string","title":"Id"},"action":{"type":"string","title":"Action"},"from_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"From Version"},"to_version":{"type":"integer","title":"To Version"},"reason":{"type":"string","title":"Reason"},"made_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Made By"},"made_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Made By Name"},"made_at":{"type":"string","title":"Made At"},"without_test":{"type":"boolean","title":"Without Test","default":false}},"type":"object","required":["id","action","to_version","reason","made_at"],"title":"PromptChangeResponse"},"PromptCompareResponse":{"properties":{"base":{"$ref":"#/components/schemas/PromptVersionResponse"},"other":{"$ref":"#/components/schemas/PromptVersionResponse"},"lines":{"items":{"$ref":"#/components/schemas/DiffLine"},"type":"array","title":"Lines"}},"type":"object","required":["base","other","lines"],"title":"PromptCompareResponse"},"PromptReason":{"properties":{"reason":{"type":"string","title":"Reason"}},"additionalProperties":false,"type":"object","required":["reason"],"title":"PromptReason","description":"Make live and Reset to default: the reason, required."},"PromptResponse":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"category":{"type":"string","title":"Category"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"placeholders":{"items":{"type":"string"},"type":"array","title":"Placeholders"},"max_chars":{"type":"integer","title":"Max Chars"},"is_active":{"type":"boolean","title":"Is Active"},"active_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Version Number"},"active_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Content"},"draft_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draft Version Number"},"version_count":{"type":"integer","title":"Version Count","default":0},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","slug","display_name","category","placeholders","max_chars","is_active","created_at","updated_at"],"title":"PromptResponse"},"PromptRollback":{"properties":{"reason":{"type":"string","title":"Reason"},"version_id":{"type":"string","format":"uuid","title":"Version Id"}},"additionalProperties":false,"type":"object","required":["reason","version_id"],"title":"PromptRollback","description":"Roll back: the version to make live again, and the reason."},"PromptRunEstimate":{"properties":{"cases":{"type":"integer","title":"Cases"},"answer_calls":{"type":"integer","title":"Answer Calls"},"judge_calls":{"type":"integer","title":"Judge Calls"},"model_calls":{"type":"integer","title":"Model Calls"},"route":{"$ref":"#/components/schemas/PromptRunRoute"},"judge_route":{"$ref":"#/components/schemas/PromptRunRoute"},"estimated_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Cost"},"runs_used":{"type":"integer","title":"Runs Used","default":0},"basis":{"type":"string","title":"Basis"}},"type":"object","required":["cases","answer_calls","judge_calls","model_calls","route","judge_route","basis"],"title":"PromptRunEstimate","description":"What a run would do before it starts (D13). ``estimated_cost`` is None when no earlier run gives an\nhonest figure; ``basis`` says, in one sentence, where the figure comes from or why there is none."},"PromptRunResponse":{"properties":{"id":{"type":"string","title":"Id"},"state":{"type":"string","title":"State"},"draft_version_id":{"type":"string","title":"Draft Version Id"},"draft_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draft Version Number"},"live_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Live Version Id"},"live_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Live Version Number"},"route":{"$ref":"#/components/schemas/PromptRunRoute"},"started_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Started By"},"started_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started By Name"},"started_at":{"type":"string","title":"Started At"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finished At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"cases_run":{"type":"integer","title":"Cases Run"},"answers_changed":{"type":"integer","title":"Answers Changed"},"draft_passed":{"type":"integer","title":"Draft Passed"},"draft_failed":{"type":"integer","title":"Draft Failed"},"live_passed":{"type":"integer","title":"Live Passed"},"live_failed":{"type":"integer","title":"Live Failed"},"total_cost":{"type":"number","title":"Total Cost"},"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Results"}},"type":"object","required":["id","state","draft_version_id","route","started_at","cases_run","answers_changed","draft_passed","draft_failed","live_passed","live_failed","total_cost","results"],"title":"PromptRunResponse","description":"A test run with each case's result (the shape in ``SystemPromptTestRun``'s docstring)."},"PromptRunRoute":{"properties":{"service":{"type":"string","title":"Service"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},"type":"object","required":["service"],"title":"PromptRunRoute","description":"Where a run's answers were asked: the call site's service name, and the provider and model it reached."},"PromptRunStart":{"properties":{"version_id":{"type":"string","format":"uuid","title":"Version Id"}},"additionalProperties":false,"type":"object","required":["version_id"],"title":"PromptRunStart","description":"``POST /api/admin/prompts/{id}/runs``: the draft to test against the live version."},"PromptRunSummary":{"properties":{"id":{"type":"string","title":"Id"},"state":{"type":"string","title":"State"},"draft_version_id":{"type":"string","title":"Draft Version Id"},"draft_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draft Version Number"},"live_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Live Version Id"},"live_version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Live Version Number"},"route":{"$ref":"#/components/schemas/PromptRunRoute"},"started_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Started By"},"started_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started By Name"},"started_at":{"type":"string","title":"Started At"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finished At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"cases_run":{"type":"integer","title":"Cases Run"},"answers_changed":{"type":"integer","title":"Answers Changed"},"draft_passed":{"type":"integer","title":"Draft Passed"},"draft_failed":{"type":"integer","title":"Draft Failed"},"live_passed":{"type":"integer","title":"Live Passed"},"live_failed":{"type":"integer","title":"Live Failed"},"total_cost":{"type":"number","title":"Total Cost"}},"type":"object","required":["id","state","draft_version_id","route","started_at","cases_run","answers_changed","draft_passed","draft_failed","live_passed","live_failed","total_cost"],"title":"PromptRunSummary","description":"A test run without its per-case results: its state, totals, cost and when (PRD-294 §4.5)."},"PromptVersionCreate":{"properties":{"content":{"type":"string","minLength":1,"title":"Content"},"change_note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Change Note"}},"additionalProperties":false,"type":"object","required":["content"],"title":"PromptVersionCreate","description":"``POST /api/admin/prompts/{id}/versions``: a new draft."},"PromptVersionResponse":{"properties":{"id":{"type":"string","title":"Id"},"version_number":{"type":"integer","title":"Version Number"},"content":{"type":"string","title":"Content"},"change_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Note"},"status":{"type":"string","title":"Status"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created_at":{"type":"string","title":"Created At"},"latest_run":{"anyOf":[{"$ref":"#/components/schemas/PromptRunSummary"},{"type":"null"}]}},"type":"object","required":["id","version_number","content","status","created_at"],"title":"PromptVersionResponse"},"ProviderGroupOut":{"properties":{"provider":{"type":"string","title":"Provider"},"label":{"type":"string","title":"Label"},"callable":{"type":"boolean","title":"Callable"},"who_pays":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Who Pays"},"reason":{"anyOf":[{"$ref":"#/components/schemas/api__llm_marketplace__ReasonOut"},{"type":"null"}]},"key_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key State"},"model_count":{"type":"integer","title":"Model Count"},"models_a_key_would_add":{"type":"integer","title":"Models A Key Would Add"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"}},"type":"object","required":["provider","label","callable","model_count","models_a_key_would_add"],"title":"ProviderGroupOut","description":"One chat provider as this workspace can call it (PRD-287 US-301): a closed group is drawn from this."},"ProviderUsage":{"properties":{"provider":{"type":"string","title":"Provider"},"label":{"type":"string","title":"Label"},"billing":{"type":"string","title":"Billing"},"kind":{"type":"string","title":"Kind"},"request_count":{"type":"integer","title":"Request Count"},"total_tokens":{"type":"integer","title":"Total Tokens"},"total_cost":{"type":"number","title":"Total Cost"},"error_count":{"type":"integer","title":"Error Count","default":0}},"type":"object","required":["provider","label","billing","kind","request_count","total_tokens","total_cost"],"title":"ProviderUsage"},"ProvisionRequest":{"properties":{"source":{"type":"string","title":"Source","default":"shopify"},"external_id":{"type":"string","title":"External Id","description":"Shop domain, e.g. store.myshopify.com"},"name":{"type":"string","title":"Name","description":"Shop display name"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["external_id","name"],"title":"ProvisionRequest"},"ProvisionResponse":{"properties":{"id":{"type":"string","title":"Id"},"public_id":{"type":"string","title":"Public Id"},"name":{"type":"string","title":"Name"},"api_key":{"type":"string","title":"Api Key","description":"Public widget API key — shown once"},"agents_installed":{"type":"integer","title":"Agents Installed"},"is_new":{"type":"boolean","title":"Is New"}},"type":"object","required":["id","public_id","name","api_key","agents_installed","is_new"],"title":"ProvisionResponse"},"PushConsentRequest":{"properties":{"agreed":{"type":"boolean","title":"Agreed"}},"additionalProperties":false,"type":"object","required":["agreed"],"title":"PushConsentRequest","description":"``PUT /push-consent``: yes or no, nothing else."},"PushSettingsRequest":{"properties":{"redact_questions":{"type":"boolean","title":"Redact Questions"}},"additionalProperties":false,"type":"object","required":["redact_questions"],"title":"PushSettingsRequest","description":"``PUT /push-settings``: whether this workspace's question pushes are sent generic."},"RAGChunkResponse":{"properties":{"document_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Document Id"},"file_name":{"type":"string","title":"File Name","default":""},"app_name":{"type":"string","title":"App Name","default":""},"file_path":{"type":"string","title":"File Path","default":""},"chunk_index":{"type":"integer","title":"Chunk Index","default":0},"content":{"type":"string","title":"Content","default":""},"similarity_score":{"type":"number","title":"Similarity Score","default":0.0}},"type":"object","title":"RAGChunkResponse"},"RAGConfigResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"embedding_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding Model"},"chunk_size":{"type":"integer","title":"Chunk Size"},"chunk_overlap":{"type":"integer","title":"Chunk Overlap"},"retrieval_strategy":{"type":"string","title":"Retrieval Strategy"},"top_k":{"type":"integer","title":"Top K"},"similarity_threshold":{"type":"number","title":"Similarity Threshold"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"}},"type":"object","required":["id","name","embedding_model","chunk_size","chunk_overlap","retrieval_strategy","top_k","similarity_threshold","configuration","is_active","created_at","updated_at"],"title":"RAGConfigResponse"},"RAGConfigUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"embedding_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding Model"},"chunk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Size"},"chunk_overlap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Overlap"},"retrieval_strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retrieval Strategy"},"top_k":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top K"},"similarity_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Similarity Threshold"},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"RAGConfigUpdate"},"RAGFeedbackRequest":{"properties":{"query":{"type":"string","minLength":1,"title":"Query"},"response_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Text"},"chunk_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Chunk Ids"},"document_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Document Ids"},"rating":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Rating"},"feedback_type":{"type":"string","pattern":"^(thumbs_up|thumbs_down|star_rating|correction)$","title":"Feedback Type","default":"thumbs_up"},"correction_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correction Text"},"rag_config_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rag Config Id"},"execution_time_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Execution Time Ms"}},"type":"object","required":["query"],"title":"RAGFeedbackRequest"},"RAGQueryRequest":{"properties":{"query":{"type":"string","minLength":1,"title":"Query"},"top_k":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Top K","default":10},"min_similarity":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Min Similarity","default":0.5},"max_tokens":{"type":"integer","maximum":10000.0,"minimum":100.0,"title":"Max Tokens","default":2000},"diversity_factor":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Diversity Factor","default":0.3}},"type":"object","required":["query"],"title":"RAGQueryRequest"},"RAGQueryResponse":{"properties":{"query":{"type":"string","title":"Query"},"context":{"type":"string","title":"Context","default":""},"chunks":{"items":{"$ref":"#/components/schemas/RAGChunkResponse"},"type":"array","title":"Chunks","default":[]},"sources":{"items":{"$ref":"#/components/schemas/RAGSourceResponse"},"type":"array","title":"Sources","default":[]},"total_tokens":{"type":"integer","title":"Total Tokens","default":0}},"type":"object","required":["query"],"title":"RAGQueryResponse"},"RAGSourceResponse":{"properties":{"document_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Document Id"},"file_name":{"type":"string","title":"File Name","default":""},"app_name":{"type":"string","title":"App Name","default":""},"file_path":{"type":"string","title":"File Path","default":""},"chunks_used":{"type":"integer","title":"Chunks Used","default":0}},"type":"object","title":"RAGSourceResponse"},"ReadAllResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"marked_count":{"type":"integer","title":"Marked Count"}},"type":"object","required":["success","marked_count"],"title":"ReadAllResponse"},"ReasonBody":{"properties":{"reason":{"type":"string","maxLength":2000,"minLength":1,"title":"Reason"}},"additionalProperties":false,"type":"object","required":["reason"],"title":"ReasonBody","description":"``reject`` and ``deactivate``: the reason the submitter and the audit trail see."},"RebriefBody":{"properties":{"brief":{"type":"string","maxLength":8000,"minLength":1,"title":"Brief"}},"type":"object","required":["brief"],"title":"RebriefBody"},"RecentExecution":{"properties":{"id":{"type":"integer","title":"Id"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"app_name":{"type":"string","title":"App Name"},"action_name":{"type":"string","title":"Action Name"},"status":{"type":"string","title":"Status"},"execution_time_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Execution Time Ms"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"cache_hit":{"type":"boolean","title":"Cache Hit","default":false},"executed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Executed At"}},"type":"object","required":["id","app_name","action_name","status"],"title":"RecentExecution"},"Recommendation":{"properties":{"type":{"type":"string","title":"Type"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"potential_savings":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Potential Savings"},"affected_agent_ids":{"items":{"type":"integer"},"type":"array","title":"Affected Agent Ids"}},"type":"object","required":["type","title","description"],"title":"Recommendation"},"RecommendationRequest":{"properties":{"context":{"type":"string","title":"Context","description":"Context for recommendations"},"recommendation_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation Type","description":"Type of recommendations","default":"general"},"parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parameters","description":"Recommendation parameters"}},"type":"object","required":["context"],"title":"RecommendationRequest","description":"Request model for generating recommendations"},"RecordBody":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"RecordBody","description":"A record's data: every field to make it with, or the fields to change (a null removes an optional one)."},"ReferenceChange":{"properties":{"note":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Note"},"stance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stance"}},"additionalProperties":false,"type":"object","title":"ReferenceChange"},"RegisterDeviceRequest":{"properties":{"install_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,128}$","title":"Install Id"},"platform":{"type":"string","title":"Platform"},"app_version":{"type":"string","maxLength":32,"minLength":1,"title":"App Version"},"locale":{"type":"string","maxLength":35,"minLength":1,"title":"Locale"},"timezone":{"type":"string","maxLength":64,"minLength":1,"title":"Timezone"},"expo_push_token":{"anyOf":[{"type":"string","maxLength":255,"pattern":"^ExponentPushToken\\[[^\\[\\]\\s]+\\]$"},{"type":"null"}],"title":"Expo Push Token"},"digest_time":{"anyOf":[{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}],"title":"Digest Time"},"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"push_categories":{"items":{"type":"string"},"type":"array","maxItems":2,"title":"Push Categories"}},"type":"object","required":["install_id","platform","app_version","locale","timezone"],"title":"RegisterDeviceRequest","description":"``POST /devices``: this phone as it is now. An optional field left out keeps its value."},"RejectBody":{"properties":{"reason":{"type":"string","minLength":1,"title":"Reason","description":"Reason for rejection"}},"type":"object","required":["reason"],"title":"RejectBody"},"RejectRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"additionalProperties":false,"type":"object","title":"RejectRequest"},"RemoveIn":{"properties":{"models":{"items":{"$ref":"#/components/schemas/RouteIn"},"type":"array","maxItems":200,"minItems":1,"title":"Models"},"confirm":{"type":"boolean","title":"Confirm","default":false},"move_agents":{"type":"boolean","title":"Move Agents","default":false}},"additionalProperties":false,"type":"object","required":["models"],"title":"RemoveIn","description":"Models to take off the list; without ``confirm``, a preview."},"RenameRoomRequest":{"properties":{"title":{"type":"string","maxLength":255,"title":"Title"}},"additionalProperties":false,"type":"object","required":["title"],"title":"RenameRoomRequest","description":"``PATCH /api/rooms/{room_id}``."},"RenderRequest":{"properties":{"preview":{"type":"boolean","title":"Preview","default":false}},"additionalProperties":false,"type":"object","title":"RenderRequest"},"ReplaceSocialPostTargetsRequest":{"properties":{"targets":{"items":{"$ref":"#/components/schemas/SocialPostTargetSpec"},"type":"array","maxItems":50,"title":"Targets"}},"additionalProperties":false,"type":"object","required":["targets"],"title":"ReplaceSocialPostTargetsRequest"},"ReplyEmailRequest":{"properties":{"body":{"type":"string","minLength":1,"title":"Body"},"cc":{"items":{"type":"string"},"type":"array","title":"Cc"},"bcc":{"items":{"type":"string"},"type":"array","title":"Bcc"},"is_html":{"type":"boolean","title":"Is Html","default":false}},"type":"object","required":["body"],"title":"ReplyEmailRequest"},"ReplyEmailResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"ReplyEmailResponse"},"ReportNoteBody":{"properties":{"summary":{"type":"string","maxLength":20000,"minLength":1,"title":"Summary"},"outcome":{"type":"string","enum":["pass","fail"],"title":"Outcome"}},"additionalProperties":false,"type":"object","required":["summary","outcome"],"title":"ReportNoteBody","description":"The summary of the kit's isolated review job, pasted by the reviewer, and its outcome."},"ReportRequest":{"properties":{"target_type":{"type":"string","enum":["message","deliverable"],"title":"Target Type"},"target_id":{"type":"string","maxLength":64,"minLength":1,"title":"Target Id"},"reason":{"type":"string","enum":["harmful","offensive","inaccurate","privacy","other"],"title":"Reason"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"},"end_user_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$"},{"type":"null"}],"title":"End User Id"}},"additionalProperties":false,"type":"object","required":["target_type","target_id","reason"],"title":"ReportRequest","description":"What is reported and why; any other field is refused (422). ``end_user_id`` is a server\nkey's: the end user whose chat holds the message."},"RequestChangesRequest":{"properties":{"comment":{"type":"string","minLength":1,"title":"Comment"}},"additionalProperties":false,"type":"object","required":["comment"],"title":"RequestChangesRequest"},"ResetChange":{"properties":{"id":{"type":"integer","title":"Id"},"category":{"type":"string","title":"Category"},"key":{"type":"string","title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"default_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Value"}},"type":"object","required":["id","category","key","value","default_value"],"title":"ResetChange","description":"A row a reset would change: its value now and the default it returns to. Never a secret."},"ResetPreview":{"properties":{"changes":{"items":{"$ref":"#/components/schemas/ResetChange"},"type":"array","title":"Changes"}},"type":"object","required":["changes"],"title":"ResetPreview","description":"What ``POST /reset-to-defaults`` with the same ``category`` would change; nothing is changed."},"ResetRequest":{"properties":{"path":{"type":"string","maxLength":64,"minLength":1,"title":"Path"}},"additionalProperties":false,"type":"object","required":["path"],"title":"ResetRequest","description":"One of Auto's settings, by its path in the read (``heartbeat.interval_minutes``)."},"ResultRequest":{"properties":{"attempt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt"},"status":{"type":"string","pattern":"^(success|error|cancelled|usage_limit|host_stopped)$","title":"Status","default":"success"},"result_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Text"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage"},"files_touched":{"items":{"type":"string"},"type":"array","title":"Files Touched"},"permission_denials":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Permission Denials"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"exit_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exit Reason"},"transcript_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript Path"},"resets_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resets At"}},"type":"object","title":"ResultRequest"},"ResumeItem":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"text":{"type":"string","title":"Text"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"chat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chat Id"},"importance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Importance"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"}},"type":"object","required":["text"],"title":"ResumeItem","description":"One typed memory (decision / open loop) in the resume payload."},"ResumeResponse":{"properties":{"threads":{"items":{"$ref":"#/components/schemas/ResumeThread"},"type":"array","title":"Threads"},"recent_decisions":{"items":{"$ref":"#/components/schemas/ResumeItem"},"type":"array","title":"Recent Decisions"},"open_loops":{"items":{"$ref":"#/components/schemas/ResumeItem"},"type":"array","title":"Open Loops"},"suggested_next_steps":{"items":{"type":"string"},"type":"array","title":"Suggested Next Steps"},"projects":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Projects"}},"type":"object","required":["threads","recent_decisions","open_loops","suggested_next_steps","projects"],"title":"ResumeResponse","description":"Response for GET /api/memory/resume — 'where did we leave off?'"},"ResumeThread":{"properties":{"chat_id":{"type":"string","title":"Chat Id"},"title":{"type":"string","title":"Title"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Summary"}},"type":"object","required":["chat_id","title"],"title":"ResumeThread","description":"One recent thread in the resume payload (PRD-206 S3)."},"RetakeRequest":{"properties":{"guidance":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Guidance"}},"additionalProperties":false,"type":"object","title":"RetakeRequest"},"ReviewListResponse":{"properties":{"reviews":{"items":{"$ref":"#/components/schemas/ReviewOut"},"type":"array","title":"Reviews"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["reviews","total"],"title":"ReviewListResponse"},"ReviewOut":{"properties":{"id":{"type":"string","title":"Id"},"widget_id":{"type":"string","title":"Widget Id"},"user_id":{"type":"string","title":"User Id"},"rating":{"type":"integer","title":"Rating"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"is_verified_purchase":{"type":"boolean","title":"Is Verified Purchase","default":false},"status":{"type":"string","title":"Status","default":"published"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","widget_id","user_id","rating","created_at","updated_at"],"title":"ReviewOut"},"RevocationBody":{"properties":{"digest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Digest"},"themeId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Themeid"},"versionRange":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Versionrange"},"level":{"type":"string","title":"Level"},"reason":{"type":"string","title":"Reason"}},"additionalProperties":false,"type":"object","required":["level","reason"],"title":"RevocationBody","description":"``POST /api/admin/themes/revocations``: a digest, or a theme id with an optional range."},"RevokeResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"RevokeResponse"},"RoomTextPart":{"properties":{"type":{"type":"string","const":"text","title":"Type"},"text":{"type":"string","maxLength":20000,"title":"Text"}},"additionalProperties":false,"type":"object","required":["type","text"],"title":"RoomTextPart","description":"One part of a room message: text, and nothing else."},"RouteIn":{"properties":{"provider":{"type":"string","maxLength":50,"minLength":1,"title":"Provider"},"model_id":{"type":"string","maxLength":255,"minLength":1,"title":"Model Id"}},"additionalProperties":false,"type":"object","required":["provider","model_id"],"title":"RouteIn","description":"A model, by its route: the provider that serves it and its id there."},"RowVisual":{"properties":{"source":{"type":"string","maxLength":32,"title":"Source"},"toolkit":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Toolkit"}},"additionalProperties":false,"type":"object","required":["source"],"title":"RowVisual","description":"PRD-251C (US-C302): a row's own visual, and the toolkit of its AI media."},"RunningSession":{"properties":{"task_id":{"type":"integer","title":"Task Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"attempt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt"}},"type":"object","required":["task_id"],"title":"RunningSession"},"SaveAsRoutineRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Routine name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Optional routine description"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Optional tags for categorisation"}},"type":"object","required":["name"],"title":"SaveAsRoutineRequest"},"ScanResponse":{"properties":{"profile_id":{"type":"string","title":"Profile Id"},"archetype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archetype"},"confidence":{"type":"number","title":"Confidence"},"matched_signals":{"items":{"type":"string"},"type":"array","title":"Matched Signals"},"total_urls":{"type":"integer","title":"Total Urls"},"must_have_urls":{"items":{"type":"string"},"type":"array","title":"Must Have Urls"},"recommended_urls":{"items":{"type":"string"},"type":"array","title":"Recommended Urls"},"sample_urls":{"items":{"type":"string"},"type":"array","title":"Sample Urls"}},"type":"object","required":["profile_id","archetype","confidence","matched_signals","total_urls","must_have_urls","recommended_urls","sample_urls"],"title":"ScanResponse"},"ScanResultOut":{"properties":{"id":{"type":"string","title":"Id"},"plugin_slug":{"type":"string","title":"Plugin Slug"},"plugin_version":{"type":"string","title":"Plugin Version"},"static_scan_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Static Scan Status"},"static_findings":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Static Findings"},"blocked_patterns_found":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Blocked Patterns Found"},"llm_scan_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Scan Status"},"llm_risk_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Llm Risk Score"},"llm_findings":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Llm Findings"},"llm_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Summary"},"llm_model_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Model Used"},"llm_tokens_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Llm Tokens Used"},"overall_verdict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Overall Verdict"},"scanned_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scanned At"},"scanned_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scanned By"}},"type":"object","required":["id","plugin_slug","plugin_version"],"title":"ScanResultOut"},"ScheduleRequest":{"properties":{"scheduled_for":{"type":"string","format":"date-time","title":"Scheduled For"},"timezone":{"type":"string","title":"Timezone","default":"UTC"}},"additionalProperties":false,"type":"object","required":["scheduled_for"],"title":"ScheduleRequest"},"ScrapeAcceptedResponse":{"properties":{"profile_id":{"type":"string","title":"Profile Id"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["profile_id","status","message"],"title":"ScrapeAcceptedResponse"},"ScrapeBody":{"properties":{"selected_urls":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Selected Urls"}},"type":"object","required":["selected_urls"],"title":"ScrapeBody"},"SearchResponse":{"properties":{"project":{"type":"string","title":"Project"},"query":{"type":"string","title":"Query"},"count":{"type":"integer","title":"Count"},"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Results"},"execution_time_ms":{"type":"number","title":"Execution Time Ms"},"prompt_block":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Block"}},"type":"object","required":["project","query","count","results","execution_time_ms"],"title":"SearchResponse","description":"Response from search operations"},"SelectFolderRequest":{"properties":{"root_folder_path":{"type":"string","minLength":1,"title":"Root Folder Path"},"default_team_access":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Default Team Access","description":"PRD-158: teams applied to docs synced from this connection (normalized server-side)"}},"type":"object","required":["root_folder_path"],"title":"SelectFolderRequest"},"SelectFolderResponse":{"properties":{"status":{"type":"string","title":"Status","default":"success"},"root_folder_path":{"type":"string","title":"Root Folder Path"},"sync_enabled":{"type":"boolean","title":"Sync Enabled","default":true}},"type":"object","required":["root_folder_path"],"title":"SelectFolderResponse"},"SemanticDimensionRow":{"properties":{"category":{"type":"string","title":"Category"},"name":{"type":"string","title":"Name"},"sql":{"type":"string","title":"Sql"}},"type":"object","required":["category","name","sql"],"title":"SemanticDimensionRow"},"SemanticLayerBody":{"properties":{"instructions":{"type":"string","title":"Instructions","default":""},"metrics":{"items":{"$ref":"#/components/schemas/SemanticMetricRow"},"type":"array","title":"Metrics","default":[]},"dimensions":{"items":{"$ref":"#/components/schemas/SemanticDimensionRow"},"type":"array","title":"Dimensions","default":[]}},"type":"object","title":"SemanticLayerBody"},"SemanticMetricRow":{"properties":{"name":{"type":"string","title":"Name"},"sql":{"type":"string","title":"Sql"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""}},"type":"object","required":["name","sql"],"title":"SemanticMetricRow"},"SemanticSearchRequest":{"properties":{"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"min_similarity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Similarity"},"document_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Document Ids"},"team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team"}},"type":"object","title":"SemanticSearchRequest","description":"JSON body for POST /api/documents/search.\n\nNight 1 (2026-09-18): every agent that reached this route sent a JSON body —\nthe natural shape for a POST — and got a 422, because the parameters were\nquery-string only. Both shapes are accepted now; the body wins when both\ncarry a value."},"SendEmailRequest":{"properties":{"to":{"items":{"type":"string"},"type":"array","minItems":1,"title":"To"},"subject":{"type":"string","maxLength":998,"minLength":1,"title":"Subject"},"body":{"type":"string","minLength":1,"title":"Body"},"cc":{"items":{"type":"string"},"type":"array","title":"Cc"},"bcc":{"items":{"type":"string"},"type":"array","title":"Bcc"},"is_html":{"type":"boolean","title":"Is Html","default":false}},"type":"object","required":["to","subject","body"],"title":"SendEmailRequest"},"SendEmailResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"SendEmailResponse"},"SessionDecisionBody":{"properties":{"request_id":{"type":"string","maxLength":64,"minLength":1,"title":"Request Id"},"approved":{"type":"boolean","title":"Approved"}},"type":"object","required":["request_id","approved"],"title":"SessionDecisionBody"},"SessionModeSettingsRequest":{"properties":{"default_folder":{"anyOf":[{"type":"string","pattern":"^(projects|sessions)$"},{"type":"null"}],"title":"Default Folder"},"permission_mode":{"anyOf":[{"type":"string","pattern":"^(manual|edits|plan|auto)$"},{"type":"null"}],"title":"Permission Mode"}},"type":"object","title":"SessionModeSettingsRequest","description":"PRD-239 S6c: Settings → Session mode — where tickets run when their agent names no\nfolder, and the workspace's default permission mode (either or both)."},"SessionRequest":{"properties":{"agent_id":{"type":"integer","title":"Agent Id"},"chat_id":{"type":"string","maxLength":128,"minLength":1,"title":"Chat Id"}},"type":"object","required":["agent_id","chat_id"],"title":"SessionRequest","description":"PRD-239 S7 v2: open (or resume) the Runtime Canvas session with a session\nagent in a conversation — one ticket per chat and agent."},"SessionTokenRequest":{"properties":{"api_key":{"type":"string","title":"Api Key"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"permissions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Permissions"},"expires_in":{"type":"integer","title":"Expires In","default":3600}},"type":"object","required":["api_key"],"title":"SessionTokenRequest","description":"Body sent by a backend server to obtain a browser-safe session token."},"SessionTokenResponse":{"properties":{"session_token":{"type":"string","title":"Session Token"},"expires_at":{"type":"string","title":"Expires At"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"workspace_id":{"type":"string","title":"Workspace Id"},"widget_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Widget Config"}},"type":"object","required":["session_token","expires_at","permissions","workspace_id"],"title":"SessionTokenResponse","description":"Returned to the caller after a successful token exchange."},"SetAgentPersonaBody":{"properties":{"persona_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Persona Id"},"custom_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Prompt"},"use_custom":{"type":"boolean","title":"Use Custom","default":false}},"type":"object","title":"SetAgentPersonaBody"},"SettingsBody":{"properties":{"privateUploads":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Privateuploads"},"membersMayChoose":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Membersmaychoose"},"installRole":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Installrole"},"pins":{"anyOf":[{"items":{"$ref":"#/components/schemas/PinBody"},"type":"array","maxItems":50},{"type":"null"}],"title":"Pins"}},"additionalProperties":false,"type":"object","title":"SettingsBody","description":"``PUT /api/themes/settings``: only the keys sent change; null means the default.\n\nThe values are checked by ``services/themes/settings.py``, which answers a bad one with a\nplain 400 message."},"SettingsRequest":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"caps":{"anyOf":[{"$ref":"#/components/schemas/CapsChange"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"SettingsRequest","description":"``PUT …/settings``: the workspace switch and the caps to change; what is left out stays."},"SetupDoneBody":{"properties":{"setup_intent_id":{"type":"string","maxLength":255,"minLength":6,"pattern":"^seti_[A-Za-z0-9]+$","title":"Setup Intent Id"}},"type":"object","required":["setup_intent_id"],"title":"SetupDoneBody"},"ShownPostRequest":{"properties":{"post_id":{"type":"string","format":"uuid","title":"Post Id"},"content_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Content Hash"},"override_unsourced":{"type":"boolean","title":"Override Unsourced","default":false}},"additionalProperties":false,"type":"object","required":["post_id","content_hash"],"title":"ShownPostRequest"},"SignInExchangeRequest":{"properties":{"code":{"type":"string","title":"Code"},"code_verifier":{"type":"string","title":"Code Verifier"},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"app_version":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"App Version"}},"type":"object","required":["code","code_verifier"],"title":"SignInExchangeRequest","description":"``POST /sign-in/exchange``: a phone's one-time sign-in code, its PKCE verifier, and how it is named.\n\nThe code and the verifier carry no length rule here: any wrong one is the exchange's one refusal\n(``sign_in_codes.exchange_code``), never a validation error that would echo what was sent."},"SignatureBody":{"properties":{"requestId":{"type":"string","format":"uuid","title":"Requestid"},"signature":{"type":"string","maxLength":200,"minLength":1,"title":"Signature"}},"additionalProperties":false,"type":"object","required":["requestId","signature"],"title":"SignatureBody","description":"The base64 Ed25519 signature the kit's sign workflow returned, for one signature request."},"SimpleSuccessResponse":{"properties":{"success":{"type":"boolean","title":"Success"}},"type":"object","required":["success"],"title":"SimpleSuccessResponse"},"SkillContentResponse":{"properties":{"skill_id":{"type":"integer","title":"Skill Id"},"skill_name":{"type":"string","title":"Skill Name"},"load_level":{"type":"integer","title":"Load Level"},"content":{"type":"string","title":"Content"},"estimated_tokens":{"type":"integer","title":"Estimated Tokens"},"files_available":{"items":{"type":"string"},"type":"array","title":"Files Available"}},"type":"object","required":["skill_id","skill_name","load_level","content","estimated_tokens","files_available"],"title":"SkillContentResponse"},"SkillFileInfo":{"properties":{"file_path":{"type":"string","title":"File Path"},"file_type":{"type":"string","title":"File Type"},"content_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Summary"},"file_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size Bytes"},"estimated_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Tokens"},"load_level":{"type":"integer","title":"Load Level"}},"type":"object","required":["file_path","file_type","content_summary","file_size_bytes","estimated_tokens","load_level"],"title":"SkillFileInfo"},"SkillRecommendation":{"properties":{"skill_id":{"type":"integer","title":"Skill Id"},"skill_name":{"type":"string","title":"Skill Name"},"confidence":{"type":"number","title":"Confidence"},"reasoning":{"type":"string","title":"Reasoning"}},"type":"object","required":["skill_id","skill_name","confidence","reasoning"],"title":"SkillRecommendation"},"SkillRecommendationRequest":{"properties":{"task_description":{"type":"string","title":"Task Description"},"task_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type"},"limit":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Limit","default":5}},"type":"object","required":["task_description"],"title":"SkillRecommendationRequest"},"SkillSourceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"source_name":{"type":"string","title":"Source Name"},"source_type":{"type":"string","title":"Source Type"},"git_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Git Url"},"git_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Git Branch"},"git_commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Git Commit Sha"},"local_cache_path":{"type":"string","title":"Local Cache Path"},"auto_update":{"type":"boolean","title":"Auto Update"},"skills_discovered":{"type":"integer","title":"Skills Discovered"},"status":{"type":"string","title":"Status"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"},"last_sync_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Status"},"last_sync_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","source_name","source_type","git_url","git_branch","git_commit_sha","local_cache_path","auto_update","skills_discovered","status","last_sync_at","last_sync_status","last_sync_error","created_at","updated_at"],"title":"SkillSourceResponse"},"Slot":{"properties":{"name":{"type":"string","enum":["INSTRUCTION","MEMORY","RETRIEVAL","CODE","TOOLS","CONSTRAINTS"],"title":"Name"},"content":{"type":"string","title":"Content","default":""},"weight":{"type":"number","title":"Weight","default":1.0},"enabled":{"type":"boolean","title":"Enabled","default":true},"max_chars":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Chars"}},"type":"object","required":["name"],"title":"Slot"},"SlotMoveRequest":{"properties":{"to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"},"skip":{"type":"boolean","title":"Skip","default":false}},"additionalProperties":false,"type":"object","title":"SlotMoveRequest"},"SlotRequest":{"properties":{"planned_for":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Planned For"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"additionalProperties":false,"type":"object","title":"SlotRequest","description":"The slot a post is planned for; ``null`` clears it (before approval)."},"SocialPostTargetSpec":{"properties":{"toolkit":{"type":"string","maxLength":64,"minLength":1,"title":"Toolkit"},"post_kind":{"type":"string","minLength":1,"title":"Post Kind"},"options":{"additionalProperties":true,"type":"object","title":"Options"}},"additionalProperties":false,"type":"object","required":["toolkit","post_kind"],"title":"SocialPostTargetSpec","description":"One channel and post kind the post publishes to, with the kind's options."},"StaffingEntry":{"properties":{"agent":{"type":"string","maxLength":200,"minLength":1,"title":"Agent","description":"The agent's name, slug or id"},"does":{"type":"string","maxLength":2000,"minLength":1,"title":"Does","description":"Its work, in the owner's words"}},"type":"object","required":["agent","does"],"title":"StaffingEntry","description":"F142: one agent the owner named, and its work in the owner's words."},"StartBody":{"properties":{"domain":{"type":"string","maxLength":255,"minLength":3,"title":"Domain"},"goals":{"items":{"type":"string"},"type":"array","title":"Goals"}},"type":"object","required":["domain"],"title":"StartBody"},"StartRequest":{"properties":{"via":{"anyOf":[{"type":"string","enum":["web","go","push","chat","telegram"]},{"type":"null"}],"title":"Via"}},"additionalProperties":false,"type":"object","title":"StartRequest","description":"``POST …/start``: where the person pressed Start, nothing else."},"StartResponse":{"properties":{"profile_id":{"type":"string","title":"Profile Id"},"domain":{"type":"string","title":"Domain"},"status":{"type":"string","title":"Status"},"domain_verified":{"type":"boolean","title":"Domain Verified"}},"type":"object","required":["profile_id","domain","status","domain_verified"],"title":"StartResponse"},"StatsOut":{"properties":{"total_apps":{"type":"integer","title":"Total Apps"},"total_actions":{"type":"integer","title":"Total Actions"},"connected_apps":{"type":"integer","title":"Connected Apps"},"categories":{"additionalProperties":true,"type":"object","title":"Categories"},"last_synced":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Synced"}},"type":"object","required":["total_apps","total_actions","connected_apps","categories"],"title":"StatsOut"},"StyleSettings":{"properties":{"send_liked":{"type":"boolean","title":"Send Liked"}},"additionalProperties":false,"type":"object","required":["send_liked"],"title":"StyleSettings"},"SubmitRequest":{"properties":{"item_type":{"type":"string","title":"Item Type"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["item_type"],"title":"SubmitRequest"},"SuggestedModelIn":{"properties":{"model_id":{"type":"string","maxLength":255,"minLength":1,"title":"Model Id"}},"additionalProperties":false,"type":"object","required":["model_id"],"title":"SuggestedModelIn","description":"The model to suggest: its id in the provider's catalogue (``llm_models.model_id``)."},"SuggestedModelOut":{"properties":{"provider":{"type":"string","title":"Provider"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["provider"],"title":"SuggestedModelOut","description":"A provider's suggested model after the change; ``model_id`` is None when it has none."},"SuggestionsOut":{"properties":{"app":{"type":"string","title":"App"},"suggestions":{"items":{"type":"string"},"type":"array","title":"Suggestions"},"source":{"type":"string","title":"Source"},"has_context":{"type":"boolean","title":"Has Context","default":false}},"type":"object","required":["app","suggestions","source"],"title":"SuggestionsOut","description":"Response model for tool suggestions"},"SummarizationRequest":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"Session ID to summarize"},"compression_level":{"type":"string","title":"Compression Level","description":"Compression level: low, medium, high","default":"medium"},"preserve_entities":{"type":"boolean","title":"Preserve Entities","description":"Preserve named entities in summary","default":true}},"type":"object","required":["session_id"],"title":"SummarizationRequest","description":"Request for context summarization"},"SummarizationResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"executive_summary":{"type":"string","title":"Executive Summary","description":"High-level overview"},"key_facts":{"items":{"type":"string"},"type":"array","title":"Key Facts","description":"Important facts extracted"},"entities":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Entities","description":"Named entities"},"action_items":{"items":{"type":"string"},"type":"array","title":"Action Items","description":"Actionable items"},"original_token_count":{"type":"integer","title":"Original Token Count"},"summary_token_count":{"type":"integer","title":"Summary Token Count"},"compression_ratio":{"type":"number","title":"Compression Ratio"},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["session_id","executive_summary","key_facts","entities","action_items","original_token_count","summary_token_count","compression_ratio","timestamp"],"title":"SummarizationResponse","description":"Response with hierarchical summary"},"SwitchAgentRequest":{"properties":{"newAgentId":{"type":"integer","title":"Newagentid"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["newAgentId"],"title":"SwitchAgentRequest"},"SwitchIn":{"properties":{"limited":{"type":"boolean","title":"Limited"},"confirm":{"type":"boolean","title":"Confirm","default":false},"move_agents":{"type":"boolean","title":"Move Agents","default":false}},"additionalProperties":false,"type":"object","required":["limited"],"title":"SwitchIn","description":"The switch; without ``confirm``, a preview."},"SwitchOnBody":{"properties":{"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","required":["scopes"],"title":"SwitchOnBody","description":"The scopes the workspace manager was shown before switching the module on."},"SyncJobResponse":{"properties":{"id":{"type":"integer","title":"Id"},"status":{"type":"string","title":"Status"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"files_synced":{"type":"integer","title":"Files Synced","default":0},"files_skipped":{"type":"integer","title":"Files Skipped","default":0},"files_errored":{"type":"integer","title":"Files Errored","default":0},"total_chunks_created":{"type":"integer","title":"Total Chunks Created","default":0},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["id","status"],"title":"SyncJobResponse"},"SyncRequest":{"properties":{"shop":{"type":"string","title":"Shop"},"data":{"title":"Data"}},"type":"object","required":["shop"],"title":"SyncRequest"},"SyncStartResponse":{"properties":{"status":{"type":"string","title":"Status"},"workspace_id":{"type":"string","title":"Workspace Id"},"bulk_operation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bulk Operation Id"},"object_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Object Count"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"download_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Download Seconds"},"node_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Node Count"},"edge_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Edge Count"},"community_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Community Count"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["status","workspace_id"],"title":"SyncStartResponse"},"SyncStatusResponse":{"properties":{"connection_id":{"type":"integer","title":"Connection Id"},"app_name":{"type":"string","title":"App Name"},"sync_enabled":{"type":"boolean","title":"Sync Enabled"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"},"total_documents":{"type":"integer","title":"Total Documents","default":0},"synced":{"type":"integer","title":"Synced","default":0},"pending":{"type":"integer","title":"Pending","default":0},"errors":{"type":"integer","title":"Errors","default":0},"total_chunks":{"type":"integer","title":"Total Chunks","default":0}},"type":"object","required":["connection_id","app_name","sync_enabled"],"title":"SyncStatusResponse"},"SyncTriggerResponse":{"properties":{"job_id":{"type":"integer","title":"Job Id"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["job_id","status","message"],"title":"SyncTriggerResponse"},"SystemConfigCreate":{"properties":{"config_key":{"type":"string","title":"Config Key"},"config_value":{"title":"Config Value"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["config_key","config_value"],"title":"SystemConfigCreate"},"SystemConfigResponse":{"properties":{"id":{"type":"integer","title":"Id"},"config_key":{"type":"string","title":"Config Key"},"config_value":{"title":"Config Value"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","required":["id","config_key","config_value","description","is_active","created_at","updated_at","updated_by"],"title":"SystemConfigResponse"},"SystemHealthResponse":{"properties":{"overall_status":{"type":"string","title":"Overall Status"},"components":{"items":{"$ref":"#/components/schemas/ComponentHealth"},"type":"array","title":"Components"},"system_metrics":{"additionalProperties":true,"type":"object","title":"System Metrics"},"uptime":{"type":"string","title":"Uptime"},"version":{"type":"string","title":"Version"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"capabilities":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Capabilities"}},"type":"object","required":["overall_status","components","system_metrics","uptime","version","timestamp"],"title":"SystemHealthResponse","description":"Comprehensive system health response"},"SystemMetrics":{"properties":{"uptime":{"type":"string","title":"Uptime"},"cpu_usage":{"type":"number","title":"Cpu Usage"},"memory_usage":{"type":"number","title":"Memory Usage"},"active_connections":{"type":"integer","title":"Active Connections"},"total_requests":{"type":"integer","title":"Total Requests"},"error_rate":{"type":"number","title":"Error Rate"}},"type":"object","required":["uptime","cpu_usage","memory_usage","active_connections","total_requests","error_rate"],"title":"SystemMetrics","description":"System performance metrics"},"SystemSettingResponse":{"properties":{"id":{"type":"integer","title":"Id"},"category":{"type":"string","title":"Category"},"key":{"type":"string","title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"value_type":{"type":"string","title":"Value Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_sensitive":{"type":"boolean","title":"Is Sensitive","default":false},"is_required":{"type":"boolean","title":"Is Required","default":false},"default_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Value"},"validation_rules":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Validation Rules"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_by":{"type":"string","title":"Created By","default":"system"},"is_set":{"type":"boolean","title":"Is Set","default":false},"set_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Set At"},"set_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Set By Name"},"source":{"type":"string","enum":["default","here","environment"],"title":"Source","default":"default"},"locked":{"type":"boolean","title":"Locked","default":false},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"help":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Help"}},"type":"object","required":["id","category","key","value","value_type","description","default_value","validation_rules","created_at","updated_at"],"title":"SystemSettingResponse","description":"One setting as the system-settings routes answer it (PRD-293 §4.7).\n\n``is_set`` says whether the row holds a value; ``set_at`` and ``set_by_name`` say when and by whom a\nperson last saved it (the route fills the name). A row marked ``is_sensitive`` never carries its value\nor its default: only ``is_set``. Code inside the server reads a secret from the row, never from here.\n\n``source`` says where the value in force comes from (PRD-293 §4.6, D24): ``here`` (set on a screen or\nthrough Auto), ``environment`` or ``default``; with ``environment`` the route shows the environment's value\nas ``value``, never a secret's. ``locked`` says no screen and no tool may change it (the route fills both).\n\n``section``, ``label`` and ``help`` are the settings register's (PRD-293 §4.8, US-413): the Settings\nsection that draws the row, the words it is shown by, and one sentence on what it does; None for a row\nthe register does not hold (the route fills all three)."},"SystemSettingsByCategory":{"properties":{"category":{"type":"string","title":"Category"},"settings":{"items":{"$ref":"#/components/schemas/SystemSettingResponse"},"type":"array","title":"Settings"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["category","settings","total_count"],"title":"SystemSettingsByCategory","description":"Settings grouped by category"},"TeamMemberResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"},"joined_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Joined At"},"last_active_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Active At"},"tool_runs_30d":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tool Runs 30D"},"chats_30d":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chats 30D"},"invited_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited By Email"}},"type":"object","required":["id","user_id","email","name","role","joined_at"],"title":"TeamMemberResponse"},"TeamResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"normalized_name":{"type":"string","title":"Normalized Name"}},"type":"object","required":["id","name","normalized_name"],"title":"TeamResponse"},"TemplateCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"format":{"type":"string","title":"Format"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"template_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Content"},"data_schema":{"additionalProperties":true,"type":"object","title":"Data Schema"},"sample_data":{"additionalProperties":true,"type":"object","title":"Sample Data"},"category":{"type":"string","title":"Category","default":"general"},"tags":{"items":{},"type":"array","title":"Tags"},"blocks":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Blocks"}},"type":"object","required":["name","format"],"title":"TemplateCreateRequest"},"TemplateUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"template_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Content"},"data_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data Schema"},"sample_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sample Data"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"tags":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tags"},"blocks":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Blocks"}},"type":"object","title":"TemplateUpdateRequest"},"TerminalRequest":{"properties":{"task_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Task Id"},"cwd":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Cwd"},"shell":{"type":"boolean","title":"Shell","default":false}},"type":"object","title":"TerminalRequest","description":"PRD-239 S7: where the Canvas terminal should open — a ticket's real\ndirectory, or an agent's working directory; neither = the host's default."},"TopicFields":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"angle":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Angle"},"facts":{"anyOf":[{"items":{"$ref":"#/components/schemas/Fact"},"type":"array","maxItems":12},{"type":"null"}],"title":"Facts"},"formats":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Formats"},"pinned_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Pinned On"}},"additionalProperties":false,"type":"object","title":"TopicFields"},"TriggerSetupRequest":{"properties":{"trigger_name":{"type":"string","title":"Trigger Name","description":"Composio trigger name to subscribe to","default":"JIRA_NEW_ISSUE_TRIGGER"},"project_key":{"type":"string","title":"Project Key","description":"Jira project key to monitor","default":"PILOT"},"agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Id","description":"Agent ID to route triggered events to (optional)"},"workflow_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Id","description":"Workflow ID to route triggered events to (optional)"},"trigger_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger Config","description":"The trigger's own settings at Composio, passed through as given (optional)"}},"type":"object","title":"TriggerSetupRequest"},"TriggerSubscriptionRequest":{"properties":{"trigger_name":{"type":"string","title":"Trigger Name"},"agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Id"},"workflow_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Id"},"trigger_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger Config"}},"type":"object","required":["trigger_name"],"title":"TriggerSubscriptionRequest","description":"Subscribe to a trigger; ``trigger_config`` is the trigger's own settings at Composio (a repository, a project)."},"UnreadCountResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["success","count"],"title":"UnreadCountResponse"},"UpdateAgentPluginsBody":{"properties":{"plugin_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Plugin Ids","description":"List of plugin UUIDs to assign to the agent"}},"type":"object","required":["plugin_ids"],"title":"UpdateAgentPluginsBody"},"UpdateCampaignRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"approval_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approval Mode"}},"additionalProperties":false,"type":"object","title":"UpdateCampaignRequest"},"UpdateDeviceRequest":{"properties":{"push_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Push Enabled"},"digest_time":{"anyOf":[{"type":"string","pattern":"^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}],"title":"Digest Time"},"timezone":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Timezone"}},"additionalProperties":false,"type":"object","title":"UpdateDeviceRequest","description":"``PATCH /devices/{device_id}``: only these three; any other field is 422."},"UpdateInfo":{"properties":{"item_id":{"type":"integer","title":"Item Id"},"item_name":{"type":"string","title":"Item Name"},"item_type":{"type":"string","title":"Item Type"},"current_version":{"type":"string","title":"Current Version"},"latest_version":{"type":"string","title":"Latest Version"},"changelog":{"type":"string","title":"Changelog"}},"type":"object","required":["item_id","item_name","item_type","current_version","latest_version","changelog"],"title":"UpdateInfo"},"UpdateMemberRoleRequest":{"properties":{"role":{"type":"string","title":"Role"}},"type":"object","required":["role"],"title":"UpdateMemberRoleRequest"},"UpdatePersonaBody":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"voice_description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Voice Description"},"category":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Category"},"suggested_temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Suggested Temperature"}},"type":"object","title":"UpdatePersonaBody"},"UpdatePostRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Title"},"content":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Content"},"excerpt":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Excerpt"},"cover_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Image Url"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"seo_title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Seo Title"},"seo_description":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Seo Description"}},"type":"object","title":"UpdatePostRequest"},"UpdateReviewRequest":{"properties":{"rating":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Rating"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"type":"object","title":"UpdateReviewRequest"},"UpdateSiteMetaRequest":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Display Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"One of ['active', 'paused', 'disconnected']"}},"type":"object","title":"UpdateSiteMetaRequest"},"UpdateSiteSettingsRequest":{"properties":{"settings":{"additionalProperties":true,"type":"object","title":"Settings","description":"Top-level keys merge into site.settings"}},"type":"object","required":["settings"],"title":"UpdateSiteSettingsRequest"},"UpdateSkillBody":{"properties":{"content":{"type":"string","minLength":1,"title":"Content"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"acknowledge_warnings":{"type":"boolean","title":"Acknowledge Warnings","default":false}},"type":"object","required":["content"],"title":"UpdateSkillBody"},"UpdateSocialPostRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Title"},"brief":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brief"},"copy":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Copy"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Template Id"},"variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Variables"},"sources":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sources"},"media":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Media"},"voice":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Voice"},"footage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Footage"},"music":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Music"},"look":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Look"},"length_seconds":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Length Seconds"}},"additionalProperties":false,"type":"object","title":"UpdateSocialPostRequest"},"UpdateStatusRequest":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"UpdateStatusRequest"},"UpdateTitleRequest":{"properties":{"title":{"type":"string","title":"Title"}},"type":"object","required":["title"],"title":"UpdateTitleRequest"},"UpdateWidgetRequest":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"long_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Long Description"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"pricing_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Type"},"price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Cents"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url"},"screenshots":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Screenshots"},"readme":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Readme"},"changelog":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changelog"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"bundle_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Url"},"bundle_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bundle Size"},"permissions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Permissions"},"min_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Plan"}},"type":"object","title":"UpdateWidgetRequest"},"UsageEventRequest":{"properties":{"event_type":{"type":"string","title":"Event Type","description":"Event type (document_viewed, document_searched, chunk_retrieved, rag_query)"},"document_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Document Id","description":"Document ID (if applicable)"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query","description":"Search query (if applicable)"},"results_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Results Count","description":"How many results the search returned"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional metadata"}},"type":"object","required":["event_type"],"title":"UsageEventRequest","description":"A usage event as the web app sends it (``useTrackSearchQuery``): a JSON body."},"UsageGroup":{"properties":{"key":{"type":"string","title":"Key"},"request_count":{"type":"integer","title":"Request Count"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"},"total_cost":{"type":"number","title":"Total Cost"},"cache_read_tokens":{"type":"integer","title":"Cache Read Tokens","default":0},"cache_write_tokens":{"type":"integer","title":"Cache Write Tokens","default":0},"error_count":{"type":"integer","title":"Error Count","default":0},"avg_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Latency Ms"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"provider_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Label"},"billing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["key","request_count","input_tokens","output_tokens","total_tokens","total_cost"],"title":"UsageGroup"},"UsageSummary":{"properties":{"total_requests":{"type":"integer","title":"Total Requests"},"total_tokens":{"type":"integer","title":"Total Tokens"},"total_cost":{"type":"number","title":"Total Cost"},"avg_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Latency Ms"},"error_rate":{"type":"number","title":"Error Rate"},"top_models":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Top Models"},"cost_trend":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Cost Trend"},"cache_read_tokens":{"type":"integer","title":"Cache Read Tokens","default":0},"cache_write_tokens":{"type":"integer","title":"Cache Write Tokens","default":0},"by_provider":{"items":{"$ref":"#/components/schemas/ProviderUsage"},"type":"array","title":"By Provider"}},"type":"object","required":["total_requests","total_tokens","total_cost","avg_latency_ms","error_rate","top_models","cost_trend"],"title":"UsageSummary"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerticalDomainsRequest":{"properties":{"external_id":{"type":"string","title":"External Id","description":"Vertical-scoped external id."},"domains":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Domains","description":"Replacement origin allowlist (hostnames or origins)."}},"type":"object","required":["external_id","domains"],"title":"VerticalDomainsRequest"},"VerticalGdprEraseRequest":{"properties":{"external_id":{"type":"string","title":"External Id","description":"Vertical-scoped external id (e.g. shop domain)."}},"type":"object","required":["external_id"],"title":"VerticalGdprEraseRequest"},"VerticalGdprEraseSubjectRequest":{"properties":{"external_id":{"type":"string","title":"External Id","description":"Vertical-scoped external id (e.g. shop domain)."},"subject_id":{"type":"string","title":"Subject Id","description":"Data subject id to erase (e.g. Shopify customer id)."}},"type":"object","required":["external_id","subject_id"],"title":"VerticalGdprEraseSubjectRequest"},"VerticalProvisionRequest":{"properties":{"external_id":{"type":"string","title":"External Id","description":"Vertical-scoped external id (e.g. shop domain)."},"name":{"type":"string","title":"Name","description":"Workspace display name."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["external_id","name"],"title":"VerticalProvisionRequest"},"VerticalProvisionResponse":{"properties":{"id":{"type":"string","title":"Id"},"public_id":{"type":"string","title":"Public Id"},"name":{"type":"string","title":"Name"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Public widget API key — shown once when minted. Null when the vertical declares reuse_existing_key and an active key already exists (the caller keeps its stored copy)."},"key_minted":{"type":"boolean","title":"Key Minted","description":"Whether this call minted a new key.","default":true},"agents_installed":{"type":"integer","title":"Agents Installed"},"is_new":{"type":"boolean","title":"Is New"}},"type":"object","required":["id","public_id","name","agents_installed","is_new"],"title":"VerticalProvisionResponse"},"VoteRequest":{"properties":{"chatId":{"type":"string","title":"Chatid"},"messageId":{"type":"string","title":"Messageid"},"isUpvoted":{"type":"boolean","title":"Isupvoted"}},"type":"object","required":["chatId","messageId","isUpvoted"],"title":"VoteRequest"},"WidgetChatRequest":{"properties":{"message":{"type":"string","title":"Message"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"page_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Page Context"},"trigger_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Reason"}},"type":"object","required":["message"],"title":"WidgetChatRequest"},"WidgetConfigResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["workspace_id","config"],"title":"WidgetConfigResponse","description":"Public widget runtime config returned to the browser SDK."},"WidgetDetailOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"developer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Developer Id"},"developer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Developer Name"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"pricing_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Type","default":"free"},"price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Cents"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","default":"USD"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords"},"install_count":{"type":"integer","title":"Install Count","default":0},"rating_average":{"type":"number","title":"Rating Average","default":0.0},"rating_count":{"type":"integer","title":"Rating Count","default":0},"status":{"type":"string","title":"Status","default":"draft"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"long_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Long Description"},"readme":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Readme"},"changelog":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changelog"},"screenshots":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Screenshots"},"bundle_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Url"},"bundle_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bundle Size"},"permissions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Permissions"},"min_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Plan"}},"type":"object","required":["id","name","display_name","created_at","updated_at"],"title":"WidgetDetailOut"},"WidgetListResponse":{"properties":{"widgets":{"items":{"$ref":"#/components/schemas/WidgetSummaryOut"},"type":"array","title":"Widgets"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["widgets","total","page","page_size"],"title":"WidgetListResponse"},"WidgetMessageOut":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","role","content","created_at"],"title":"WidgetMessageOut"},"WidgetSummaryOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"developer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Developer Id"},"developer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Developer Name"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"pricing_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricing Type","default":"free"},"price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Cents"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","default":"USD"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url"},"categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Categories"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords"},"install_count":{"type":"integer","title":"Install Count","default":0},"rating_average":{"type":"number","title":"Rating Average","default":0.0},"rating_count":{"type":"integer","title":"Rating Count","default":0},"status":{"type":"string","title":"Status","default":"draft"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","display_name","created_at","updated_at"],"title":"WidgetSummaryOut"},"WorkflowActionResponse":{"properties":{"workflow_id":{"type":"integer","title":"Workflow Id"},"execution_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Execution Id"},"action":{"type":"string","title":"Action"},"previous_status":{"type":"string","title":"Previous Status"},"new_status":{"type":"string","title":"New Status"},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["workflow_id","action","previous_status","new_status","timestamp"],"title":"WorkflowActionResponse","description":"Response returned from pause / resume / cancel actions."},"WorkflowStatusResponse":{"properties":{"workflow_id":{"type":"integer","title":"Workflow Id"},"workflow_name":{"type":"string","title":"Workflow Name"},"workflow_status":{"type":"string","title":"Workflow Status"},"execution_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Execution Id"},"execution_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Status"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"steps":{"items":{"$ref":"#/components/schemas/WorkflowStepStatus"},"type":"array","title":"Steps"},"progress_pct":{"type":"number","title":"Progress Pct","description":"Overall progress percentage (0-100)","default":0.0}},"type":"object","required":["workflow_id","workflow_name","workflow_status"],"title":"WorkflowStatusResponse","description":"Full workflow status including execution steps."},"WorkflowStepStatus":{"properties":{"stage":{"type":"integer","title":"Stage"},"stage_name":{"type":"string","title":"Stage Name"},"status":{"type":"string","title":"Status","description":"pending | running | completed | failed | skipped"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"}},"type":"object","required":["stage","stage_name","status"],"title":"WorkflowStepStatus","description":"Status of a single step / stage within a workflow execution."},"WorkspaceCostEntry":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"workspace_name":{"type":"string","title":"Workspace Name"},"plan":{"type":"string","title":"Plan"},"total_cost":{"type":"number","title":"Total Cost"},"total_tokens":{"type":"integer","title":"Total Tokens"},"total_requests":{"type":"integer","title":"Total Requests"},"top_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Top Model"}},"type":"object","required":["workspace_id","workspace_name","plan","total_cost","total_tokens","total_requests"],"title":"WorkspaceCostEntry"},"WorkspaceDetail":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"is_personal":{"type":"boolean","title":"Is Personal","default":false},"is_active":{"type":"boolean","title":"Is Active","default":true},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"agents_count":{"type":"integer","title":"Agents Count","default":0},"documents_count":{"type":"integer","title":"Documents Count","default":0},"storage_bytes":{"type":"integer","title":"Storage Bytes","default":0},"chats_count":{"type":"integer","title":"Chats Count","default":0},"members_count":{"type":"integer","title":"Members Count","default":0},"last_active_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Active At"},"plan_limits":{"additionalProperties":true,"type":"object","title":"Plan Limits"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"paused_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paused At"},"paused_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paused Reason"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deleted At"},"clerk_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clerk Org Id"},"messages_count":{"type":"integer","title":"Messages Count","default":0},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name"],"title":"WorkspaceDetail"},"WorkspaceRequest":{"properties":{"external_id":{"type":"string","pattern":"^[A-Za-z0-9._:@/-]{1,255}$","title":"External Id","description":"The product's own id for this customer (letters, digits and . _ : @ / -)"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"The workspace's name, when it is created"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Kept on a new workspace, for the product"},"allowed_domains":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Allowed Domains","description":"Origins a public key may be used from (required for one)"}},"type":"object","required":["external_id","name"],"title":"WorkspaceRequest"},"WriteFileRequest":{"properties":{"path":{"type":"string","maxLength":1024,"minLength":1,"title":"Path","description":"Relative file path inside workspace"},"content":{"type":"string","title":"Content","description":"File content to write"}},"type":"object","required":["path","content"],"title":"WriteFileRequest"},"_BulkTeamAccessUpdate":{"properties":{"document_ids":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Document Ids","description":"Document IDs to update"},"team_access":{"items":{"type":"string"},"type":"array","title":"Team Access","description":"List of team names"}},"type":"object","required":["document_ids","team_access"],"title":"_BulkTeamAccessUpdate"},"_Editable":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"agent_slugs":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":50},{"type":"null"}],"title":"Agent Slugs","description":"Marketplace agents each customer's workspace starts with"},"ops_manager_slug":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Ops Manager Slug","description":"The roster agent the others report to; one of agent_slugs"},"key_type":{"anyOf":[{"type":"string","enum":["public","server"]},{"type":"null"}],"title":"Key Type"},"key_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Key Scopes","description":"The scopes of the key each customer's workspace gets"},"reuse_existing_key":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reuse Existing Key","description":"Finding a workspace again mints no new key while it has an active one (default); false mints one each time"},"default_retention_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Default Retention Days","description":"Days an end user's memories are kept when the product records none for them; none: until erased"}},"additionalProperties":false,"type":"object","title":"_Editable","description":"What an admin may set on a product, at creation and after."},"_TeamAccessUpdate":{"properties":{"team_access":{"items":{"type":"string"},"type":"array","title":"Team Access","description":"List of team names"}},"type":"object","required":["team_access"],"title":"_TeamAccessUpdate"},"api__cli_hosts__PairRequest":{"properties":{"code":{"type":"string","maxLength":32,"minLength":4,"title":"Code"},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"capabilities":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Capabilities"}},"type":"object","required":["code"],"title":"PairRequest"},"api__context__RAGConfigCreate":{"properties":{"name":{"type":"string","title":"Name"},"embedding_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding Model"},"chunk_size":{"type":"integer","title":"Chunk Size","default":1000},"chunk_overlap":{"type":"integer","title":"Chunk Overlap","default":200},"retrieval_strategy":{"type":"string","title":"Retrieval Strategy","default":"similarity"},"top_k":{"type":"integer","title":"Top K","default":5},"similarity_threshold":{"type":"number","title":"Similarity Threshold","default":0.7},"configuration":{"additionalProperties":true,"type":"object","title":"Configuration","default":{}}},"type":"object","required":["name"],"title":"RAGConfigCreate"},"api__knowledge_multimodal__DocumentUploadResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"document_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Document Id"},"knowledge_items_created":{"type":"integer","title":"Knowledge Items Created"},"tables_extracted":{"type":"integer","title":"Tables Extracted"},"images_extracted":{"type":"integer","title":"Images Extracted"},"formulas_extracted":{"type":"integer","title":"Formulas Extracted"},"processing_time_ms":{"type":"integer","title":"Processing Time Ms"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","document_id","knowledge_items_created","tables_extracted","images_extracted","formulas_extracted","processing_time_ms","message"],"title":"DocumentUploadResponse","description":"Response after document upload"},"api__llm_marketplace__ReasonOut":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"ReasonOut","description":"A stable code and the plain sentence a screen shows (PRD-287 US-301)."},"api__marketplace_plugins__CategoryOut":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"}},"type":"object","required":["id","slug","name"],"title":"CategoryOut"},"api__mobile_devices__PairRequest":{"properties":{"code":{"type":"string","maxLength":32,"minLength":1,"title":"Code"},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"platform":{"type":"string","title":"Platform"},"app_version":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"App Version"},"install_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,128}$","title":"Install Id"}},"type":"object","required":["code","platform","install_id"],"title":"PairRequest","description":"``POST /pair``: the one-time code and the device that presents it."},"api__model_moves_out__ReasonOut":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"ReasonOut"},"api__module_packages__PackageBody":{"properties":{"manifest":{"additionalProperties":true,"type":"object","title":"Manifest"},"files":{"additionalProperties":{"type":"string"},"type":"object","title":"Files"},"signature":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Signature"},"services_confirmed":{"type":"boolean","title":"Services Confirmed","default":false}},"type":"object","required":["manifest"],"title":"PackageBody","description":"A module's package: its manifest, the text of the files it lists (path to text), the signature\nenvelope that travels beside it, and whether the operator confirms its services run."},"api__themes_install__PackageBody":{"properties":{"packageId":{"type":"string","format":"uuid","title":"Packageid"}},"additionalProperties":false,"type":"object","required":["packageId"],"title":"PackageBody","description":"The package an opt-in or an update is for."},"api__widget_marketplace__CategoryOut":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["name","count"],"title":"CategoryOut"},"core__models__core__DocumentUploadResponse":{"properties":{"document_id":{"type":"integer","title":"Document Id"},"filename":{"type":"string","title":"Filename"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["document_id","filename","status","message"],"title":"DocumentUploadResponse"},"core__models__core__RAGConfigCreate":{"properties":{"name":{"type":"string","title":"Name"},"embedding_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding Model"},"chunk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Size","default":1000},"chunk_overlap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Overlap","default":200},"retrieval_strategy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retrieval Strategy","default":"similarity"},"top_k":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top K","default":5},"similarity_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Similarity Threshold","default":0.7},"configuration":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configuration"}},"type":"object","required":["name"],"title":"RAGConfigCreate"}}}}