{"openapi":"3.0.3","info":{"title":"Duvo Public API — v1 (DEPRECATED)","description":"DEPRECATED — /v1 application routes are being sunset on Mon, 15 Jun 2026. Migrate to /v2 (https://api.duvo.ai/v2/documentation). Note: /v1/mcp is NOT deprecated and will continue to work after the sunset. Authenticate with API keys created in the Duvo dashboard.","version":"1.0.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key authentication. Get your API key from the Duvo dashboard."}},"schemas":{"ArtifactChatJsonValueInput":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"},{"type":"null"}]},{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/ArtifactChatJsonValueInput"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ArtifactChatJsonValueInput"}}]},"ArtifactChatJsonValue":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"},{"type":"null"}]},{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/ArtifactChatJsonValue"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ArtifactChatJsonValue"}}]}}},"paths":{"/v1/mcp":{"post":{"tags":["MCP"],"description":"MCP JSON-RPC endpoint (Streamable HTTP transport). Exposes every public API route as an LLM-callable tool.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response"}}},"get":{"tags":["MCP"],"description":"MCP Streamable HTTP: GET is not supported (no server-initiated streaming). Use POST.","responses":{"200":{"description":"Default Response"}}}},"/v1/agents/{agent_id}/memory/files":{"get":{"operationId":"listAgentMemoryFiles","tags":["Agent Memory"],"description":"List the memory files stored for an agent (Assignment in the Duvo UI).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"File name without its directory prefix"},"path":{"type":"string","description":"Relative path of the file within agent memory"},"updated_at":{"description":"Last-modified timestamp (ISO 8601)","type":"string"},"generation":{"description":"GCS object generation of the file's current contents","type":"string"},"source_type":{"type":"string","enum":["job","user"]},"source_agent_run_id":{"type":"string"},"source_user_id":{"type":"string"},"source_updated_at":{"type":"string"}},"required":["name","path"],"additionalProperties":false}}},"required":["files"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Agent Memory Files","deprecated":true}},"/v1/agents/{agent_id}/memory/files/{*}":{"get":{"operationId":"getAgentMemoryFile","tags":["Agent Memory"],"description":"Get the contents of a single memory file for an agent (Assignment in the Duvo UI).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"},{"schema":{"type":"string","minLength":1},"in":"path","name":"*","required":true,"description":"Relative path to the memory file, e.g. notes.md or context/customer.md"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"Relative path of the file within agent memory"},"content":{"type":"string","description":"UTF-8 decoded contents of the file"},"generation":{"description":"GCS object generation of the file's current contents","type":"string"},"source_type":{"type":"string","enum":["job","user"]},"source_agent_run_id":{"type":"string"},"source_user_id":{"type":"string"},"source_updated_at":{"type":"string"}},"required":["path","content"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Agent Memory File","deprecated":true}},"/v1/plugins/catalog":{"get":{"operationId":"listPluginCatalog","tags":["Plugins"],"description":"List plugins that can be referenced by name in a build's plugins array. Builds may also reference any public GitHub repository URL (https://github.com/owner/repo) as a plugin; those are not enumerated here.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"plugins":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Identifier to pass in the build's plugins array."},"type":{"type":"string","description":"Plugin source. 'duvo-platform' plugins are pre-baked into the Duvo runtime; 'knowledge-work' plugins are role-oriented bundles (engineering, sales, legal, …) also baked into the runtime; 'github' plugins are downloaded from a user-supplied repository URL at run time.","x-extensible-enum":["duvo-platform","knowledge-work","github"]},"description":{"type":"string"}},"required":["name","type","description"],"additionalProperties":false}}},"required":["plugins"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Plugin Catalog","deprecated":true}},"/v1/agents/{agent_id}/schedules":{"post":{"operationId":"createSchedule","tags":["Schedules"],"description":"Create a schedule for an agent (Assignment in the Duvo UI). The schedule fires against the agent's live build. The authenticated user owns the schedule.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"frequency":{"type":"string","enum":["every_5_minutes","every_15_minutes","hourly","daily","workday","weekly","monthly","custom"]},"time":{"nullable":true,"type":"string"},"timezone":{"type":"string"},"day":{"nullable":true,"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"day_of_month":{"nullable":true,"type":"integer","minimum":1,"maximum":31},"cron":{"nullable":true,"type":"string"},"recurring":{"nullable":true,"type":"boolean"}},"required":["enabled","frequency","timezone"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"build_id":{"type":"string"},"agent_id":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"frequency":{"type":"string","enum":["every_5_minutes","every_15_minutes","hourly","daily","workday","weekly","monthly","custom"]},"time":{"nullable":true,"type":"string"},"timezone":{"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"cron":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"task":{"nullable":true,"type":"string"},"recurring":{"nullable":true,"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Schedule","deprecated":true},"get":{"operationId":"listAgentSchedules","tags":["Schedules"],"description":"List all schedules configured for an agent. Returns the schedules you own on this agent.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"build_id":{"type":"string"},"agent_id":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"frequency":{"type":"string","enum":["every_5_minutes","every_15_minutes","hourly","daily","workday","weekly","monthly","custom"]},"time":{"nullable":true,"type":"string"},"timezone":{"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"cron":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"task":{"nullable":true,"type":"string"},"recurring":{"nullable":true,"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","created_at","updated_at"],"additionalProperties":false},"description":"Schedules the authenticated user owns on this agent"}},"required":["schedules"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Agent Schedules","deprecated":true}},"/v1/agents/{agent_id}/schedules/{schedule_id}":{"patch":{"operationId":"updateSchedule","tags":["Schedules"],"description":"Update fields on an existing schedule. Only supplied fields are changed; omitted fields retain their current values. Owners may update their own schedules; team superadmins may update any schedule on agents in the current team.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"frequency":{"type":"string","enum":["every_5_minutes","every_15_minutes","hourly","daily","workday","weekly","monthly","custom"]},"time":{"nullable":true,"type":"string"},"timezone":{"type":"string"},"day":{"nullable":true,"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"day_of_month":{"nullable":true,"type":"integer","minimum":1,"maximum":31},"cron":{"nullable":true,"type":"string"},"recurring":{"nullable":true,"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"schedule_id","required":true,"description":"The schedule's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"build_id":{"type":"string"},"agent_id":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"frequency":{"type":"string","enum":["every_5_minutes","every_15_minutes","hourly","daily","workday","weekly","monthly","custom"]},"time":{"nullable":true,"type":"string"},"timezone":{"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"cron":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"task":{"nullable":true,"type":"string"},"recurring":{"nullable":true,"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Schedule","deprecated":true},"delete":{"operationId":"deleteSchedule","tags":["Schedules"],"description":"Delete a schedule. Owners may delete their own schedules; team superadmins may delete any schedule on agents in the current team.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"schedule_id","required":true,"description":"The schedule's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Schedule","deprecated":true}},"/v1/teams/{teamId}":{"get":{"operationId":"getTeam","tags":["Team"],"description":"Get a team by ID. The caller must be scoped to the requested team.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"teamId","required":true,"description":"Team ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique team identifier"},"name":{"type":"string","description":"Human-readable team name"},"organization_id":{"nullable":true,"description":"Parent organization ID, or null if the team is standalone","type":"string","format":"uuid"},"slack_team_id":{"nullable":true,"description":"Linked Slack workspace ID, or null if Slack is not connected","type":"string"},"discovery_mode":{"type":"string","description":"How the team handles agent discovery (e.g. open, closed)"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"}},"required":["id","name","organization_id","slack_team_id","discovery_mode","created_at"],"additionalProperties":false}},"required":["team"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Team","deprecated":true}},"/v1/revisions":{"post":{"tags":["Revisions"],"description":"Deprecated: use POST /v2/teams/:team_id/agents/{agent_id}/revisions instead. Scheduled for removal on 2026-05-22.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid","description":"Agent ID"},"name":{"type":"string","minLength":1,"description":"Build name"},"config":{"description":"Build configuration; falls back to the agent default when omitted.","type":"object","properties":{"version":{"type":"string","enum":["v2"],"description":"Schema version discriminator — must be \"v2\" for the current schema"},"data":{"type":"object","properties":{"models":{"type":"object","properties":{"agent":{"type":"object","properties":{"model":{"type":"string","enum":["claude-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","d1-max","duvo-1-max","duvo-1-max-sonnet-1m","duvo-1-max-sonnet-4.5","duvo-1-max-sonnet-4.5-1m","duvo-1-max-opus","duvo-1-max-opus-4.5","gpt-4.1","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","claude-sonnet-4-20250514","claude-sonnet-4-20250514[1m]","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101"],"description":"Claude model identifier used for the primary agent loop"}},"required":["model"],"description":"Primary Claude agent model configuration"},"browsing":{"type":"object","properties":{"provider":{"type":"string","enum":["google","anthropic"],"description":"Provider backing the browsing/computer-use model"},"model":{"type":"string","enum":["gemini-2.5-pro","gemini-2.5-flash","gemini-3-pro-preview","claude-haiku-4-5","claude-sonnet-4-5","claude-opus-4-1"],"description":"Model identifier for the browsing provider"}},"required":["provider","model"],"description":"Browsing/computer-use model configuration"}},"required":["agent","browsing"],"description":"Model configuration for each capability the agent uses"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"]}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"]}}],"description":"Initial agent instructions — either a single system prompt string or a list of structured messages"},"files":{"default":[],"description":"IDs of team files that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"description":"IDs of skills (team or system) that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"plugins":{"default":[],"description":"Plugins to load — either a built-in plugin name (e.g. \"code-review\") or a GitHub URL (e.g. \"https://github.com/owner/repo\")","nullable":true,"type":"array","items":{"type":"string"}},"subAgents":{"default":[],"description":"IDs of other assignments (agents in the same team) to expose to this assignment as Claude Code subagents. Each sub-assignment runs with its own SOP and connections; the parent can delegate to them via the Agent tool.","nullable":true,"type":"array","items":{"type":"string","format":"uuid"}},"options":{"description":"Optional runtime options controlling how the agent executes","type":"object","properties":{"browserProvider":{"description":"Browser infrastructure provider","type":"string","enum":["browserbase","browser-use"]},"evaluationSchemaId":{"description":"ID of the evaluation schema to apply to runs of this agent","type":"string"},"benchmarkExpectedOutcomes":{"description":"Expected outcomes used when running benchmark scenarios","type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Human-readable description of the expected outcome"},"criteria":{"type":"string","description":"Pass/fail criteria used to evaluate the outcome"}},"required":["description","criteria"]}}},"additionalProperties":{}}},"required":["models","input"],"description":"Agent configuration payload"}},"required":["version","data"]}},"required":["agent_id","name"]}}}},"deprecated":true,"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"build":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"copilot_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"revision_name":{"nullable":true,"type":"string"},"revision_description":{"nullable":true,"type":"string"},"config":{"nullable":true,"anyOf":[{"type":"object","properties":{"version":{"type":"string","enum":["v1"]},"data":{"type":"object","properties":{"model":{"type":"string"},"temperature":{"nullable":true,"type":"number","minimum":0,"maximum":2},"max_output_tokens":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true},"top_p":{"nullable":true,"type":"number","minimum":0,"maximum":1},"store":{"nullable":true,"type":"boolean"},"tools":{},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}]},"text":{"nullable":true,"type":"object","properties":{"format":{"nullable":true,"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false}]}},"additionalProperties":false},"files":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}}},"required":["model","tools","input","files","skills"],"additionalProperties":false}},"required":["version","data"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","enum":["v2"],"description":"Schema version discriminator — must be \"v2\" for the current schema"},"data":{"type":"object","properties":{"models":{"type":"object","properties":{"agent":{"type":"object","properties":{"model":{"type":"string","enum":["claude-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","d1-max","duvo-1-max","duvo-1-max-sonnet-1m","duvo-1-max-sonnet-4.5","duvo-1-max-sonnet-4.5-1m","duvo-1-max-opus","duvo-1-max-opus-4.5","gpt-4.1","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","claude-sonnet-4-20250514","claude-sonnet-4-20250514[1m]","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101"],"description":"Claude model identifier used for the primary agent loop"}},"required":["model"],"additionalProperties":false,"description":"Primary Claude agent model configuration"},"browsing":{"type":"object","properties":{"provider":{"type":"string","enum":["google","anthropic"],"description":"Provider backing the browsing/computer-use model"},"model":{"type":"string","enum":["gemini-2.5-pro","gemini-2.5-flash","gemini-3-pro-preview","claude-haiku-4-5","claude-sonnet-4-5","claude-opus-4-1"],"description":"Model identifier for the browsing provider"}},"required":["provider","model"],"additionalProperties":false,"description":"Browsing/computer-use model configuration"}},"required":["agent","browsing"],"additionalProperties":false,"description":"Model configuration for each capability the agent uses"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}],"description":"Initial agent instructions — either a single system prompt string or a list of structured messages"},"files":{"default":[],"description":"IDs of team files that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"description":"IDs of skills (team or system) that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"plugins":{"default":[],"description":"Plugins to load — either a built-in plugin name (e.g. \"code-review\") or a GitHub URL (e.g. \"https://github.com/owner/repo\")","nullable":true,"type":"array","items":{"type":"string"}},"subAgents":{"default":[],"description":"IDs of other assignments (agents in the same team) to expose to this assignment as Claude Code subagents. Each sub-assignment runs with its own SOP and connections; the parent can delegate to them via the Agent tool.","nullable":true,"type":"array","items":{"type":"string","format":"uuid"}},"options":{"description":"Optional runtime options controlling how the agent executes","type":"object","properties":{"browserProvider":{"description":"Browser infrastructure provider","type":"string","enum":["browserbase","browser-use"]},"evaluationSchemaId":{"description":"ID of the evaluation schema to apply to runs of this agent","type":"string"},"benchmarkExpectedOutcomes":{"description":"Expected outcomes used when running benchmark scenarios","type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Human-readable description of the expected outcome"},"criteria":{"type":"string","description":"Pass/fail criteria used to evaluate the outcome"}},"required":["description","criteria"],"additionalProperties":false}}},"additionalProperties":{}}},"required":["models","input","files","skills","plugins","subAgents"],"additionalProperties":false,"description":"Agent configuration payload"}},"required":["version","data"],"additionalProperties":false}]},"status":{"nullable":true,"type":"string"},"revision_number":{"nullable":true,"type":"number"},"parent_build_id":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"type":"string"},"created_by_name":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"},"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"build_id":{"type":"string"},"agent_id":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"frequency":{"type":"string","enum":["every_5_minutes","every_15_minutes","hourly","daily","workday","weekly","monthly","custom"]},"time":{"nullable":true,"type":"string"},"timezone":{"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"cron":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"task":{"nullable":true,"type":"string"},"recurring":{"nullable":true,"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","created_at","updated_at"],"additionalProperties":false}}},"required":["id","copilot_id","agent_id","name","config","status","revision_number","parent_build_id","created_by","created_at","updated_at"],"additionalProperties":false},"agent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false}},"required":["build","agent"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/revisions/{build_id}":{"get":{"tags":["Revisions"],"description":"Deprecated: use GET /v2/teams/:team_id/agents/{agent_id}/revisions/{build_id} instead. Scheduled for removal on 2026-05-22.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"Build ID"}],"deprecated":true,"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"build":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"copilot_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"revision_name":{"nullable":true,"type":"string"},"revision_description":{"nullable":true,"type":"string"},"config":{"nullable":true,"anyOf":[{"type":"object","properties":{"version":{"type":"string","enum":["v1"]},"data":{"type":"object","properties":{"model":{"type":"string"},"temperature":{"nullable":true,"type":"number","minimum":0,"maximum":2},"max_output_tokens":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true},"top_p":{"nullable":true,"type":"number","minimum":0,"maximum":1},"store":{"nullable":true,"type":"boolean"},"tools":{},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}]},"text":{"nullable":true,"type":"object","properties":{"format":{"nullable":true,"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false}]}},"additionalProperties":false},"files":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}}},"required":["model","tools","input","files","skills"],"additionalProperties":false}},"required":["version","data"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","enum":["v2"],"description":"Schema version discriminator — must be \"v2\" for the current schema"},"data":{"type":"object","properties":{"models":{"type":"object","properties":{"agent":{"type":"object","properties":{"model":{"type":"string","enum":["claude-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","d1-max","duvo-1-max","duvo-1-max-sonnet-1m","duvo-1-max-sonnet-4.5","duvo-1-max-sonnet-4.5-1m","duvo-1-max-opus","duvo-1-max-opus-4.5","gpt-4.1","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","claude-sonnet-4-20250514","claude-sonnet-4-20250514[1m]","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101"],"description":"Claude model identifier used for the primary agent loop"}},"required":["model"],"additionalProperties":false,"description":"Primary Claude agent model configuration"},"browsing":{"type":"object","properties":{"provider":{"type":"string","enum":["google","anthropic"],"description":"Provider backing the browsing/computer-use model"},"model":{"type":"string","enum":["gemini-2.5-pro","gemini-2.5-flash","gemini-3-pro-preview","claude-haiku-4-5","claude-sonnet-4-5","claude-opus-4-1"],"description":"Model identifier for the browsing provider"}},"required":["provider","model"],"additionalProperties":false,"description":"Browsing/computer-use model configuration"}},"required":["agent","browsing"],"additionalProperties":false,"description":"Model configuration for each capability the agent uses"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}],"description":"Initial agent instructions — either a single system prompt string or a list of structured messages"},"files":{"default":[],"description":"IDs of team files that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"description":"IDs of skills (team or system) that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"plugins":{"default":[],"description":"Plugins to load — either a built-in plugin name (e.g. \"code-review\") or a GitHub URL (e.g. \"https://github.com/owner/repo\")","nullable":true,"type":"array","items":{"type":"string"}},"subAgents":{"default":[],"description":"IDs of other assignments (agents in the same team) to expose to this assignment as Claude Code subagents. Each sub-assignment runs with its own SOP and connections; the parent can delegate to them via the Agent tool.","nullable":true,"type":"array","items":{"type":"string","format":"uuid"}},"options":{"description":"Optional runtime options controlling how the agent executes","type":"object","properties":{"browserProvider":{"description":"Browser infrastructure provider","type":"string","enum":["browserbase","browser-use"]},"evaluationSchemaId":{"description":"ID of the evaluation schema to apply to runs of this agent","type":"string"},"benchmarkExpectedOutcomes":{"description":"Expected outcomes used when running benchmark scenarios","type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Human-readable description of the expected outcome"},"criteria":{"type":"string","description":"Pass/fail criteria used to evaluate the outcome"}},"required":["description","criteria"],"additionalProperties":false}}},"additionalProperties":{}}},"required":["models","input","files","skills","plugins","subAgents"],"additionalProperties":false,"description":"Agent configuration payload"}},"required":["version","data"],"additionalProperties":false}]},"status":{"nullable":true,"type":"string"},"revision_number":{"nullable":true,"type":"number"},"parent_build_id":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"type":"string"},"created_by_name":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"},"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"build_id":{"type":"string"},"agent_id":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"frequency":{"type":"string","enum":["every_5_minutes","every_15_minutes","hourly","daily","workday","weekly","monthly","custom"]},"time":{"nullable":true,"type":"string"},"timezone":{"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"cron":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"task":{"nullable":true,"type":"string"},"recurring":{"nullable":true,"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","created_at","updated_at"],"additionalProperties":false}}},"required":["id","copilot_id","agent_id","name","config","status","revision_number","parent_build_id","created_by","created_at","updated_at"],"additionalProperties":false}},"required":["build"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"operationId":"updateRevision","tags":["Revisions"],"description":"Update a revision's configuration, name, description, or handover targets. Returns the updated revision.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"description":"Build configuration object","type":"object","additionalProperties":{}},"handoverTargetIds":{"description":"Agent IDs that this agent can hand over work to","type":"array","items":{"type":"string","format":"uuid"}},"revision_name":{"description":"Optional user-defined name for this revision. Pass null to clear.","nullable":true,"type":"string","minLength":1,"maxLength":80},"revision_description":{"description":"Optional user-defined description for this revision. Pass null to clear.","nullable":true,"type":"string","maxLength":500}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"The build's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"build":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"copilot_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"revision_name":{"nullable":true,"type":"string"},"revision_description":{"nullable":true,"type":"string"},"config":{"nullable":true,"anyOf":[{"type":"object","properties":{"version":{"type":"string","enum":["v1"]},"data":{"type":"object","properties":{"model":{"type":"string"},"temperature":{"nullable":true,"type":"number","minimum":0,"maximum":2},"max_output_tokens":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true},"top_p":{"nullable":true,"type":"number","minimum":0,"maximum":1},"store":{"nullable":true,"type":"boolean"},"tools":{},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}]},"text":{"nullable":true,"type":"object","properties":{"format":{"nullable":true,"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false}]}},"additionalProperties":false},"files":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}}},"required":["model","tools","input","files","skills"],"additionalProperties":false}},"required":["version","data"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","enum":["v2"],"description":"Schema version discriminator — must be \"v2\" for the current schema"},"data":{"type":"object","properties":{"models":{"type":"object","properties":{"agent":{"type":"object","properties":{"model":{"type":"string","enum":["claude-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","d1-max","duvo-1-max","duvo-1-max-sonnet-1m","duvo-1-max-sonnet-4.5","duvo-1-max-sonnet-4.5-1m","duvo-1-max-opus","duvo-1-max-opus-4.5","gpt-4.1","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","claude-sonnet-4-20250514","claude-sonnet-4-20250514[1m]","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101"],"description":"Claude model identifier used for the primary agent loop"}},"required":["model"],"additionalProperties":false,"description":"Primary Claude agent model configuration"},"browsing":{"type":"object","properties":{"provider":{"type":"string","enum":["google","anthropic"],"description":"Provider backing the browsing/computer-use model"},"model":{"type":"string","enum":["gemini-2.5-pro","gemini-2.5-flash","gemini-3-pro-preview","claude-haiku-4-5","claude-sonnet-4-5","claude-opus-4-1"],"description":"Model identifier for the browsing provider"}},"required":["provider","model"],"additionalProperties":false,"description":"Browsing/computer-use model configuration"}},"required":["agent","browsing"],"additionalProperties":false,"description":"Model configuration for each capability the agent uses"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}],"description":"Initial agent instructions — either a single system prompt string or a list of structured messages"},"files":{"default":[],"description":"IDs of team files that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"description":"IDs of skills (team or system) that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"plugins":{"default":[],"description":"Plugins to load — either a built-in plugin name (e.g. \"code-review\") or a GitHub URL (e.g. \"https://github.com/owner/repo\")","nullable":true,"type":"array","items":{"type":"string"}},"subAgents":{"default":[],"description":"IDs of other assignments (agents in the same team) to expose to this assignment as Claude Code subagents. Each sub-assignment runs with its own SOP and connections; the parent can delegate to them via the Agent tool.","nullable":true,"type":"array","items":{"type":"string","format":"uuid"}},"options":{"description":"Optional runtime options controlling how the agent executes","type":"object","properties":{"browserProvider":{"description":"Browser infrastructure provider","type":"string","enum":["browserbase","browser-use"]},"evaluationSchemaId":{"description":"ID of the evaluation schema to apply to runs of this agent","type":"string"},"benchmarkExpectedOutcomes":{"description":"Expected outcomes used when running benchmark scenarios","type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Human-readable description of the expected outcome"},"criteria":{"type":"string","description":"Pass/fail criteria used to evaluate the outcome"}},"required":["description","criteria"],"additionalProperties":false}}},"additionalProperties":{}}},"required":["models","input","files","skills","plugins","subAgents"],"additionalProperties":false,"description":"Agent configuration payload"}},"required":["version","data"],"additionalProperties":false}]},"status":{"nullable":true,"type":"string"},"revision_number":{"nullable":true,"type":"number"},"parent_build_id":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"type":"string"},"created_by_name":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"},"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"build_id":{"type":"string"},"agent_id":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"frequency":{"type":"string","enum":["every_5_minutes","every_15_minutes","hourly","daily","workday","weekly","monthly","custom"]},"time":{"nullable":true,"type":"string"},"timezone":{"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"cron":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"task":{"nullable":true,"type":"string"},"recurring":{"nullable":true,"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","created_at","updated_at"],"additionalProperties":false}}},"required":["id","copilot_id","agent_id","name","config","status","revision_number","parent_build_id","created_by","created_at","updated_at"],"additionalProperties":false,"description":"The updated build"}},"required":["build"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Revision","deprecated":true}},"/v1/connections/oauth/mcp/check":{"post":{"operationId":"checkMcpOAuth","tags":["Connections"],"description":"Probe an MCP server URL to discover whether it supports OAuth Dynamic Client Registration. Returns the authorization endpoint and required scopes when supported. Useful as a precursor to `/v2/teams/:team_id/connections/oauth/mcp/start` or `/v2/teams/:team_id/connections`. Performs no writes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mcp_server_url":{"type":"string","format":"uri","description":"URL of the MCP server to probe for OAuth support."}},"required":["mcp_server_url"]}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"supports_dcr":{"type":"boolean","description":"True if the MCP server advertises OAuth Dynamic Client Registration"},"authorization_endpoint":{"description":"OAuth authorization endpoint advertised by the MCP server, when discoverable","type":"string"},"scopes":{"description":"Scopes the MCP server requests during authorization","type":"array","items":{"type":"string"}}},"required":["supports_dcr"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Check MCP OAuth","deprecated":true}},"/v1/sandboxes":{"post":{"operationId":"createSandbox","tags":["Sandboxes"],"description":"Create a new sandbox for file uploads. The returned sandbox_id can be passed to POST /v2/teams/:team_id/runs to stage data for a run.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sandbox_id":{"type":"string","description":"The newly created sandbox's identifier"},"expires_at":{"type":"string","description":"ISO 8601 timestamp when the sandbox will expire"}},"required":["sandbox_id","expires_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Sandbox","deprecated":true}},"/v1/sandboxes/{sandbox_id}/upload-urls":{"post":{"operationId":"createSandboxUploadUrl","tags":["Sandboxes"],"description":"Get a presigned URL for uploading a file into a sandbox. Use for files larger than 10MB; smaller files can be uploaded directly via POST /v2/sandboxes/:sandbox_id/files.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Path where the file will be uploaded (e.g. /workspace/data.csv)"}},"required":["path"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"sandbox_id","required":true,"description":"The sandbox's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"upload_url":{"type":"string","format":"uri","description":"Presigned upload URL"},"path":{"type":"string","description":"Path the file will be uploaded to"},"expires_in_seconds":{"type":"number","description":"Seconds until the presigned URL expires"}},"required":["upload_url","path","expires_in_seconds"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Sandbox Upload URL","deprecated":true}},"/v1/sandboxes/{sandbox_id}/files":{"get":{"operationId":"listSandboxFiles","tags":["Sandboxes"],"description":"List files in a sandbox directory.","parameters":[{"schema":{"default":"/workspace","type":"string"},"in":"query","name":"path","required":false,"description":"Directory to list files from (defaults to /workspace)"},{"schema":{"type":"string","minLength":1},"in":"path","name":"sandbox_id","required":true,"description":"The sandbox's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"File or directory name (basename)"},"path":{"type":"string","description":"Absolute path inside the sandbox"},"type":{"type":"string","enum":["file","dir"],"description":"Whether this entry is a regular file or a directory"},"size_bytes":{"type":"number","description":"Size of the file in bytes (0 for directories)"}},"required":["name","path","type","size_bytes"],"additionalProperties":false},"description":"Entries in the requested directory"}},"required":["files"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Sandbox Files","deprecated":true},"post":{"operationId":"uploadSandboxFile","tags":["Sandboxes"],"description":"Upload a file directly to the sandbox. Maximum file size is 10MB. For larger files, use POST /v2/sandboxes/:sandbox_id/upload-urls.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"sandbox_id","required":true,"description":"The sandbox's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"Path the file was uploaded to"},"size_bytes":{"type":"number","description":"Size of the uploaded file in bytes"}},"required":["path","size_bytes"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Upload Sandbox File","deprecated":true}},"/v1/agent/{agentId}/runs/{runId}/evaluation":{"get":{"operationId":"getRunEvaluation","tags":["Runs"],"description":"Get the latest evaluation analysis for a specific agent run (Job).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true,"description":"The agent's unique identifier (Assignment ID)"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"runId","required":true,"description":"The run's unique identifier (Job ID)"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid"},"source":{"nullable":true,"type":"string"},"output":{"type":"object","properties":{"schemaId":{"type":"string"},"schemaVersion":{"type":"string"},"data":{"type":"object","additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}}},"required":["data"],"additionalProperties":false}},"required":["id","created_at","run_id","source","output"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Run Evaluation","deprecated":true}},"/v1/agent/{agentId}/eval-scores":{"get":{"operationId":"getEvalScores","tags":["Agents"],"description":"Aggregate evaluation counts and flag distribution for an Assignment's Jobs since the given timestamp.","parameters":[{"schema":{"type":"string","format":"date-time"},"in":"query","name":"since","required":true,"description":"ISO 8601 timestamp; only Jobs evaluated after this are counted"},{"schema":{"type":"string","enum":["all","custom"]},"in":"query","name":"scope","required":false,"description":"When 'custom', only counts Jobs scored against the live build's custom rubric set (most up-to-date), and only `custom__*` rubric flags. Defaults to 'all' (platform-catalog + custom)."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true,"description":"The agent's unique identifier (Assignment ID)"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"total_evaluated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"with_issues":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"flag_distribution":{"type":"array","items":{"type":"object","properties":{"flag":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"nullable":true,"type":"string"}},"required":["flag","count"],"additionalProperties":false}}},"required":["total_evaluated","with_issues","flag_distribution"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Eval Scores","deprecated":true}},"/v1/agents/{agentId}/eval-rubrics":{"get":{"operationId":"getEvalRubrics","tags":["Agents"],"description":"List the evaluation rubrics a Job is scored against: the platform default rubrics plus the Assignment-specific rubrics for a build. Defaults to the Assignment's live build; pass build_id to target the revision a specific Job ran against.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"build_id","required":false,"description":"Return rubrics for this specific build (the revision a Job ran against). Defaults to the agent's live build when omitted."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true,"description":"The agent's unique identifier (Assignment ID)"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"rubrics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"sort_order":{"type":"number"},"deleted_at":{"nullable":true,"type":"string"}},"required":["id","slug","title","description","sort_order","deleted_at"],"additionalProperties":false}},"platform_rubrics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"cause":{"type":"string"}},"required":["key","label","description","cause"],"additionalProperties":false}}},"required":["rubrics","platform_rubrics"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Eval Rubrics","deprecated":true}},"/v1/agents/{agent_id}":{"delete":{"operationId":"deleteAgent","tags":["Agents"],"description":"Delete an agent (Assignment in the Duvo UI) and cascade-clean its schedules, case triggers, builder runs, and handover targets. Any active jobs are interrupted and their sandboxes paused.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Agent","deprecated":true},"get":{"operationId":"getAgent","tags":["Agents"],"description":"Get an agent by ID.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slack_enabled":{"nullable":true,"type":"boolean"},"microsoft_teams_enabled":{"nullable":true,"type":"boolean"},"agentic_memory_enabled":{"nullable":true,"type":"boolean"},"team_id":{"nullable":true,"type":"string"},"thread_id":{"nullable":true,"type":"string"},"folder_id":{"nullable":true,"type":"string"},"pinned_at":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"updated_by":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false}},"required":["id","name","slack_enabled","microsoft_teams_enabled","agentic_memory_enabled","team_id","thread_id","created_at","updated_at"],"additionalProperties":false}},"required":["agent"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Short error code"},"team_id":{"description":"ID of the team that owns the agent, so the client can auto-switch teams","type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Agent","deprecated":true},"patch":{"operationId":"updateAgent","tags":["Agents"],"description":"Update an agent's display name or delivery settings.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New agent display name."},"slack_enabled":{"type":"boolean","description":"Whether the agent is reachable via Slack."},"microsoft_teams_enabled":{"type":"boolean","description":"Whether the agent is reachable via Microsoft Teams."},"agentic_memory_enabled":{"type":"boolean","description":"Toggle agentic memory for the agent."},"thread_id":{"nullable":true,"description":"Thread id to associate with the agent, or null to clear.","type":"string","format":"uuid"},"pinned":{"type":"boolean","description":"Pin the agent to the top of the team's assignment list (true) or unpin it (false)."}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slack_enabled":{"nullable":true,"type":"boolean"},"microsoft_teams_enabled":{"nullable":true,"type":"boolean"},"agentic_memory_enabled":{"nullable":true,"type":"boolean"},"team_id":{"nullable":true,"type":"string"},"thread_id":{"nullable":true,"type":"string"},"folder_id":{"nullable":true,"type":"string"},"pinned_at":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"updated_by":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false}},"required":["id","name","slack_enabled","microsoft_teams_enabled","agentic_memory_enabled","team_id","thread_id","created_at","updated_at"],"additionalProperties":false}},"required":["agent"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Agent","deprecated":true}},"/v1/agents/{agent_id}/case-triggers":{"get":{"operationId":"listAgentCaseTriggers","tags":["Case Triggers"],"description":"List the case triggers configured for an agent. Each trigger automatically dispatches the agent to run cases added to a queue.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"case_triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"case_queue_id":{"type":"string"},"case_queue_name":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"concurrency":{"nullable":true,"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"},"creator_display_name":{"nullable":true,"type":"string"},"can_disable":{"type":"boolean"},"has_conflict":{"type":"boolean"},"conflicting_agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["id","agent_id","case_queue_id","case_queue_name","user_id","enabled","concurrency","created_at","updated_at","creator_display_name","can_disable","has_conflict","conflicting_agents"],"additionalProperties":false}}},"required":["case_triggers"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Agent Case Triggers","deprecated":true},"post":{"operationId":"createAgentCaseTrigger","tags":["Case Triggers"],"description":"Create a case trigger for an agent. An agent may have at most one case trigger; this returns 409 if one already exists.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"case_queue_id":{"type":"string","format":"uuid","description":"Queue whose new cases should trigger this agent"},"enabled":{"type":"boolean","description":"Whether the trigger is active. Disabled triggers do not dispatch runs."},"concurrency":{"description":"Maximum number of concurrent runs for this trigger. Null/omitted means unlimited.","nullable":true,"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"required":["case_queue_id","enabled"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"case_trigger":{"type":"object","properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"case_queue_id":{"type":"string"},"case_queue_name":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"concurrency":{"nullable":true,"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"},"creator_display_name":{"nullable":true,"type":"string"},"can_disable":{"type":"boolean"},"has_conflict":{"type":"boolean"},"conflicting_agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["id","agent_id","case_queue_id","case_queue_name","user_id","enabled","concurrency","created_at","updated_at","creator_display_name","can_disable","has_conflict","conflicting_agents"],"additionalProperties":false}},"required":["case_trigger"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Agent Case Trigger","deprecated":true}},"/v1/agents/{agent_id}/case-triggers/conflict-preview":{"get":{"operationId":"previewAgentCaseTriggerConflicts","tags":["Case Triggers"],"description":"Preview which other agents would conflict with this agent's case trigger if it pointed at the given case queue. Does not modify the trigger.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"case_queue_id","required":true,"description":"The case queue to check for conflicts against"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"has_conflict":{"type":"boolean"},"conflicting_agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["has_conflict","conflicting_agents"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Preview Agent Case Trigger Conflicts","deprecated":true}},"/v1/agents/{agent_id}/case-triggers/{trigger_id}":{"get":{"operationId":"getAgentCaseTrigger","tags":["Case Triggers"],"description":"Retrieve a single case trigger by id.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"trigger_id","required":true,"description":"The case trigger's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"case_trigger":{"type":"object","properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"case_queue_id":{"type":"string"},"case_queue_name":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"concurrency":{"nullable":true,"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"},"creator_display_name":{"nullable":true,"type":"string"},"can_disable":{"type":"boolean"},"has_conflict":{"type":"boolean"},"conflicting_agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["id","agent_id","case_queue_id","case_queue_name","user_id","enabled","concurrency","created_at","updated_at","creator_display_name","can_disable","has_conflict","conflicting_agents"],"additionalProperties":false}},"required":["case_trigger"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Agent Case Trigger","deprecated":true},"patch":{"operationId":"updateAgentCaseTrigger","tags":["Case Triggers"],"description":"Update fields on a case trigger. Only the trigger creator or a builder/admin can disable an enabled trigger or change its queue.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"case_queue_id":{"description":"Queue whose new cases should trigger this agent","type":"string","format":"uuid"},"enabled":{"description":"Whether the trigger is active. Disabled triggers do not dispatch runs.","type":"boolean"},"concurrency":{"description":"Maximum number of concurrent runs for this trigger. Null clears the limit.","nullable":true,"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"trigger_id","required":true,"description":"The case trigger's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"case_trigger":{"type":"object","properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"case_queue_id":{"type":"string"},"case_queue_name":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"concurrency":{"nullable":true,"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"},"creator_display_name":{"nullable":true,"type":"string"},"can_disable":{"type":"boolean"},"has_conflict":{"type":"boolean"},"conflicting_agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["id","agent_id","case_queue_id","case_queue_name","user_id","enabled","concurrency","created_at","updated_at","creator_display_name","can_disable","has_conflict","conflicting_agents"],"additionalProperties":false}},"required":["case_trigger"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Agent Case Trigger","deprecated":true},"delete":{"operationId":"deleteAgentCaseTrigger","tags":["Case Triggers"],"description":"Delete a case trigger. Only the trigger creator or a builder/admin can delete it.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"trigger_id","required":true,"description":"The case trigger's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Agent Case Trigger","deprecated":true}},"/v1/triggers/{agentId}":{"get":{"operationId":"listAgentTriggers","tags":["Triggers"],"description":"List the trigger definitions the authenticated user owns on an agent (Assignment in the Duvo UI). Triggers start a Job automatically when an external event fires (e.g. an email arrives or a Linear issue is created).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true,"description":"The agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"user_id":{"type":"string"},"integration_slug":{"type":"string"},"trigger_type":{"type":"string"},"filter_config":{"type":"object","additionalProperties":{}},"integration_instance_id":{"type":"string"},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","agent_id","user_id","integration_slug","trigger_type","filter_config","integration_instance_id","enabled","created_at","updated_at"],"additionalProperties":false}}},"required":["triggers"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Agent Triggers","deprecated":true},"put":{"operationId":"upsertAgentTrigger","tags":["Triggers"],"description":"Create or update the authenticated user's trigger for an integration on an agent (Assignment in the Duvo UI). The integration must already be connected to the agent (its OAuth connection set up in the Duvo dashboard). Set `enabled: false` to pause a trigger without deleting it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"integration_slug":{"type":"string","description":"Integration slug the trigger fires for (e.g. `gmail`, `outlook`, `linear-native`, `google-drive`)."},"trigger_type":{"type":"string","description":"Trigger type within the integration (e.g. `email_received`). Discover valid values via the trigger types endpoint."},"filter_config":{"description":"Integration-specific filter config (e.g. sender/subject filters). Shape comes from the integration's filter schema.","default":{},"type":"object","additionalProperties":{}},"enabled":{"default":true,"description":"Whether the trigger is active. Defaults to true.","type":"boolean"}},"required":["integration_slug","trigger_type"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true,"description":"The agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"user_id":{"type":"string"},"integration_slug":{"type":"string"},"trigger_type":{"type":"string"},"filter_config":{"type":"object","additionalProperties":{}},"integration_instance_id":{"type":"string"},"enabled":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","agent_id","user_id","integration_slug","trigger_type","filter_config","integration_instance_id","enabled","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Upsert Agent Trigger","deprecated":true}},"/v1/trigger-config/{agentId}":{"get":{"operationId":"listAgentTriggerTypes","tags":["Triggers"],"description":"List the trigger types available for an agent (Assignment in the Duvo UI), grouped by integration. Use the returned `integration_slug` and `trigger_type` values when creating a trigger.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true,"description":"The agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"trigger_types":{"type":"array","items":{"type":"object","properties":{"integration_slug":{"type":"string"},"integration_name":{"type":"string"},"icon_url":{"type":"string"},"trigger_type":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"filter_schema":{"type":"object","additionalProperties":{}}},"required":["integration_slug","integration_name","icon_url","trigger_type","label","description","filter_schema"],"additionalProperties":false}}},"required":["trigger_types"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Agent Trigger Types","deprecated":true}},"/v1/agents/{agent_id}/revisions":{"post":{"operationId":"createRevision","tags":["Revisions"],"description":"Create a new revision for an existing agent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Build name"},"config":{"description":"Build configuration (latest schema version only; legacy v1 configs are not accepted)","type":"object","properties":{"version":{"type":"string","enum":["v2"],"description":"Schema version discriminator — must be \"v2\" for the current schema"},"data":{"type":"object","properties":{"models":{"type":"object","properties":{"agent":{"type":"object","properties":{"model":{"type":"string","enum":["claude-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","d1-max","duvo-1-max","duvo-1-max-sonnet-1m","duvo-1-max-sonnet-4.5","duvo-1-max-sonnet-4.5-1m","duvo-1-max-opus","duvo-1-max-opus-4.5","gpt-4.1","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","claude-sonnet-4-20250514","claude-sonnet-4-20250514[1m]","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101"],"description":"Claude model identifier used for the primary agent loop"}},"required":["model"],"description":"Primary Claude agent model configuration"},"browsing":{"type":"object","properties":{"provider":{"type":"string","enum":["google","anthropic"],"description":"Provider backing the browsing/computer-use model"},"model":{"type":"string","enum":["gemini-2.5-pro","gemini-2.5-flash","gemini-3-pro-preview","claude-haiku-4-5","claude-sonnet-4-5","claude-opus-4-1"],"description":"Model identifier for the browsing provider"}},"required":["provider","model"],"description":"Browsing/computer-use model configuration"}},"required":["agent","browsing"],"description":"Model configuration for each capability the agent uses"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"]}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"]}}],"description":"Initial agent instructions — either a single system prompt string or a list of structured messages"},"files":{"default":[],"description":"IDs of team files that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"description":"IDs of skills (team or system) that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"plugins":{"default":[],"description":"Plugins to load — either a built-in plugin name (e.g. \"code-review\") or a GitHub URL (e.g. \"https://github.com/owner/repo\")","nullable":true,"type":"array","items":{"type":"string"}},"subAgents":{"default":[],"description":"IDs of other assignments (agents in the same team) to expose to this assignment as Claude Code subagents. Each sub-assignment runs with its own SOP and connections; the parent can delegate to them via the Agent tool.","nullable":true,"type":"array","items":{"type":"string","format":"uuid"}},"options":{"description":"Optional runtime options controlling how the agent executes","type":"object","properties":{"browserProvider":{"description":"Browser infrastructure provider","type":"string","enum":["browserbase","browser-use"]},"evaluationSchemaId":{"description":"ID of the evaluation schema to apply to runs of this agent","type":"string"},"benchmarkExpectedOutcomes":{"description":"Expected outcomes used when running benchmark scenarios","type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Human-readable description of the expected outcome"},"criteria":{"type":"string","description":"Pass/fail criteria used to evaluate the outcome"}},"required":["description","criteria"]}}},"additionalProperties":{}}},"required":["models","input"],"description":"Agent configuration payload"}},"required":["version","data"]},"handover_target_ids":{"description":"Agent IDs that this agent can hand work off to","type":"array","items":{"type":"string","format":"uuid"}},"source_build_id":{"description":"Build ID to copy integrations and case queue links from","type":"string","format":"uuid"}},"required":["name"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"build":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"copilot_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"revision_name":{"nullable":true,"type":"string"},"revision_description":{"nullable":true,"type":"string"},"config":{"nullable":true,"anyOf":[{"type":"object","properties":{"version":{"type":"string","enum":["v1"]},"data":{"type":"object","properties":{"model":{"type":"string"},"temperature":{"nullable":true,"type":"number","minimum":0,"maximum":2},"max_output_tokens":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true},"top_p":{"nullable":true,"type":"number","minimum":0,"maximum":1},"store":{"nullable":true,"type":"boolean"},"tools":{},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}]},"text":{"nullable":true,"type":"object","properties":{"format":{"nullable":true,"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false}]}},"additionalProperties":false},"files":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}}},"required":["model","tools","input","files","skills"],"additionalProperties":false}},"required":["version","data"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","enum":["v2"],"description":"Schema version discriminator — must be \"v2\" for the current schema"},"data":{"type":"object","properties":{"models":{"type":"object","properties":{"agent":{"type":"object","properties":{"model":{"type":"string","enum":["claude-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","d1-max","duvo-1-max","duvo-1-max-sonnet-1m","duvo-1-max-sonnet-4.5","duvo-1-max-sonnet-4.5-1m","duvo-1-max-opus","duvo-1-max-opus-4.5","gpt-4.1","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","claude-sonnet-4-20250514","claude-sonnet-4-20250514[1m]","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101"],"description":"Claude model identifier used for the primary agent loop"}},"required":["model"],"additionalProperties":false,"description":"Primary Claude agent model configuration"},"browsing":{"type":"object","properties":{"provider":{"type":"string","enum":["google","anthropic"],"description":"Provider backing the browsing/computer-use model"},"model":{"type":"string","enum":["gemini-2.5-pro","gemini-2.5-flash","gemini-3-pro-preview","claude-haiku-4-5","claude-sonnet-4-5","claude-opus-4-1"],"description":"Model identifier for the browsing provider"}},"required":["provider","model"],"additionalProperties":false,"description":"Browsing/computer-use model configuration"}},"required":["agent","browsing"],"additionalProperties":false,"description":"Model configuration for each capability the agent uses"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}],"description":"Initial agent instructions — either a single system prompt string or a list of structured messages"},"files":{"default":[],"description":"IDs of team files that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"description":"IDs of skills (team or system) that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"plugins":{"default":[],"description":"Plugins to load — either a built-in plugin name (e.g. \"code-review\") or a GitHub URL (e.g. \"https://github.com/owner/repo\")","nullable":true,"type":"array","items":{"type":"string"}},"subAgents":{"default":[],"description":"IDs of other assignments (agents in the same team) to expose to this assignment as Claude Code subagents. Each sub-assignment runs with its own SOP and connections; the parent can delegate to them via the Agent tool.","nullable":true,"type":"array","items":{"type":"string","format":"uuid"}},"options":{"description":"Optional runtime options controlling how the agent executes","type":"object","properties":{"browserProvider":{"description":"Browser infrastructure provider","type":"string","enum":["browserbase","browser-use"]},"evaluationSchemaId":{"description":"ID of the evaluation schema to apply to runs of this agent","type":"string"},"benchmarkExpectedOutcomes":{"description":"Expected outcomes used when running benchmark scenarios","type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Human-readable description of the expected outcome"},"criteria":{"type":"string","description":"Pass/fail criteria used to evaluate the outcome"}},"required":["description","criteria"],"additionalProperties":false}}},"additionalProperties":{}}},"required":["models","input","files","skills","plugins","subAgents"],"additionalProperties":false,"description":"Agent configuration payload"}},"required":["version","data"],"additionalProperties":false}]},"status":{"nullable":true,"type":"string"},"revision_number":{"nullable":true,"type":"number"},"parent_build_id":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"type":"string"},"created_by_name":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"},"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"build_id":{"type":"string"},"agent_id":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"frequency":{"type":"string","enum":["every_5_minutes","every_15_minutes","hourly","daily","workday","weekly","monthly","custom"]},"time":{"nullable":true,"type":"string"},"timezone":{"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"cron":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"task":{"nullable":true,"type":"string"},"recurring":{"nullable":true,"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","created_at","updated_at"],"additionalProperties":false}}},"required":["id","copilot_id","agent_id","name","config","status","revision_number","parent_build_id","created_by","created_at","updated_at"],"additionalProperties":false},"agent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false}},"required":["build","agent"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Revision","deprecated":true},"get":{"operationId":"listAgentRevisions","tags":["Revisions"],"description":"List revisions for an agent.","parameters":[{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Number of revisions per page (1-100, default 20)"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of revisions to skip"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"builds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"copilot_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"revision_name":{"nullable":true,"type":"string"},"revision_description":{"nullable":true,"type":"string"},"config":{"nullable":true,"anyOf":[{"type":"object","properties":{"version":{"type":"string","enum":["v1"]},"data":{"type":"object","properties":{"model":{"type":"string"},"temperature":{"nullable":true,"type":"number","minimum":0,"maximum":2},"max_output_tokens":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true},"top_p":{"nullable":true,"type":"number","minimum":0,"maximum":1},"store":{"nullable":true,"type":"boolean"},"tools":{},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}]},"text":{"nullable":true,"type":"object","properties":{"format":{"nullable":true,"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false}]}},"additionalProperties":false},"files":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}}},"required":["model","tools","input","files","skills"],"additionalProperties":false}},"required":["version","data"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","enum":["v2"],"description":"Schema version discriminator — must be \"v2\" for the current schema"},"data":{"type":"object","properties":{"models":{"type":"object","properties":{"agent":{"type":"object","properties":{"model":{"type":"string","enum":["claude-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","d1-max","duvo-1-max","duvo-1-max-sonnet-1m","duvo-1-max-sonnet-4.5","duvo-1-max-sonnet-4.5-1m","duvo-1-max-opus","duvo-1-max-opus-4.5","gpt-4.1","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","claude-sonnet-4-20250514","claude-sonnet-4-20250514[1m]","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101"],"description":"Claude model identifier used for the primary agent loop"}},"required":["model"],"additionalProperties":false,"description":"Primary Claude agent model configuration"},"browsing":{"type":"object","properties":{"provider":{"type":"string","enum":["google","anthropic"],"description":"Provider backing the browsing/computer-use model"},"model":{"type":"string","enum":["gemini-2.5-pro","gemini-2.5-flash","gemini-3-pro-preview","claude-haiku-4-5","claude-sonnet-4-5","claude-opus-4-1"],"description":"Model identifier for the browsing provider"}},"required":["provider","model"],"additionalProperties":false,"description":"Browsing/computer-use model configuration"}},"required":["agent","browsing"],"additionalProperties":false,"description":"Model configuration for each capability the agent uses"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}],"description":"Initial agent instructions — either a single system prompt string or a list of structured messages"},"files":{"default":[],"description":"IDs of team files that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"description":"IDs of skills (team or system) that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"plugins":{"default":[],"description":"Plugins to load — either a built-in plugin name (e.g. \"code-review\") or a GitHub URL (e.g. \"https://github.com/owner/repo\")","nullable":true,"type":"array","items":{"type":"string"}},"subAgents":{"default":[],"description":"IDs of other assignments (agents in the same team) to expose to this assignment as Claude Code subagents. Each sub-assignment runs with its own SOP and connections; the parent can delegate to them via the Agent tool.","nullable":true,"type":"array","items":{"type":"string","format":"uuid"}},"options":{"description":"Optional runtime options controlling how the agent executes","type":"object","properties":{"browserProvider":{"description":"Browser infrastructure provider","type":"string","enum":["browserbase","browser-use"]},"evaluationSchemaId":{"description":"ID of the evaluation schema to apply to runs of this agent","type":"string"},"benchmarkExpectedOutcomes":{"description":"Expected outcomes used when running benchmark scenarios","type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Human-readable description of the expected outcome"},"criteria":{"type":"string","description":"Pass/fail criteria used to evaluate the outcome"}},"required":["description","criteria"],"additionalProperties":false}}},"additionalProperties":{}}},"required":["models","input","files","skills","plugins","subAgents"],"additionalProperties":false,"description":"Agent configuration payload"}},"required":["version","data"],"additionalProperties":false}]},"status":{"nullable":true,"type":"string"},"revision_number":{"nullable":true,"type":"number"},"parent_build_id":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"type":"string"},"created_by_name":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"},"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"build_id":{"type":"string"},"agent_id":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"frequency":{"type":"string","enum":["every_5_minutes","every_15_minutes","hourly","daily","workday","weekly","monthly","custom"]},"time":{"nullable":true,"type":"string"},"timezone":{"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"cron":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"task":{"nullable":true,"type":"string"},"recurring":{"nullable":true,"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","created_at","updated_at"],"additionalProperties":false}}},"required":["id","copilot_id","agent_id","name","config","status","revision_number","parent_build_id","created_by","created_at","updated_at"],"additionalProperties":false}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["builds","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Agent Revisions","deprecated":true}},"/v1/agents/{agent_id}/revisions/{build_id}":{"get":{"operationId":"getRevision","tags":["Revisions"],"description":"Get a revision by ID.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The agent's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"The build's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"build":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"copilot_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"revision_name":{"nullable":true,"type":"string"},"revision_description":{"nullable":true,"type":"string"},"config":{"nullable":true,"anyOf":[{"type":"object","properties":{"version":{"type":"string","enum":["v1"]},"data":{"type":"object","properties":{"model":{"type":"string"},"temperature":{"nullable":true,"type":"number","minimum":0,"maximum":2},"max_output_tokens":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true},"top_p":{"nullable":true,"type":"number","minimum":0,"maximum":1},"store":{"nullable":true,"type":"boolean"},"tools":{},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}]},"text":{"nullable":true,"type":"object","properties":{"format":{"nullable":true,"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false}]}},"additionalProperties":false},"files":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}}},"required":["model","tools","input","files","skills"],"additionalProperties":false}},"required":["version","data"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","enum":["v2"],"description":"Schema version discriminator — must be \"v2\" for the current schema"},"data":{"type":"object","properties":{"models":{"type":"object","properties":{"agent":{"type":"object","properties":{"model":{"type":"string","enum":["claude-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","d1-max","duvo-1-max","duvo-1-max-sonnet-1m","duvo-1-max-sonnet-4.5","duvo-1-max-sonnet-4.5-1m","duvo-1-max-opus","duvo-1-max-opus-4.5","gpt-4.1","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","claude-sonnet-4-20250514","claude-sonnet-4-20250514[1m]","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101"],"description":"Claude model identifier used for the primary agent loop"}},"required":["model"],"additionalProperties":false,"description":"Primary Claude agent model configuration"},"browsing":{"type":"object","properties":{"provider":{"type":"string","enum":["google","anthropic"],"description":"Provider backing the browsing/computer-use model"},"model":{"type":"string","enum":["gemini-2.5-pro","gemini-2.5-flash","gemini-3-pro-preview","claude-haiku-4-5","claude-sonnet-4-5","claude-opus-4-1"],"description":"Model identifier for the browsing provider"}},"required":["provider","model"],"additionalProperties":false,"description":"Browsing/computer-use model configuration"}},"required":["agent","browsing"],"additionalProperties":false,"description":"Model configuration for each capability the agent uses"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}],"description":"Initial agent instructions — either a single system prompt string or a list of structured messages"},"files":{"default":[],"description":"IDs of team files that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"description":"IDs of skills (team or system) that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"plugins":{"default":[],"description":"Plugins to load — either a built-in plugin name (e.g. \"code-review\") or a GitHub URL (e.g. \"https://github.com/owner/repo\")","nullable":true,"type":"array","items":{"type":"string"}},"subAgents":{"default":[],"description":"IDs of other assignments (agents in the same team) to expose to this assignment as Claude Code subagents. Each sub-assignment runs with its own SOP and connections; the parent can delegate to them via the Agent tool.","nullable":true,"type":"array","items":{"type":"string","format":"uuid"}},"options":{"description":"Optional runtime options controlling how the agent executes","type":"object","properties":{"browserProvider":{"description":"Browser infrastructure provider","type":"string","enum":["browserbase","browser-use"]},"evaluationSchemaId":{"description":"ID of the evaluation schema to apply to runs of this agent","type":"string"},"benchmarkExpectedOutcomes":{"description":"Expected outcomes used when running benchmark scenarios","type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Human-readable description of the expected outcome"},"criteria":{"type":"string","description":"Pass/fail criteria used to evaluate the outcome"}},"required":["description","criteria"],"additionalProperties":false}}},"additionalProperties":{}}},"required":["models","input","files","skills","plugins","subAgents"],"additionalProperties":false,"description":"Agent configuration payload"}},"required":["version","data"],"additionalProperties":false}]},"status":{"nullable":true,"type":"string"},"revision_number":{"nullable":true,"type":"number"},"parent_build_id":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"type":"string"},"created_by_name":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"},"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"build_id":{"type":"string"},"agent_id":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"frequency":{"type":"string","enum":["every_5_minutes","every_15_minutes","hourly","daily","workday","weekly","monthly","custom"]},"time":{"nullable":true,"type":"string"},"timezone":{"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"cron":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"task":{"nullable":true,"type":"string"},"recurring":{"nullable":true,"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","created_at","updated_at"],"additionalProperties":false}}},"required":["id","copilot_id","agent_id","name","config","status","revision_number","parent_build_id","created_by","created_at","updated_at"],"additionalProperties":false}},"required":["build"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Revision","deprecated":true}},"/v1/revisions/{build_id}/promote":{"post":{"operationId":"promoteRevision","tags":["Revisions"],"description":"Promote a draft or historic revision to the live version. The live revision is the one used by triggers and new runs. Fails if the revision is already live, or if a draft revision still has an active builder run.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision_name":{"description":"Optional display name to set on the promoted revision.","type":"string","minLength":1,"maxLength":80},"revision_description":{"description":"Optional description for the promoted revision. Pass null to clear an existing description.","nullable":true,"type":"string","maxLength":500}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"The build's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Promote Revision","deprecated":true}},"/v1/agents/{agent_id}/revisions/{build_id}/integrations":{"get":{"operationId":"listRevisionIntegrations","tags":["Revision Integrations"],"description":"List integrations attached to an agent revision.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"Agent ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"Build ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"integration_id":{"nullable":true,"type":"string","format":"uuid"},"custom_integration_id":{"nullable":true,"type":"string","format":"uuid"},"integration_type":{"type":"string"},"integration_name":{"type":"string"},"created_at":{"type":"string"}},"required":["id","integration_id","custom_integration_id","integration_type","integration_name","created_at"],"additionalProperties":false}}},"required":["integrations"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Revision Integrations","deprecated":true},"post":{"operationId":"attachRevisionIntegrations","tags":["Revision Integrations"],"description":"Attach one or more integrations to an agent revision. To pin specific connections after attachment, use pinRevisionIntegrationConnection. IMPORTANT for the case-queue-producer and case-queue-consumer integrations: attaching the integration alone is NOT enough — the slot points at no queue and will fail at runtime until you link at least one queue with replaceRevisionIntegrationQueues. After wiring up, call getRevisionCaseQueueSetup to confirm every case-queue slot has linked_queue_count > 0 before starting work.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"integration_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid"},"description":"Integration IDs (or custom integration IDs) to attach to the revision"}},"required":["integration_ids"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"Agent ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"Build ID"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True if integrations were attached"},"count":{"type":"number","description":"Number of new integrations attached to the revision"}},"required":["success","count"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Attach Revision Integrations","deprecated":true}},"/v1/agents/{agent_id}/revisions/{build_id}/integrations/{integration_id}":{"delete":{"operationId":"removeRevisionIntegration","tags":["Revision Integrations"],"description":"Remove an integration from an agent revision. Removes the slot for everyone on the revision, including all per-user connection pins. Requires edit permission on the agent.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"Agent ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"Build ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"integration_id","required":true,"description":"Integration ID (catalog integration ID or slot ID from the list response)"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True if the integration was removed"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Remove Revision Integration","deprecated":true}},"/v1/agents/{agent_id}/revisions/{build_id}/integrations/{integration_id}/connections":{"get":{"operationId":"listRevisionIntegrationConnections","tags":["Revision Integrations"],"description":"List the connections you have pinned to this build's integration slot. Multi-pin is supported: you can pin multiple connections to the same slot.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"Agent ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"Build ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"integration_id","required":true,"description":"Integration ID (catalog integration ID or slot ID from the list response)"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"connections":{"type":"array","items":{"type":"object","properties":{"connection_id":{"type":"string","format":"uuid","description":"Connection (integration_instance) identifier"},"created_at":{"type":"string","description":"ISO 8601 timestamp when the pin was created"}},"required":["connection_id","created_at"],"additionalProperties":false},"description":"Connections pinned by the calling user to this slot"}},"required":["connections"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Revision Integration Connections","deprecated":true},"post":{"operationId":"pinRevisionIntegrationConnection","tags":["Revision Integrations"],"description":"Pin one of your connections (from GET /v2/teams/:team_id/connections) to this build's integration slot. Multi-pin is supported: a single user can pin multiple connections to the same slot.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connection_id":{"type":"string","format":"uuid","description":"ID of one of your connections (from GET /v2/teams/:team_id/connections) to pin to this slot"}},"required":["connection_id"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"Agent ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"Build ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"integration_id","required":true,"description":"Integration ID (catalog integration ID or slot ID from the list response)"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True if the connection was pinned"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Pin Revision Integration Connection","deprecated":true}},"/v1/agents/{agent_id}/revisions/{build_id}/integrations/{integration_id}/connections/{connection_id}":{"delete":{"operationId":"unpinRevisionIntegrationConnection","tags":["Revision Integrations"],"description":"Unpin one of your connections from this build's integration slot. The connection itself is not deleted; only the binding to this slot is removed.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"Agent ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"Build ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"integration_id","required":true,"description":"Integration ID (catalog integration ID or slot ID from the list response)"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"connection_id","required":true,"description":"Connection ID to unpin"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True if the connection is no longer pinned to the slot"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Unpin Revision Integration Connection","deprecated":true}},"/v1/agents/{agent_id}/revisions/{build_id}/case-queue-validation":{"get":{"operationId":"getRevisionCaseQueueSetup","tags":["Revision Integrations"],"description":"Check that this build's case-queue integration slots are wired up correctly. Returns, per case-queue-producer/consumer slot, how many queues are linked, plus whether your team owns any case queues. A slot with linked_queue_count of 0 is attached but points at no queue and will fail at runtime — link a queue with replaceRevisionIntegrationQueues before starting work.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"Agent ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"Build ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"configs":{"type":"array","items":{"type":"object","properties":{"config_id":{"type":"string","format":"uuid","description":"Integration slot (agent_integration_config) ID"},"integration_type":{"type":"string","description":"Slug of the integration type (e.g. case-queue-producer)"},"linked_queue_count":{"type":"number","description":"Number of case queues currently linked to this slot"}},"required":["config_id","integration_type","linked_queue_count"],"additionalProperties":false},"description":"Per-slot case-queue link summary for the build"},"has_available_queues":{"type":"boolean","description":"True if the current team owns at least one case queue"}},"required":["configs","has_available_queues"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Revision Case Queue Setup","deprecated":true}},"/v1/agents/{agent_id}/revisions/{build_id}/integrations/{integration_id}/queues":{"get":{"operationId":"listRevisionIntegrationQueues","tags":["Revision Integrations"],"description":"List the case queues linked to this build's case-queue integration slot. Only meaningful for case-queue-producer and case-queue-consumer integrations.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"Agent ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"Build ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"integration_id","required":true,"description":"Integration ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"queues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["queues"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Revision Integration Queues","deprecated":true},"put":{"operationId":"replaceRevisionIntegrationQueues","tags":["Revision Integrations"],"description":"Replace the set of case queues linked to this build's case-queue integration slot. Send the full desired queue list — any queues not in the list will be unlinked. Requires edit permission on the agent. After linking, call getRevisionCaseQueueSetup to confirm the slot now reports linked_queue_count > 0.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"queue_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Full set of queue IDs to link to this slot. Replaces any existing links."}},"required":["queue_ids"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"Agent ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"build_id","required":true,"description":"Build ID"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"integration_id","required":true,"description":"Integration ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"queues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["queues"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Replace Revision Integration Queues","deprecated":true}},"/v1/agents/{agent_id}/suggestions":{"get":{"operationId":"listAgentSuggestions","tags":["Suggestions"],"description":"List an Agent's suggestions. status=pending is the inbox; status=history is consumed/dismissed/auto-cleared. Reads lazily auto-clear stale pending items.","parameters":[{"schema":{"default":"pending","type":"string","enum":["pending","history"]},"in":"query","name":"status","required":false},{"schema":{"default":100,"type":"integer","minimum":1,"maximum":250},"in":"query","name":"limit","required":false},{"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agent_id","required":true,"description":"The Agent's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","consumed","rejected","superseded"]},"generated_by":{"type":"string","enum":["connection_llm","eval","dreaming"]},"title":{"type":"string"},"description":{"type":"string"},"dedup_key":{"type":"string"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"superseded_reason":{"nullable":true,"type":"string"},"superseded_by_suggestion_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"agent_run_id":{"type":"string","format":"uuid"},"run_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"}},"required":["agent_run_id","run_number","created_at"],"additionalProperties":false}},"type":{"type":"string","enum":["aop"]},"payload":{"type":"object","properties":{"oldSop":{"type":"string"},"newSop":{"type":"string"}},"required":["oldSop","newSop"],"additionalProperties":false}},"required":["id","agent_id","status","generated_by","title","description","dedup_key","resolved_at","resolved_by_user_id","superseded_reason","superseded_by_suggestion_id","created_at","updated_at","sources","type","payload"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","consumed","rejected","superseded"]},"generated_by":{"type":"string","enum":["connection_llm","eval","dreaming"]},"title":{"type":"string"},"description":{"type":"string"},"dedup_key":{"type":"string"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"superseded_reason":{"nullable":true,"type":"string"},"superseded_by_suggestion_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"agent_run_id":{"type":"string","format":"uuid"},"run_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"}},"required":["agent_run_id","run_number","created_at"],"additionalProperties":false}},"type":{"type":"string","enum":["connection_add"]},"payload":{"type":"object","properties":{"toSlug":{"type":"string","enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","system","browser-agent","browser-agent-devtools","notion","linear","confluence","custom_mcp","user_mcp","snowflake","sharepoint","teams","onedrive","bigquery","databricks","netsuite","outlook","microsoft-calendar","excel","word","saps4hana","md365","businesscentral","oraclefusion","workday","coupa","signavio","msteams","human-in-the-loop","email-attachments-reader","document-processor","google-docs","google-sheets","google-drive","outbound-call","case-queue-producer","case-queue-consumer","handover","shopify","hubspot","zendesk","intercom","powerbi","salesforce","pipedrive","tableau","image-generation","forecasting","supabase","attio","amplitude","websets","firecrawl-platform","duvo-computer-use","duvo-computer-use-rdp","eu-commodity-prices","asana","ssh","scheduling","github","linear-native","notion-native","granola","bamboohr"]},"toIntegrationId":{"type":"string","format":"uuid"}},"required":["toSlug","toIntegrationId"],"additionalProperties":false}},"required":["id","agent_id","status","generated_by","title","description","dedup_key","resolved_at","resolved_by_user_id","superseded_reason","superseded_by_suggestion_id","created_at","updated_at","sources","type","payload"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","consumed","rejected","superseded"]},"generated_by":{"type":"string","enum":["connection_llm","eval","dreaming"]},"title":{"type":"string"},"description":{"type":"string"},"dedup_key":{"type":"string"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"superseded_reason":{"nullable":true,"type":"string"},"superseded_by_suggestion_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"agent_run_id":{"type":"string","format":"uuid"},"run_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"}},"required":["agent_run_id","run_number","created_at"],"additionalProperties":false}},"type":{"type":"string","enum":["connection_replace"]},"payload":{"type":"object","properties":{"fromSlug":{"type":"string","enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","system","browser-agent","browser-agent-devtools","notion","linear","confluence","custom_mcp","user_mcp","snowflake","sharepoint","teams","onedrive","bigquery","databricks","netsuite","outlook","microsoft-calendar","excel","word","saps4hana","md365","businesscentral","oraclefusion","workday","coupa","signavio","msteams","human-in-the-loop","email-attachments-reader","document-processor","google-docs","google-sheets","google-drive","outbound-call","case-queue-producer","case-queue-consumer","handover","shopify","hubspot","zendesk","intercom","powerbi","salesforce","pipedrive","tableau","image-generation","forecasting","supabase","attio","amplitude","websets","firecrawl-platform","duvo-computer-use","duvo-computer-use-rdp","eu-commodity-prices","asana","ssh","scheduling","github","linear-native","notion-native","granola","bamboohr"]},"toSlug":{"type":"string","enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","system","browser-agent","browser-agent-devtools","notion","linear","confluence","custom_mcp","user_mcp","snowflake","sharepoint","teams","onedrive","bigquery","databricks","netsuite","outlook","microsoft-calendar","excel","word","saps4hana","md365","businesscentral","oraclefusion","workday","coupa","signavio","msteams","human-in-the-loop","email-attachments-reader","document-processor","google-docs","google-sheets","google-drive","outbound-call","case-queue-producer","case-queue-consumer","handover","shopify","hubspot","zendesk","intercom","powerbi","salesforce","pipedrive","tableau","image-generation","forecasting","supabase","attio","amplitude","websets","firecrawl-platform","duvo-computer-use","duvo-computer-use-rdp","eu-commodity-prices","asana","ssh","scheduling","github","linear-native","notion-native","granola","bamboohr"]},"toIntegrationId":{"type":"string","format":"uuid"}},"required":["fromSlug","toSlug","toIntegrationId"],"additionalProperties":false}},"required":["id","agent_id","status","generated_by","title","description","dedup_key","resolved_at","resolved_by_user_id","superseded_reason","superseded_by_suggestion_id","created_at","updated_at","sources","type","payload"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","consumed","rejected","superseded"]},"generated_by":{"type":"string","enum":["connection_llm","eval","dreaming"]},"title":{"type":"string"},"description":{"type":"string"},"dedup_key":{"type":"string"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"superseded_reason":{"nullable":true,"type":"string"},"superseded_by_suggestion_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"agent_run_id":{"type":"string","format":"uuid"},"run_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"}},"required":["agent_run_id","run_number","created_at"],"additionalProperties":false}},"type":{"type":"string","enum":["connection_remove"]},"payload":{"type":"object","properties":{"slug":{"type":"string","enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","system","browser-agent","browser-agent-devtools","notion","linear","confluence","custom_mcp","user_mcp","snowflake","sharepoint","teams","onedrive","bigquery","databricks","netsuite","outlook","microsoft-calendar","excel","word","saps4hana","md365","businesscentral","oraclefusion","workday","coupa","signavio","msteams","human-in-the-loop","email-attachments-reader","document-processor","google-docs","google-sheets","google-drive","outbound-call","case-queue-producer","case-queue-consumer","handover","shopify","hubspot","zendesk","intercom","powerbi","salesforce","pipedrive","tableau","image-generation","forecasting","supabase","attio","amplitude","websets","firecrawl-platform","duvo-computer-use","duvo-computer-use-rdp","eu-commodity-prices","asana","ssh","scheduling","github","linear-native","notion-native","granola","bamboohr"]}},"required":["slug"],"additionalProperties":false}},"required":["id","agent_id","status","generated_by","title","description","dedup_key","resolved_at","resolved_by_user_id","superseded_reason","superseded_by_suggestion_id","created_at","updated_at","sources","type","payload"],"additionalProperties":false}]}},"pending_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["data","pending_count"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Agent Suggestions","deprecated":true}},"/v1/agents/suggestions/{id}/consume":{"post":{"operationId":"consumeAgentSuggestion","tags":["Suggestions"],"description":"Apply a suggestion: stage its change into the Agent's draft revision, then auto-clear any pending suggestions it makes moot.","requestBody":{"required":true,"content":{"application/json":{"schema":{"default":{},"type":"object","properties":{"revision_id":{"type":"string","format":"uuid"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The suggestion's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","consumed","rejected","superseded"]},"generated_by":{"type":"string","enum":["connection_llm","eval","dreaming"]},"title":{"type":"string"},"description":{"type":"string"},"dedup_key":{"type":"string"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"superseded_reason":{"nullable":true,"type":"string"},"superseded_by_suggestion_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"agent_run_id":{"type":"string","format":"uuid"},"run_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"}},"required":["agent_run_id","run_number","created_at"],"additionalProperties":false}},"type":{"type":"string","enum":["aop"]},"payload":{"type":"object","properties":{"oldSop":{"type":"string"},"newSop":{"type":"string"}},"required":["oldSop","newSop"],"additionalProperties":false}},"required":["id","agent_id","status","generated_by","title","description","dedup_key","resolved_at","resolved_by_user_id","superseded_reason","superseded_by_suggestion_id","created_at","updated_at","sources","type","payload"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","consumed","rejected","superseded"]},"generated_by":{"type":"string","enum":["connection_llm","eval","dreaming"]},"title":{"type":"string"},"description":{"type":"string"},"dedup_key":{"type":"string"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"superseded_reason":{"nullable":true,"type":"string"},"superseded_by_suggestion_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"agent_run_id":{"type":"string","format":"uuid"},"run_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"}},"required":["agent_run_id","run_number","created_at"],"additionalProperties":false}},"type":{"type":"string","enum":["connection_add"]},"payload":{"type":"object","properties":{"toSlug":{"type":"string","enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","system","browser-agent","browser-agent-devtools","notion","linear","confluence","custom_mcp","user_mcp","snowflake","sharepoint","teams","onedrive","bigquery","databricks","netsuite","outlook","microsoft-calendar","excel","word","saps4hana","md365","businesscentral","oraclefusion","workday","coupa","signavio","msteams","human-in-the-loop","email-attachments-reader","document-processor","google-docs","google-sheets","google-drive","outbound-call","case-queue-producer","case-queue-consumer","handover","shopify","hubspot","zendesk","intercom","powerbi","salesforce","pipedrive","tableau","image-generation","forecasting","supabase","attio","amplitude","websets","firecrawl-platform","duvo-computer-use","duvo-computer-use-rdp","eu-commodity-prices","asana","ssh","scheduling","github","linear-native","notion-native","granola","bamboohr"]},"toIntegrationId":{"type":"string","format":"uuid"}},"required":["toSlug","toIntegrationId"],"additionalProperties":false}},"required":["id","agent_id","status","generated_by","title","description","dedup_key","resolved_at","resolved_by_user_id","superseded_reason","superseded_by_suggestion_id","created_at","updated_at","sources","type","payload"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","consumed","rejected","superseded"]},"generated_by":{"type":"string","enum":["connection_llm","eval","dreaming"]},"title":{"type":"string"},"description":{"type":"string"},"dedup_key":{"type":"string"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"superseded_reason":{"nullable":true,"type":"string"},"superseded_by_suggestion_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"agent_run_id":{"type":"string","format":"uuid"},"run_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"}},"required":["agent_run_id","run_number","created_at"],"additionalProperties":false}},"type":{"type":"string","enum":["connection_replace"]},"payload":{"type":"object","properties":{"fromSlug":{"type":"string","enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","system","browser-agent","browser-agent-devtools","notion","linear","confluence","custom_mcp","user_mcp","snowflake","sharepoint","teams","onedrive","bigquery","databricks","netsuite","outlook","microsoft-calendar","excel","word","saps4hana","md365","businesscentral","oraclefusion","workday","coupa","signavio","msteams","human-in-the-loop","email-attachments-reader","document-processor","google-docs","google-sheets","google-drive","outbound-call","case-queue-producer","case-queue-consumer","handover","shopify","hubspot","zendesk","intercom","powerbi","salesforce","pipedrive","tableau","image-generation","forecasting","supabase","attio","amplitude","websets","firecrawl-platform","duvo-computer-use","duvo-computer-use-rdp","eu-commodity-prices","asana","ssh","scheduling","github","linear-native","notion-native","granola","bamboohr"]},"toSlug":{"type":"string","enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","system","browser-agent","browser-agent-devtools","notion","linear","confluence","custom_mcp","user_mcp","snowflake","sharepoint","teams","onedrive","bigquery","databricks","netsuite","outlook","microsoft-calendar","excel","word","saps4hana","md365","businesscentral","oraclefusion","workday","coupa","signavio","msteams","human-in-the-loop","email-attachments-reader","document-processor","google-docs","google-sheets","google-drive","outbound-call","case-queue-producer","case-queue-consumer","handover","shopify","hubspot","zendesk","intercom","powerbi","salesforce","pipedrive","tableau","image-generation","forecasting","supabase","attio","amplitude","websets","firecrawl-platform","duvo-computer-use","duvo-computer-use-rdp","eu-commodity-prices","asana","ssh","scheduling","github","linear-native","notion-native","granola","bamboohr"]},"toIntegrationId":{"type":"string","format":"uuid"}},"required":["fromSlug","toSlug","toIntegrationId"],"additionalProperties":false}},"required":["id","agent_id","status","generated_by","title","description","dedup_key","resolved_at","resolved_by_user_id","superseded_reason","superseded_by_suggestion_id","created_at","updated_at","sources","type","payload"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","consumed","rejected","superseded"]},"generated_by":{"type":"string","enum":["connection_llm","eval","dreaming"]},"title":{"type":"string"},"description":{"type":"string"},"dedup_key":{"type":"string"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"superseded_reason":{"nullable":true,"type":"string"},"superseded_by_suggestion_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"agent_run_id":{"type":"string","format":"uuid"},"run_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"}},"required":["agent_run_id","run_number","created_at"],"additionalProperties":false}},"type":{"type":"string","enum":["connection_remove"]},"payload":{"type":"object","properties":{"slug":{"type":"string","enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","system","browser-agent","browser-agent-devtools","notion","linear","confluence","custom_mcp","user_mcp","snowflake","sharepoint","teams","onedrive","bigquery","databricks","netsuite","outlook","microsoft-calendar","excel","word","saps4hana","md365","businesscentral","oraclefusion","workday","coupa","signavio","msteams","human-in-the-loop","email-attachments-reader","document-processor","google-docs","google-sheets","google-drive","outbound-call","case-queue-producer","case-queue-consumer","handover","shopify","hubspot","zendesk","intercom","powerbi","salesforce","pipedrive","tableau","image-generation","forecasting","supabase","attio","amplitude","websets","firecrawl-platform","duvo-computer-use","duvo-computer-use-rdp","eu-commodity-prices","asana","ssh","scheduling","github","linear-native","notion-native","granola","bamboohr"]}},"required":["slug"],"additionalProperties":false}},"required":["id","agent_id","status","generated_by","title","description","dedup_key","resolved_at","resolved_by_user_id","superseded_reason","superseded_by_suggestion_id","created_at","updated_at","sources","type","payload"],"additionalProperties":false}]},"applied_revision_id":{"type":"string","format":"uuid"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Consume Agent Suggestion","deprecated":true}},"/v1/agents/suggestions/{id}/reject":{"post":{"operationId":"rejectAgentSuggestion","tags":["Suggestions"],"description":"Dismiss a pending suggestion.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true,"description":"The suggestion's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","consumed","rejected","superseded"]},"generated_by":{"type":"string","enum":["connection_llm","eval","dreaming"]},"title":{"type":"string"},"description":{"type":"string"},"dedup_key":{"type":"string"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"superseded_reason":{"nullable":true,"type":"string"},"superseded_by_suggestion_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"agent_run_id":{"type":"string","format":"uuid"},"run_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"}},"required":["agent_run_id","run_number","created_at"],"additionalProperties":false}},"type":{"type":"string","enum":["aop"]},"payload":{"type":"object","properties":{"oldSop":{"type":"string"},"newSop":{"type":"string"}},"required":["oldSop","newSop"],"additionalProperties":false}},"required":["id","agent_id","status","generated_by","title","description","dedup_key","resolved_at","resolved_by_user_id","superseded_reason","superseded_by_suggestion_id","created_at","updated_at","sources","type","payload"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","consumed","rejected","superseded"]},"generated_by":{"type":"string","enum":["connection_llm","eval","dreaming"]},"title":{"type":"string"},"description":{"type":"string"},"dedup_key":{"type":"string"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"superseded_reason":{"nullable":true,"type":"string"},"superseded_by_suggestion_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"agent_run_id":{"type":"string","format":"uuid"},"run_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"}},"required":["agent_run_id","run_number","created_at"],"additionalProperties":false}},"type":{"type":"string","enum":["connection_add"]},"payload":{"type":"object","properties":{"toSlug":{"type":"string","enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","system","browser-agent","browser-agent-devtools","notion","linear","confluence","custom_mcp","user_mcp","snowflake","sharepoint","teams","onedrive","bigquery","databricks","netsuite","outlook","microsoft-calendar","excel","word","saps4hana","md365","businesscentral","oraclefusion","workday","coupa","signavio","msteams","human-in-the-loop","email-attachments-reader","document-processor","google-docs","google-sheets","google-drive","outbound-call","case-queue-producer","case-queue-consumer","handover","shopify","hubspot","zendesk","intercom","powerbi","salesforce","pipedrive","tableau","image-generation","forecasting","supabase","attio","amplitude","websets","firecrawl-platform","duvo-computer-use","duvo-computer-use-rdp","eu-commodity-prices","asana","ssh","scheduling","github","linear-native","notion-native","granola","bamboohr"]},"toIntegrationId":{"type":"string","format":"uuid"}},"required":["toSlug","toIntegrationId"],"additionalProperties":false}},"required":["id","agent_id","status","generated_by","title","description","dedup_key","resolved_at","resolved_by_user_id","superseded_reason","superseded_by_suggestion_id","created_at","updated_at","sources","type","payload"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","consumed","rejected","superseded"]},"generated_by":{"type":"string","enum":["connection_llm","eval","dreaming"]},"title":{"type":"string"},"description":{"type":"string"},"dedup_key":{"type":"string"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"superseded_reason":{"nullable":true,"type":"string"},"superseded_by_suggestion_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"agent_run_id":{"type":"string","format":"uuid"},"run_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"}},"required":["agent_run_id","run_number","created_at"],"additionalProperties":false}},"type":{"type":"string","enum":["connection_replace"]},"payload":{"type":"object","properties":{"fromSlug":{"type":"string","enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","system","browser-agent","browser-agent-devtools","notion","linear","confluence","custom_mcp","user_mcp","snowflake","sharepoint","teams","onedrive","bigquery","databricks","netsuite","outlook","microsoft-calendar","excel","word","saps4hana","md365","businesscentral","oraclefusion","workday","coupa","signavio","msteams","human-in-the-loop","email-attachments-reader","document-processor","google-docs","google-sheets","google-drive","outbound-call","case-queue-producer","case-queue-consumer","handover","shopify","hubspot","zendesk","intercom","powerbi","salesforce","pipedrive","tableau","image-generation","forecasting","supabase","attio","amplitude","websets","firecrawl-platform","duvo-computer-use","duvo-computer-use-rdp","eu-commodity-prices","asana","ssh","scheduling","github","linear-native","notion-native","granola","bamboohr"]},"toSlug":{"type":"string","enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","system","browser-agent","browser-agent-devtools","notion","linear","confluence","custom_mcp","user_mcp","snowflake","sharepoint","teams","onedrive","bigquery","databricks","netsuite","outlook","microsoft-calendar","excel","word","saps4hana","md365","businesscentral","oraclefusion","workday","coupa","signavio","msteams","human-in-the-loop","email-attachments-reader","document-processor","google-docs","google-sheets","google-drive","outbound-call","case-queue-producer","case-queue-consumer","handover","shopify","hubspot","zendesk","intercom","powerbi","salesforce","pipedrive","tableau","image-generation","forecasting","supabase","attio","amplitude","websets","firecrawl-platform","duvo-computer-use","duvo-computer-use-rdp","eu-commodity-prices","asana","ssh","scheduling","github","linear-native","notion-native","granola","bamboohr"]},"toIntegrationId":{"type":"string","format":"uuid"}},"required":["fromSlug","toSlug","toIntegrationId"],"additionalProperties":false}},"required":["id","agent_id","status","generated_by","title","description","dedup_key","resolved_at","resolved_by_user_id","superseded_reason","superseded_by_suggestion_id","created_at","updated_at","sources","type","payload"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","consumed","rejected","superseded"]},"generated_by":{"type":"string","enum":["connection_llm","eval","dreaming"]},"title":{"type":"string"},"description":{"type":"string"},"dedup_key":{"type":"string"},"resolved_at":{"nullable":true,"type":"string"},"resolved_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"superseded_reason":{"nullable":true,"type":"string"},"superseded_by_suggestion_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"agent_run_id":{"type":"string","format":"uuid"},"run_number":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"created_at":{"type":"string"}},"required":["agent_run_id","run_number","created_at"],"additionalProperties":false}},"type":{"type":"string","enum":["connection_remove"]},"payload":{"type":"object","properties":{"slug":{"type":"string","enum":["googlecalendar","google-calendar","gmail","slack","googledocs","googlesheets","googledrive","firecrawl","exa","exa-search","exa-company-search","exa-people-search","deep-research","system","browser-agent","browser-agent-devtools","notion","linear","confluence","custom_mcp","user_mcp","snowflake","sharepoint","teams","onedrive","bigquery","databricks","netsuite","outlook","microsoft-calendar","excel","word","saps4hana","md365","businesscentral","oraclefusion","workday","coupa","signavio","msteams","human-in-the-loop","email-attachments-reader","document-processor","google-docs","google-sheets","google-drive","outbound-call","case-queue-producer","case-queue-consumer","handover","shopify","hubspot","zendesk","intercom","powerbi","salesforce","pipedrive","tableau","image-generation","forecasting","supabase","attio","amplitude","websets","firecrawl-platform","duvo-computer-use","duvo-computer-use-rdp","eu-commodity-prices","asana","ssh","scheduling","github","linear-native","notion-native","granola","bamboohr"]}},"required":["slug"],"additionalProperties":false}},"required":["id","agent_id","status","generated_by","title","description","dedup_key","resolved_at","resolved_by_user_id","superseded_reason","superseded_by_suggestion_id","created_at","updated_at","sources","type","payload"],"additionalProperties":false}]},"applied_revision_id":{"type":"string","format":"uuid"}},"required":["data"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Reject Agent Suggestion","deprecated":true}},"/v1/skills/system":{"get":{"operationId":"listSystemSkills","tags":["Skills"],"description":"List all system skills (skills available to all teams).","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique skill identifier"},"name":{"type":"string","description":"Human-readable skill name"},"description":{"type":"string","description":"Short summary of what the skill does"}},"required":["id","name","description"],"additionalProperties":false},"description":"System skills available to all teams"}},"required":["skills"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List System Skills","deprecated":true}},"/v1/skills/{skill_id}":{"delete":{"operationId":"deleteSkill","tags":["Skills"],"description":"Delete a skill for the current team.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"skill_id","required":true,"description":"Skill ID."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True if the skill was deleted"},"message":{"type":"string","description":"Human-readable result message"}},"required":["success","message"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Skill","deprecated":true}},"/v1/skills/{skill_id}/download":{"get":{"operationId":"downloadSkill","tags":["Skills"],"description":"Download a custom skill as a ZIP archive. Only custom (team-owned) skills can be downloaded.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"skill_id","required":true,"description":"Skill ID."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Download Skill","deprecated":true}},"/v1/skills/{skill_id}/files":{"get":{"operationId":"listSkillFiles","tags":["Skills"],"description":"List all files in a skill.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"skill_id","required":true,"description":"Skill ID."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"File name (basename)"},"path":{"type":"string","description":"Relative path of the file inside the skill"},"size":{"description":"File size in bytes","type":"number"},"contentType":{"description":"MIME content type of the file","type":"string"},"updatedAt":{"description":"ISO 8601 timestamp of the last update","type":"string"}},"required":["name","path"],"additionalProperties":false},"description":"Files contained in the skill"}},"required":["files"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Skill Files","deprecated":true}},"/v1/skills/{skill_id}/files/{*}":{"get":{"operationId":"getSkillFileContent","tags":["Skills"],"description":"Get the content of a file in a skill.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"skill_id","required":true,"description":"Skill ID."},{"schema":{"type":"string","minLength":1},"in":"path","name":"*","required":true,"description":"Relative path to the file inside the skill, e.g. SKILL.md."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"UTF-8 decoded contents of the file"},"path":{"type":"string","description":"Relative path of the file inside the skill"},"contentType":{"description":"MIME content type inferred from the file extension","type":"string"}},"required":["content","path"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Skill File Content","deprecated":true},"put":{"operationId":"updateSkillFile","tags":["Skills"],"description":"Update the content of a file in a skill. Only team skills can be edited.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"New UTF-8 text content for the file."}},"required":["content"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"skill_id","required":true,"description":"Skill ID."},{"schema":{"type":"string","minLength":1},"in":"path","name":"*","required":true,"description":"Relative path to the file inside the skill, e.g. SKILL.md."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True if the file was updated"},"message":{"type":"string","description":"Human-readable result message"},"skill":{"description":"Updated skill metadata, present only when SKILL.md was edited","type":"object","properties":{"id":{"type":"string","description":"Unique skill identifier"},"name":{"type":"string","description":"Updated skill name parsed from SKILL.md"},"description":{"type":"string","description":"Updated skill description parsed from SKILL.md"}},"required":["id","name","description"],"additionalProperties":false}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Short error code"},"message":{"description":"Human-readable error message","type":"string"},"validationErrors":{"description":"Per-field validation errors, present on frontmatter validation failure","type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the invalid field"},"message":{"type":"string","description":"Validation error message for the field"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Short error code"},"message":{"description":"Human-readable error message","type":"string"},"validationErrors":{"description":"Per-field validation errors, present on frontmatter validation failure","type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the invalid field"},"message":{"type":"string","description":"Validation error message for the field"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Short error code"},"message":{"description":"Human-readable error message","type":"string"},"validationErrors":{"description":"Per-field validation errors, present on frontmatter validation failure","type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the invalid field"},"message":{"type":"string","description":"Validation error message for the field"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Short error code"},"message":{"description":"Human-readable error message","type":"string"},"validationErrors":{"description":"Per-field validation errors, present on frontmatter validation failure","type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the invalid field"},"message":{"type":"string","description":"Validation error message for the field"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Short error code"},"message":{"description":"Human-readable error message","type":"string"},"validationErrors":{"description":"Per-field validation errors, present on frontmatter validation failure","type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the invalid field"},"message":{"type":"string","description":"Validation error message for the field"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Skill File","deprecated":true}},"/v1/skills/{skill_id}/assignments":{"get":{"operationId":"listSkillAssignments","tags":["Skills"],"description":"List the assignments in the current team whose live build references the given skill. Used to warn users that editing a skill will affect every assignment that uses it.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"skill_id","required":true,"description":"Skill ID."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"assignments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique assignment (agent) identifier"},"name":{"type":"string","description":"Human-readable assignment name"}},"required":["id","name"],"additionalProperties":false},"description":"Assignments in the current team whose live build uses the skill"},"total":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Total number of assignments referencing the skill"}},"required":["assignments","total"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Skill Assignments","deprecated":true}},"/v1/profile":{"get":{"operationId":"getProfile","tags":["Team"],"description":"Get the profile of the authenticated user (the owner of the API key).","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"},"teamId":{"nullable":true,"type":"string","format":"uuid"}},"required":["id","name","email","teamId"],"additionalProperties":false}},"required":["profile"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Profile","deprecated":true}},"/v1/clarity/processes/{id}":{"get":{"operationId":"getLegacyClarityProcess","tags":["Clarity"],"description":"Get a legacy v1 Clarity process with process metadata, generated analysis, transformation guidance, generation progress, and captures. Use this for rows from listClarityProcesses where version=1; v2 rows should use getClarityProcess and snapshot detail tools.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"teamId":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","collecting","generating","generating-current-process","generating-transformation-proposal","review","complete","generation_failed"]},"visibility":{"type":"string","enum":["team","restricted"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"analysis":{"nullable":true},"generationError":{"nullable":true,"type":"string"},"customPrompt":{"nullable":true,"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"captures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"processId":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"userName":{"type":"string"},"type":{"type":"string","enum":["video","interview","document","screenshare"]},"videoUrl":{"nullable":true,"type":"string"},"videoTranscript":{"nullable":true,"type":"string"},"transcript":{"nullable":true,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user","interviewer"]},"message":{"type":"string","minLength":1},"timestamp":{"type":"number"}},"required":["source","message"],"additionalProperties":false}},"status":{"type":"string","enum":["pending","recording","processing","complete","failed"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","processId","userId","type","videoUrl","videoTranscript","transcript","status","createdAt","updatedAt"],"additionalProperties":false}},"createdByName":{"type":"string"},"creatorUserId":{"type":"string","format":"uuid"},"generationProgress":{"nullable":true,"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"status":{"type":"string","enum":["pending","in_progress","complete"]},"order":{"type":"number"},"count":{"type":"number"}},"required":["key","label","status","order"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"transformationGuidance":{"nullable":true,"type":"string"},"transformationGuidanceAuthor":{"nullable":true,"type":"string"},"transformationGuidanceDate":{"nullable":true,"type":"string"},"usedGuidanceMessages":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"author":{"nullable":true,"type":"string"},"date":{"nullable":true,"type":"string"}},"required":["content","author","date"],"additionalProperties":false}}},"required":["id","teamId","userId","name","status","visibility","version","analysis","generationError","customPrompt","createdAt","updatedAt","captures","creatorUserId","generationProgress","transformationGuidance","transformationGuidanceAuthor","transformationGuidanceDate","usedGuidanceMessages"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Legacy Clarity Process","deprecated":true}},"/v1/clarity-v2/processes/{process_id}":{"get":{"operationId":"getClarityProcess","tags":["ClarityV2"],"description":"Get the v2 read model for a clarity process: the process row (with operational fields like generation_error, generation_progress, custom_prompt), its captures, and the lightweight version arrays for both snapshot tabs. The full payload of any specific snapshot is fetched lazily via the per-snapshot detail endpoints (`GET .../current-process/:id` and `GET .../transformation-proposal/:id`); this read model deliberately doesn't carry it so the response stays small.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"process":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Clarity process id"},"team_id":{"type":"string","format":"uuid","description":"Owning team id"},"user_id":{"type":"string","format":"uuid","description":"Creator user id"},"name":{"type":"string","description":"Process name"},"status":{"type":"string","enum":["draft","collecting","generating","generating-current-process","generating-transformation-proposal","review","complete","generation_failed"],"description":"Lifecycle status"},"visibility":{"type":"string","enum":["team","restricted"],"description":"Process visibility. 'team' is workspace-visible to full members; 'restricted' is visible to the creator, org admins, workspace managers/admins, and accepted grant holders."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Schema version (always 2 here)"},"generation_error":{"nullable":true,"description":"Error message from the most recent failed generation, if any","type":"string"},"generation_progress":{"nullable":true,"description":"Live progress checklist while a generation is in flight; null otherwise. Field names inside the payload are camelCase, matching the legacy v1 generation-progress shape.","type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"status":{"type":"string","enum":["pending","in_progress","complete"]},"order":{"type":"number"},"count":{"type":"number"}},"required":["key","label","status","order"],"additionalProperties":false}}},"required":["steps"],"additionalProperties":false},"custom_prompt":{"nullable":true,"description":"User-supplied custom prompt that steers generation","type":"string"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"}},"required":["id","team_id","user_id","name","status","visibility","version","generation_error","generation_progress","custom_prompt","created_at","updated_at"],"additionalProperties":false},"current_process_versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Snapshot id"},"process_id":{"type":"string","format":"uuid","description":"Parent clarity_process id"},"parent_current_process_id":{"nullable":true,"description":"Parent current-process snapshot this draft forked from","type":"string","format":"uuid"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"status":{"type":"string","enum":["live","historic","draft","generating"],"description":"Versioning state. Only one 'live' row per process at a time; drafts may be edited or generating before promotion."},"creator_type":{"type":"string","enum":["human","ai"],"description":"Whether this row was created by a user edit ('human') or an AI pipeline run ('ai')."},"user_id":{"nullable":true,"description":"Creator user id (the human who edited or triggered the run).","type":"string","format":"uuid"},"sandbox_id":{"nullable":true,"description":"E2B sandbox id that produced AI rows; null for user edits.","type":"string"},"last_session_id":{"nullable":true,"description":"Claude SDK session id for artifact-chat follow-up reuse.","type":"string"}},"required":["id","process_id","parent_current_process_id","created_at","status","creator_type","user_id","sandbox_id","last_session_id"],"additionalProperties":false},"description":"All non-deleted current-process snapshots, newest first. Lightweight rows (no `data`) for the version-picker UI. Clients lazy-fetch the live (or selected) snapshot via the per-snapshot detail endpoint."},"transformation_proposal_versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Proposal id"},"process_id":{"type":"string","format":"uuid","description":"Parent clarity_process id"},"clarity_current_process_id":{"type":"string","format":"uuid","description":"The current-process snapshot this proposal was generated against (provenance only; the live proposal can target any current-process snapshot)."},"parent_transformation_proposal_id":{"nullable":true,"description":"Parent transformation-proposal snapshot this draft forked from","type":"string","format":"uuid"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"status":{"type":"string","enum":["live","historic","draft","generating"],"description":"Versioning state. Only one 'live' row per process at a time; drafts may be edited or generating before promotion."},"creator_type":{"type":"string","enum":["human","ai"],"description":"Whether this row was created by a user edit ('human') or an AI pipeline run ('ai')."},"user_id":{"nullable":true,"description":"Creator user id (the human who edited or triggered the run).","type":"string","format":"uuid"},"sandbox_id":{"nullable":true,"description":"E2B sandbox id that produced AI rows; null for user edits.","type":"string"},"last_session_id":{"nullable":true,"description":"Claude SDK session id for artifact-chat follow-up reuse.","type":"string"},"extra_capture_requests":{"description":"Active extra-capture requests for this proposal. Populated only on the live proposal version row in the read-model endpoint so the FE can render assignment UI without a second round-trip; historic versions return an empty array. Other endpoints (e.g. admin snapshot views) may omit it entirely, in which case it is `undefined`. The standalone list endpoint stays the source of truth for paginated/admin views.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Extra-capture-request id"},"proposal_id":{"type":"string","format":"uuid","description":"The transformation proposal this request belongs to"},"step_id":{"type":"string","description":"Step id within the proposal's BPMN graph"},"capture_id":{"nullable":true,"description":"Capture that fulfilled this request, once one is created","type":"string","format":"uuid"},"requested_user_id":{"nullable":true,"description":"Assigned team member, if any","type":"string","format":"uuid"},"status":{"type":"string","enum":["requested","captured","resolved"],"description":"Lifecycle status of the request"},"gap":{"type":"string","description":"Plain-language gap blocking automation"},"suggested_prompt":{"nullable":true,"description":"LLM-produced suggested capture prompt","type":"string"},"priority":{"type":"string","enum":["low","medium","high"],"description":"Priority of fulfilling this request"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"}},"required":["id","proposal_id","step_id","capture_id","requested_user_id","status","gap","suggested_prompt","priority","created_at","updated_at"],"additionalProperties":false}}},"required":["id","process_id","clarity_current_process_id","parent_transformation_proposal_id","created_at","status","creator_type","user_id","sandbox_id","last_session_id"],"additionalProperties":false},"description":"All non-deleted transformation-proposal snapshots, newest first. Lightweight rows (no `data`) for the version-picker UI."},"captures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"processId":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"userName":{"type":"string"},"type":{"type":"string","enum":["video","interview","document","screenshare"]},"videoUrl":{"nullable":true,"type":"string"},"videoTranscript":{"nullable":true,"type":"string"},"transcript":{"nullable":true,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user","interviewer"]},"message":{"type":"string","minLength":1},"timestamp":{"type":"number"}},"required":["source","message"],"additionalProperties":false}},"status":{"type":"string","enum":["pending","recording","processing","complete","failed"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","processId","userId","type","videoUrl","videoTranscript","transcript","status","createdAt","updatedAt"],"additionalProperties":false},"description":"All captures (videos, interviews, documents) attached to this process. Field names follow the legacy v1 capture wire format (camelCase) so existing capture consumers keep working unchanged."}},"required":["process","current_process_versions","transformation_proposal_versions","captures"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Process","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/current-process":{"post":{"operationId":"generateClarityCurrentProcess","tags":["ClarityV2"],"description":"Trigger the generateCurrentProcess pipeline for a v2 clarity process. Returns 202 immediately and finalises the snapshot asynchronously via the cc-server webhook stream. Visible through GET /v2/teams/:team_id/clarity-v2/processes/:process_id once complete.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"}],"security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Generation kickoff was accepted"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Generate Clarity Current Process","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/transformation-proposal":{"post":{"operationId":"generateClarityTransformationProposal","tags":["ClarityV2"],"description":"Trigger a transformation-proposal pipeline for a v2 clarity process. With no body or `current_process_id`, runs the generate pipeline against the chosen current-process snapshot (latest by default). With `regenerate_from: <previousProposalId>`, runs the regenerate pipeline anchored to the prior proposal's current-process and the extra captures collected since. Returns 202 immediately and finalises asynchronously via the cc-server webhook stream.","requestBody":{"required":true,"content":{"application/json":{"schema":{"default":{"transformation_aggressiveness":"aggressive"},"type":"object","properties":{"current_process_id":{"description":"ID of a `clarity_current_process` row to anchor the new proposal to. When supplied, runs the generate pipeline against that snapshot. Defaults to the latest snapshot for the process.","type":"string","format":"uuid"},"regenerate_from":{"description":"ID of a `clarity_transformation_proposal` row to refine. When supplied, runs the regenerate pipeline using that proposal's current-process snapshot as the anchor and the extra captures collected since.","type":"string","format":"uuid"},"custom_guidance":{"description":"Optional freeform guidance for this transformation proposal generation. Used as high-priority design guidance, not source-of-truth evidence.","type":"string","maxLength":2000},"transformation_aggressiveness":{"default":"aggressive","description":"Controls how much the generated proposal should change the current process structure.","type":"string","enum":["none","conservative","aggressive"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"}],"security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true],"description":"Generation kickoff was accepted"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Generate Clarity Transformation Proposal","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/transformation-proposal/stop":{"post":{"operationId":"stopClarityTransformationProposal","tags":["ClarityV2"],"description":"Stop an in-flight transformation-proposal generation. Reads the sandbox id from the process row, kills the sandbox, flips the process back to `review`, and clears the sandbox marker so any late webhook from the killed run is dropped as stale.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Stop Clarity Transformation Proposal","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/postprocess":{"post":{"operationId":"postprocessClaritySnapshot","tags":["ClarityV2"],"description":"Re-run postprocessing agents on an existing v2 clarity snapshot. Targets either the current-process snapshot or the transformation-proposal snapshot, identified by id in the body. Flips the process status to `generating` and returns 202 immediately; agents run asynchronously and flip the status back to `review` once they settle.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["current_process"]},"current_process_id":{"type":"string","format":"uuid","description":"ID of the `clarity_current_process` snapshot to re-postprocess."}},"required":["type","current_process_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["transformation_proposal"]},"transformation_proposal_id":{"type":"string","format":"uuid","description":"ID of the `clarity_transformation_proposal` snapshot to re-postprocess."}},"required":["type","transformation_proposal_id"]}]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"}],"security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Postprocess Clarity Snapshot","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/current-process/{current_process_id}":{"delete":{"operationId":"revertClarityCurrentProcess","tags":["ClarityV2"],"description":"Archive a current-process snapshot for a clarity v2 process. v2 only — returns 403 for v1 processes.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"current_process_id","required":true,"description":"The current-process snapshot id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Revert Clarity Current Process","deprecated":true},"get":{"operationId":"getClarityCurrentProcessSnapshot","tags":["ClarityV2"],"description":"Fetch the full payload of a single current-process snapshot, including the BPMN `data` JSONB. Lazy-loaded by the picker when the user selects a specific version. v2 only.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"current_process_id","required":true,"description":"The current-process snapshot id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"snapshot":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Snapshot id"},"parent_current_process_id":{"nullable":true,"description":"Parent current-process snapshot this draft forked from","type":"string","format":"uuid"},"data":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Schema version for the current process data payload. Increment on breaking changes to the data shape so consumers can branch on the version field."},"steps":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the step. Referenced by targetSteps[].stepId and by postprocessing agents annotating specific steps. Example: \"step-review-invoice\""},"targetSteps":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"description":"Id of the step this edge points to. Must match an existing step.id in the same steps array. Example: \"step-review-invoice\""},"label":{"nullable":true,"description":"Human-readable label shown on the BPMN edge. For gateways, the outcome answer; for default flows, \"Otherwise\". Examples: \"Approved\", \"> $5k\", \"Otherwise\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of an exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways must have ≥2 entries with exactly one isDefault: true."},"title":{"type":"string","minLength":1,"description":"Required node label used in lists and BPMN node labels. Structural markers use defaults such as \"Start\" and \"End\"."},"action":{"nullable":true,"description":"Verb-led one-liner summarizing the concrete action performed. Example: \"Reviews invoice line items in NetSuite against the purchase order.\"","type":"string","minLength":1},"role":{"nullable":true,"description":"Performer of this step — the specific job title, team, or system. Use \"Duvo\" for automated actions and \"System\" for system-triggered steps. Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"system":{"nullable":true,"description":"System, tool, or application used to perform this step. Null when the step is purely manual or is a decision/event with no associated tool. Examples: \"NetSuite\", \"Gmail\", \"Excel\", null","type":"string"},"input":{"nullable":true,"description":"Information or artifacts required to start this step. Null on start events or steps with no preconditions. Example: \"Invoice PDF and matching purchase order number\"","type":"string"},"output":{"nullable":true,"description":"What this step produces or updates. Null on pure waits or events that emit nothing. Example: \"Approved invoice record in NetSuite with reviewer signature\"","type":"string"},"exception":{"nullable":true,"description":"Known exceptions, errors, or failure modes observed in the captures for this step. Null when none were mentioned. Example: \"Customer disputes line items or PO number does not match\"","type":"string"},"handling":{"nullable":true,"description":"How exceptions or escalations are handled — escalation path, fallback action, or retry strategy. Null when no exception or no handling described. Example: \"Escalate to AP manager via email and pause processing until resolved\"","type":"string"},"assumptions":{"nullable":true,"description":"Assumptions the LLM made when extracting this step that were not directly stated in captures. Null if none. Used by verification agents to flag risky inferences. Example: [\"Invoices are reviewed within 24 hours of receipt\"]","type":"array","items":{"type":"string"}},"openQuestions":{"nullable":true,"description":"Specific gaps in understanding that a follow-up capture should address. Null if none. Drives the next interview or document request. Example: [\"Is there a backup approver when the AP manager is out of office?\"]","type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["low","medium","high"],"description":"Confidence in the accuracy of this step given evidence quality and completeness. \"high\" = directly stated by multiple sources, \"medium\" = stated by one source or inferred from strong signals, \"low\" = inferred with significant assumptions."},"nodeType":{"type":"string","enum":["event"]},"nodeSubtype":{"type":"string","enum":["start","end","timer","message","escalation"],"description":"BPMN event subtype. \"start\" (entry trigger), \"end\" (terminal state), \"timer\" (time-based wait), \"message\" (external communication), \"escalation\" (route to higher authority)."},"description":{"nullable":true,"description":"Optional prose describing what happens at this event. May be null for structural markers.","type":"string","minLength":1},"rationale":{"nullable":true,"description":"Optional reason for the event's existence. May be null for structural markers.","type":"string","minLength":1},"sources":{"type":"array","items":{"type":"object","properties":{"attribution":{"type":"string","minLength":1,"description":"Human-readable source label identifying who or what the evidence comes from. Examples: \"Anna (sales interview)\", \"Onboarding SOP §3.2\", \"Slack #ops 2024-06-12\""},"excerpt":{"type":"string","minLength":1,"description":"Verbatim supporting text quoted from the capture, document, or transcript. Example: \"We always wait for finance to sign off before sending the invoice.\""}},"required":["attribution","excerpt"],"additionalProperties":false},"description":"Evidence supporting this event. Empty array allowed (structural markers carry no evidence); non-empty values must follow the source schema."},"condition":{"nullable":true,"description":"Always null on events; included for shape compatibility across variants.","type":"string"},"extraCaptureNeeded":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the `clarity_proposal_extra_capture_request` row this slot points at. Created server-side by the agent after the LLM call; the LLM never produces this value."},"gap":{"type":"string","minLength":1,"description":"Plain-language description of what about this step is unknown or under-specified, blocking automation. One short sentence. Example: \"We don't know which fields the AP analyst copies from the invoice into NetSuite.\""},"proposal":{"description":"What the new capture should include in order to resolve the gap — concrete actions, screens, or decisions the user should walk through. Optional: omit when no specific proposal can be inferred. Example: \"Walk through reviewing one invoice in NetSuite end-to-end while narrating each field you check.\"","nullable":true,"type":"string","minLength":1}},"required":["id","gap"],"additionalProperties":false},"readiness":{"description":"Automation-readiness rating for this step. \"high\" = fully automatable today, \"medium\" = partially automatable or needs minor changes, \"low\" = blocked by manual review, judgement, or missing data.","nullable":true,"type":"string","enum":["low","medium","high"]},"readinessRationale":{"description":"One-sentence justification for the readiness rating, citing the specific signals that drove the choice. Example: \"Requires human judgement on edge cases that are not documented in the captures.\"","nullable":true,"type":"string"}},"required":["id","targetSteps","title","action","role","system","input","output","exception","handling","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the step. Referenced by targetSteps[].stepId and by postprocessing agents annotating specific steps. Example: \"step-review-invoice\""},"targetSteps":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"description":"Id of the step this edge points to. Must match an existing step.id in the same steps array. Example: \"step-review-invoice\""},"label":{"nullable":true,"description":"Human-readable label shown on the BPMN edge. For gateways, the outcome answer; for default flows, \"Otherwise\". Examples: \"Approved\", \"> $5k\", \"Otherwise\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of an exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways must have ≥2 entries with exactly one isDefault: true."},"title":{"type":"string","minLength":1,"description":"Required node label used in lists and BPMN node labels. Structural markers use defaults such as \"Start\" and \"End\"."},"action":{"nullable":true,"description":"Verb-led one-liner summarizing the concrete action performed. Example: \"Reviews invoice line items in NetSuite against the purchase order.\"","type":"string","minLength":1},"role":{"nullable":true,"description":"Performer of this step — the specific job title, team, or system. Use \"Duvo\" for automated actions and \"System\" for system-triggered steps. Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"system":{"nullable":true,"description":"System, tool, or application used to perform this step. Null when the step is purely manual or is a decision/event with no associated tool. Examples: \"NetSuite\", \"Gmail\", \"Excel\", null","type":"string"},"input":{"nullable":true,"description":"Information or artifacts required to start this step. Null on start events or steps with no preconditions. Example: \"Invoice PDF and matching purchase order number\"","type":"string"},"output":{"nullable":true,"description":"What this step produces or updates. Null on pure waits or events that emit nothing. Example: \"Approved invoice record in NetSuite with reviewer signature\"","type":"string"},"exception":{"nullable":true,"description":"Known exceptions, errors, or failure modes observed in the captures for this step. Null when none were mentioned. Example: \"Customer disputes line items or PO number does not match\"","type":"string"},"handling":{"nullable":true,"description":"How exceptions or escalations are handled — escalation path, fallback action, or retry strategy. Null when no exception or no handling described. Example: \"Escalate to AP manager via email and pause processing until resolved\"","type":"string"},"assumptions":{"nullable":true,"description":"Assumptions the LLM made when extracting this step that were not directly stated in captures. Null if none. Used by verification agents to flag risky inferences. Example: [\"Invoices are reviewed within 24 hours of receipt\"]","type":"array","items":{"type":"string"}},"openQuestions":{"nullable":true,"description":"Specific gaps in understanding that a follow-up capture should address. Null if none. Drives the next interview or document request. Example: [\"Is there a backup approver when the AP manager is out of office?\"]","type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["low","medium","high"],"description":"Confidence in the accuracy of this step given evidence quality and completeness. \"high\" = directly stated by multiple sources, \"medium\" = stated by one source or inferred from strong signals, \"low\" = inferred with significant assumptions."},"nodeType":{"type":"string","enum":["task"]},"nodeSubtype":{"type":"string","enum":["user","service","send","receive","manual","businessRule","script"],"description":"BPMN task subtype. \"user\" (human work), \"service\" (automated/API call), \"send\"/\"receive\" (messaging), \"manual\" (offline physical work), \"businessRule\" (rule engine), \"script\" (code execution)."},"description":{"type":"string","minLength":1,"description":"Full prose paragraph describing what happens in this step in natural language. Used for documentation reconstruction. Example: \"Finance reviews the invoice in NetSuite, checking line item accuracy and matching against the purchase order before flagging for approval.\""},"rationale":{"type":"string","minLength":1,"description":"Why this step exists in the process — its purpose or business reason. Used by downstream agents to assess whether the step is essential or removable. Example: \"Catches mispriced line items before they reach the customer and prevents downstream credit notes.\""},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"attribution":{"type":"string","minLength":1,"description":"Human-readable source label identifying who or what the evidence comes from. Examples: \"Anna (sales interview)\", \"Onboarding SOP §3.2\", \"Slack #ops 2024-06-12\""},"excerpt":{"type":"string","minLength":1,"description":"Verbatim supporting text quoted from the capture, document, or transcript. Example: \"We always wait for finance to sign off before sending the invoice.\""}},"required":["attribution","excerpt"],"additionalProperties":false},"description":"Evidence supporting this step's existence and details. At least one source is required — every step must trace back to something in the captures."},"condition":{"nullable":true,"description":"Optional precondition that gates this task. Null when the task is unconditional. Example: \"Only when invoice total exceeds $10,000\"","type":"string"},"extraCaptureNeeded":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the `clarity_proposal_extra_capture_request` row this slot points at. Created server-side by the agent after the LLM call; the LLM never produces this value."},"gap":{"type":"string","minLength":1,"description":"Plain-language description of what about this step is unknown or under-specified, blocking automation. One short sentence. Example: \"We don't know which fields the AP analyst copies from the invoice into NetSuite.\""},"proposal":{"description":"What the new capture should include in order to resolve the gap — concrete actions, screens, or decisions the user should walk through. Optional: omit when no specific proposal can be inferred. Example: \"Walk through reviewing one invoice in NetSuite end-to-end while narrating each field you check.\"","nullable":true,"type":"string","minLength":1}},"required":["id","gap"],"additionalProperties":false},"readiness":{"description":"Automation-readiness rating for this step. \"high\" = fully automatable today, \"medium\" = partially automatable or needs minor changes, \"low\" = blocked by manual review, judgement, or missing data.","nullable":true,"type":"string","enum":["low","medium","high"]},"readinessRationale":{"description":"One-sentence justification for the readiness rating, citing the specific signals that drove the choice. Example: \"Requires human judgement on edge cases that are not documented in the captures.\"","nullable":true,"type":"string"}},"required":["id","targetSteps","title","action","role","system","input","output","exception","handling","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the step. Referenced by targetSteps[].stepId and by postprocessing agents annotating specific steps. Example: \"step-review-invoice\""},"targetSteps":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"description":"Id of the step this edge points to. Must match an existing step.id in the same steps array. Example: \"step-review-invoice\""},"label":{"nullable":true,"description":"Human-readable label shown on the BPMN edge. For gateways, the outcome answer; for default flows, \"Otherwise\". Examples: \"Approved\", \"> $5k\", \"Otherwise\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of an exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways must have ≥2 entries with exactly one isDefault: true."},"title":{"type":"string","minLength":1,"description":"Required node label used in lists and BPMN node labels. Structural markers use defaults such as \"Start\" and \"End\"."},"action":{"nullable":true,"description":"Verb-led one-liner summarizing the concrete action performed. Example: \"Reviews invoice line items in NetSuite against the purchase order.\"","type":"string","minLength":1},"role":{"nullable":true,"description":"Performer of this step — the specific job title, team, or system. Use \"Duvo\" for automated actions and \"System\" for system-triggered steps. Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"system":{"nullable":true,"description":"System, tool, or application used to perform this step. Null when the step is purely manual or is a decision/event with no associated tool. Examples: \"NetSuite\", \"Gmail\", \"Excel\", null","type":"string"},"input":{"nullable":true,"description":"Information or artifacts required to start this step. Null on start events or steps with no preconditions. Example: \"Invoice PDF and matching purchase order number\"","type":"string"},"output":{"nullable":true,"description":"What this step produces or updates. Null on pure waits or events that emit nothing. Example: \"Approved invoice record in NetSuite with reviewer signature\"","type":"string"},"exception":{"nullable":true,"description":"Known exceptions, errors, or failure modes observed in the captures for this step. Null when none were mentioned. Example: \"Customer disputes line items or PO number does not match\"","type":"string"},"handling":{"nullable":true,"description":"How exceptions or escalations are handled — escalation path, fallback action, or retry strategy. Null when no exception or no handling described. Example: \"Escalate to AP manager via email and pause processing until resolved\"","type":"string"},"assumptions":{"nullable":true,"description":"Assumptions the LLM made when extracting this step that were not directly stated in captures. Null if none. Used by verification agents to flag risky inferences. Example: [\"Invoices are reviewed within 24 hours of receipt\"]","type":"array","items":{"type":"string"}},"openQuestions":{"nullable":true,"description":"Specific gaps in understanding that a follow-up capture should address. Null if none. Drives the next interview or document request. Example: [\"Is there a backup approver when the AP manager is out of office?\"]","type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["low","medium","high"],"description":"Confidence in the accuracy of this step given evidence quality and completeness. \"high\" = directly stated by multiple sources, \"medium\" = stated by one source or inferred from strong signals, \"low\" = inferred with significant assumptions."},"nodeType":{"type":"string","enum":["gateway"]},"nodeSubtype":{"type":"string","enum":["exclusive","parallel","inclusive"],"description":"BPMN gateway subtype. \"exclusive\" (XOR — exactly one branch taken), \"parallel\" (AND — all branches taken), \"inclusive\" (OR — one or more branches taken)."},"description":{"type":"string","minLength":1,"description":"Full prose describing the decision logic at this gateway."},"rationale":{"type":"string","minLength":1,"description":"Why this branching decision exists in the process."},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"attribution":{"type":"string","minLength":1,"description":"Human-readable source label identifying who or what the evidence comes from. Examples: \"Anna (sales interview)\", \"Onboarding SOP §3.2\", \"Slack #ops 2024-06-12\""},"excerpt":{"type":"string","minLength":1,"description":"Verbatim supporting text quoted from the capture, document, or transcript. Example: \"We always wait for finance to sign off before sending the invoice.\""}},"required":["attribution","excerpt"],"additionalProperties":false},"description":"Evidence supporting the decision criteria."},"condition":{"description":"Decision criteria evaluated at this gateway. BPMN requires this on every branching gateway. Existing rows persisted with null/empty values parse as \"unknown\" via a read-side preprocess; producers should write a real condition string going forward.","type":"string","minLength":1},"extraCaptureNeeded":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the `clarity_proposal_extra_capture_request` row this slot points at. Created server-side by the agent after the LLM call; the LLM never produces this value."},"gap":{"type":"string","minLength":1,"description":"Plain-language description of what about this step is unknown or under-specified, blocking automation. One short sentence. Example: \"We don't know which fields the AP analyst copies from the invoice into NetSuite.\""},"proposal":{"description":"What the new capture should include in order to resolve the gap — concrete actions, screens, or decisions the user should walk through. Optional: omit when no specific proposal can be inferred. Example: \"Walk through reviewing one invoice in NetSuite end-to-end while narrating each field you check.\"","nullable":true,"type":"string","minLength":1}},"required":["id","gap"],"additionalProperties":false},"readiness":{"description":"Automation-readiness rating for this step. \"high\" = fully automatable today, \"medium\" = partially automatable or needs minor changes, \"low\" = blocked by manual review, judgement, or missing data.","nullable":true,"type":"string","enum":["low","medium","high"]},"readinessRationale":{"description":"One-sentence justification for the readiness rating, citing the specific signals that drove the choice. Example: \"Requires human judgement on edge cases that are not documented in the captures.\"","nullable":true,"type":"string"}},"required":["id","targetSteps","title","action","role","system","input","output","exception","handling","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false}]},"description":"Ordered steps describing how the process works today, extracted from captures. Array position is the canonical order; BPMN topology is encoded by each step's targetSteps[] edges."},"swot":{"description":"SWOT analysis produced by the swot-analysis postprocessing agent. `undefined` = agent has not yet run; `null` = agent ran and produced no analysis.","nullable":true,"type":"object","properties":{"strengths":{"type":"array","items":{"type":"string","minLength":1},"description":"Internal advantages of the current process — capabilities, resources, or design choices that work in its favour today. Phrase each as a short, evidence-backed statement. Example: \"Bartenders know regulars by name, which keeps service personal during peak hours.\""},"weaknesses":{"type":"array","items":{"type":"string","minLength":1},"description":"Internal limitations of the current process — gaps, inefficiencies, or fragile assumptions visible in how it runs today. Phrase each as a short, evidence-backed statement. Example: \"Manual pour times balloon during rushes because there is only one tap.\""},"opportunities":{"type":"array","items":{"type":"string","minLength":1},"description":"External openings the current process could exploit — adjacent automations, scale effects, or unmet needs surfaced by the captures. Example: \"POS data could feed dynamic pricing for slow hours.\""},"threats":{"type":"array","items":{"type":"string","minLength":1},"description":"External risks that could degrade the current process — regulatory, operational, technological, or human factors visible in the captures. Example: \"New ID-check legislation will require staff to interrupt every order.\""}},"required":["strengths","weaknesses","opportunities","threats"],"additionalProperties":false},"summary":{"description":"One short paragraph (3-5 sentences) describing the captured process at a glance. Surfaced at the top of the current-process tab so reviewers can orient themselves before scanning the steps. Example: \"Customers order beer at the bar; the bartender greets them, picks an option matching their preference, pours and garnishes the glass, then rings the order through the POS before serving.\"","nullable":true,"type":"string","minLength":1}},"required":["version","steps"],"additionalProperties":false,"description":"Opaque BPMN payload describing the captured process. Field names inside `data` are camelCase by design."},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"},"status":{"type":"string","enum":["live","historic","draft","generating"],"description":"Versioning state. Only one 'live' row per process at a time; drafts may be edited or generating before promotion."},"creator_type":{"type":"string","enum":["human","ai"],"description":"Whether this row was created by a user edit ('human') or an AI pipeline run ('ai')."},"user_id":{"nullable":true,"description":"Creator user id (the human who edited or triggered the run).","type":"string","format":"uuid"},"sandbox_id":{"nullable":true,"description":"E2B sandbox id that produced AI rows; null for user edits.","type":"string"},"last_session_id":{"nullable":true,"description":"Claude SDK session id for artifact-chat follow-up reuse.","type":"string"}},"required":["id","parent_current_process_id","data","created_at","updated_at","status","creator_type","user_id","sandbox_id","last_session_id"],"additionalProperties":false}},"required":["snapshot"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Current Process Snapshot","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/transformation-proposal/{transformation_proposal_id}":{"delete":{"operationId":"revertClarityTransformationProposal","tags":["ClarityV2"],"description":"Archive a transformation proposal for a clarity v2 process. v2 only — returns 403 for v1 processes.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"transformation_proposal_id","required":true,"description":"The transformation proposal id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Revert Clarity Transformation Proposal","deprecated":true},"get":{"operationId":"getClarityTransformationProposalSnapshot","tags":["ClarityV2"],"description":"Fetch the full payload of a single transformation-proposal snapshot, including the BPMN `data` JSONB. Lazy-loaded by the picker when the user selects a specific version. v2 only.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"transformation_proposal_id","required":true,"description":"The transformation-proposal snapshot id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"snapshot":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Proposal id"},"clarity_current_process_id":{"type":"string","format":"uuid","description":"The current-process snapshot this proposal was generated against. Use it to detect proposal/current-version anchor mismatches."},"parent_transformation_proposal_id":{"nullable":true,"description":"Parent transformation-proposal snapshot this draft forked from","type":"string","format":"uuid"},"data":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Schema version for the transformation proposal data payload. Increment on breaking changes to the data shape so consumers can branch on the version field."},"steps":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the step. Referenced by targetSteps[].stepId and by postprocessing agents annotating specific steps. Example: \"step-review-invoice\""},"targetSteps":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"description":"Id of the step this edge points to. Must match an existing step.id in the same steps array. Example: \"step-review-invoice\""},"label":{"nullable":true,"description":"Human-readable label shown on the BPMN edge. For gateways, the outcome answer; for default flows, \"Otherwise\". Examples: \"Approved\", \"> $5k\", \"Otherwise\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of an exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways must have ≥2 entries with exactly one isDefault: true."},"title":{"type":"string","minLength":1,"description":"Required node label used in lists and BPMN node labels. Structural markers use defaults such as \"Start\" and \"End\"."},"action":{"nullable":true,"description":"Verb-led one-liner summarizing the concrete action performed. Example: \"Reviews invoice line items in NetSuite against the purchase order.\"","type":"string","minLength":1},"role":{"nullable":true,"description":"Performer of this step — the specific job title, team, or system. Use \"Duvo\" for automated actions and \"System\" for system-triggered steps. Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"system":{"nullable":true,"description":"System, tool, or application used to perform this step. Null when the step is purely manual or is a decision/event with no associated tool. Examples: \"NetSuite\", \"Gmail\", \"Excel\", null","type":"string"},"input":{"nullable":true,"description":"Information or artifacts required to start this step. Null on start events or steps with no preconditions. Example: \"Invoice PDF and matching purchase order number\"","type":"string"},"output":{"nullable":true,"description":"What this step produces or updates. Null on pure waits or events that emit nothing. Example: \"Approved invoice record in NetSuite with reviewer signature\"","type":"string"},"exception":{"nullable":true,"description":"Known exceptions, errors, or failure modes observed in the captures for this step. Null when none were mentioned. Example: \"Customer disputes line items or PO number does not match\"","type":"string"},"handling":{"nullable":true,"description":"How exceptions or escalations are handled — escalation path, fallback action, or retry strategy. Null when no exception or no handling described. Example: \"Escalate to AP manager via email and pause processing until resolved\"","type":"string"},"assumptions":{"nullable":true,"description":"Assumptions the LLM made when extracting this step that were not directly stated in captures. Null if none. Used by verification agents to flag risky inferences. Example: [\"Invoices are reviewed within 24 hours of receipt\"]","type":"array","items":{"type":"string"}},"openQuestions":{"nullable":true,"description":"Specific gaps in understanding that a follow-up capture should address. Null if none. Drives the next interview or document request. Example: [\"Is there a backup approver when the AP manager is out of office?\"]","type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["low","medium","high"],"description":"Confidence in the accuracy of this step given evidence quality and completeness. \"high\" = directly stated by multiple sources, \"medium\" = stated by one source or inferred from strong signals, \"low\" = inferred with significant assumptions."},"nodeType":{"type":"string","enum":["event"]},"nodeSubtype":{"type":"string","enum":["start","end","timer","message","escalation"],"description":"BPMN event subtype. \"start\" (entry trigger), \"end\" (terminal state), \"timer\" (time-based wait), \"message\" (external communication), \"escalation\" (route to higher authority)."},"description":{"nullable":true,"description":"Optional prose describing what happens at this event. May be null for structural markers.","type":"string","minLength":1},"rationale":{"nullable":true,"description":"Optional reason for the event's existence. May be null for structural markers.","type":"string","minLength":1},"sources":{"type":"array","items":{"type":"object","properties":{"attribution":{"type":"string","minLength":1,"description":"Human-readable source label identifying who or what the evidence comes from. Examples: \"Anna (sales interview)\", \"Onboarding SOP §3.2\", \"Slack #ops 2024-06-12\""},"excerpt":{"type":"string","minLength":1,"description":"Verbatim supporting text quoted from the capture, document, or transcript. Example: \"We always wait for finance to sign off before sending the invoice.\""}},"required":["attribution","excerpt"],"additionalProperties":false},"description":"Evidence supporting this event. Empty array allowed (structural markers carry no evidence); non-empty values must follow the source schema."},"condition":{"nullable":true,"description":"Always null on events; included for shape compatibility across variants.","type":"string"},"extraCaptureNeeded":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the `clarity_proposal_extra_capture_request` row this slot points at. Created server-side by the agent after the LLM call; the LLM never produces this value."},"gap":{"type":"string","minLength":1,"description":"Plain-language description of what about this step is unknown or under-specified, blocking automation. One short sentence. Example: \"We don't know which fields the AP analyst copies from the invoice into NetSuite.\""},"proposal":{"description":"What the new capture should include in order to resolve the gap — concrete actions, screens, or decisions the user should walk through. Optional: omit when no specific proposal can be inferred. Example: \"Walk through reviewing one invoice in NetSuite end-to-end while narrating each field you check.\"","nullable":true,"type":"string","minLength":1}},"required":["id","gap"],"additionalProperties":false},"readiness":{"description":"Automation-readiness rating for this step. \"high\" = fully automatable today, \"medium\" = partially automatable or needs minor changes, \"low\" = blocked by manual review, judgement, or missing data.","nullable":true,"type":"string","enum":["low","medium","high"]},"readinessRationale":{"description":"One-sentence justification for the readiness rating, citing the specific signals that drove the choice. Example: \"Requires human judgement on edge cases that are not documented in the captures.\"","nullable":true,"type":"string"}},"required":["id","targetSteps","title","action","role","system","input","output","exception","handling","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the step. Referenced by targetSteps[].stepId and by postprocessing agents annotating specific steps. Example: \"step-review-invoice\""},"targetSteps":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"description":"Id of the step this edge points to. Must match an existing step.id in the same steps array. Example: \"step-review-invoice\""},"label":{"nullable":true,"description":"Human-readable label shown on the BPMN edge. For gateways, the outcome answer; for default flows, \"Otherwise\". Examples: \"Approved\", \"> $5k\", \"Otherwise\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of an exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways must have ≥2 entries with exactly one isDefault: true."},"title":{"type":"string","minLength":1,"description":"Required node label used in lists and BPMN node labels. Structural markers use defaults such as \"Start\" and \"End\"."},"action":{"nullable":true,"description":"Verb-led one-liner summarizing the concrete action performed. Example: \"Reviews invoice line items in NetSuite against the purchase order.\"","type":"string","minLength":1},"role":{"nullable":true,"description":"Performer of this step — the specific job title, team, or system. Use \"Duvo\" for automated actions and \"System\" for system-triggered steps. Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"system":{"nullable":true,"description":"System, tool, or application used to perform this step. Null when the step is purely manual or is a decision/event with no associated tool. Examples: \"NetSuite\", \"Gmail\", \"Excel\", null","type":"string"},"input":{"nullable":true,"description":"Information or artifacts required to start this step. Null on start events or steps with no preconditions. Example: \"Invoice PDF and matching purchase order number\"","type":"string"},"output":{"nullable":true,"description":"What this step produces or updates. Null on pure waits or events that emit nothing. Example: \"Approved invoice record in NetSuite with reviewer signature\"","type":"string"},"exception":{"nullable":true,"description":"Known exceptions, errors, or failure modes observed in the captures for this step. Null when none were mentioned. Example: \"Customer disputes line items or PO number does not match\"","type":"string"},"handling":{"nullable":true,"description":"How exceptions or escalations are handled — escalation path, fallback action, or retry strategy. Null when no exception or no handling described. Example: \"Escalate to AP manager via email and pause processing until resolved\"","type":"string"},"assumptions":{"nullable":true,"description":"Assumptions the LLM made when extracting this step that were not directly stated in captures. Null if none. Used by verification agents to flag risky inferences. Example: [\"Invoices are reviewed within 24 hours of receipt\"]","type":"array","items":{"type":"string"}},"openQuestions":{"nullable":true,"description":"Specific gaps in understanding that a follow-up capture should address. Null if none. Drives the next interview or document request. Example: [\"Is there a backup approver when the AP manager is out of office?\"]","type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["low","medium","high"],"description":"Confidence in the accuracy of this step given evidence quality and completeness. \"high\" = directly stated by multiple sources, \"medium\" = stated by one source or inferred from strong signals, \"low\" = inferred with significant assumptions."},"nodeType":{"type":"string","enum":["task"]},"nodeSubtype":{"type":"string","enum":["user","service","send","receive","manual","businessRule","script"],"description":"BPMN task subtype. \"user\" (human work), \"service\" (automated/API call), \"send\"/\"receive\" (messaging), \"manual\" (offline physical work), \"businessRule\" (rule engine), \"script\" (code execution)."},"description":{"type":"string","minLength":1,"description":"Full prose paragraph describing what happens in this step in natural language. Used for documentation reconstruction. Example: \"Finance reviews the invoice in NetSuite, checking line item accuracy and matching against the purchase order before flagging for approval.\""},"rationale":{"type":"string","minLength":1,"description":"Why this step exists in the process — its purpose or business reason. Used by downstream agents to assess whether the step is essential or removable. Example: \"Catches mispriced line items before they reach the customer and prevents downstream credit notes.\""},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"attribution":{"type":"string","minLength":1,"description":"Human-readable source label identifying who or what the evidence comes from. Examples: \"Anna (sales interview)\", \"Onboarding SOP §3.2\", \"Slack #ops 2024-06-12\""},"excerpt":{"type":"string","minLength":1,"description":"Verbatim supporting text quoted from the capture, document, or transcript. Example: \"We always wait for finance to sign off before sending the invoice.\""}},"required":["attribution","excerpt"],"additionalProperties":false},"description":"Evidence supporting this step's existence and details. At least one source is required — every step must trace back to something in the captures."},"condition":{"nullable":true,"description":"Optional precondition that gates this task. Null when the task is unconditional. Example: \"Only when invoice total exceeds $10,000\"","type":"string"},"extraCaptureNeeded":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the `clarity_proposal_extra_capture_request` row this slot points at. Created server-side by the agent after the LLM call; the LLM never produces this value."},"gap":{"type":"string","minLength":1,"description":"Plain-language description of what about this step is unknown or under-specified, blocking automation. One short sentence. Example: \"We don't know which fields the AP analyst copies from the invoice into NetSuite.\""},"proposal":{"description":"What the new capture should include in order to resolve the gap — concrete actions, screens, or decisions the user should walk through. Optional: omit when no specific proposal can be inferred. Example: \"Walk through reviewing one invoice in NetSuite end-to-end while narrating each field you check.\"","nullable":true,"type":"string","minLength":1}},"required":["id","gap"],"additionalProperties":false},"readiness":{"description":"Automation-readiness rating for this step. \"high\" = fully automatable today, \"medium\" = partially automatable or needs minor changes, \"low\" = blocked by manual review, judgement, or missing data.","nullable":true,"type":"string","enum":["low","medium","high"]},"readinessRationale":{"description":"One-sentence justification for the readiness rating, citing the specific signals that drove the choice. Example: \"Requires human judgement on edge cases that are not documented in the captures.\"","nullable":true,"type":"string"}},"required":["id","targetSteps","title","action","role","system","input","output","exception","handling","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the step. Referenced by targetSteps[].stepId and by postprocessing agents annotating specific steps. Example: \"step-review-invoice\""},"targetSteps":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"description":"Id of the step this edge points to. Must match an existing step.id in the same steps array. Example: \"step-review-invoice\""},"label":{"nullable":true,"description":"Human-readable label shown on the BPMN edge. For gateways, the outcome answer; for default flows, \"Otherwise\". Examples: \"Approved\", \"> $5k\", \"Otherwise\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of an exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways must have ≥2 entries with exactly one isDefault: true."},"title":{"type":"string","minLength":1,"description":"Required node label used in lists and BPMN node labels. Structural markers use defaults such as \"Start\" and \"End\"."},"action":{"nullable":true,"description":"Verb-led one-liner summarizing the concrete action performed. Example: \"Reviews invoice line items in NetSuite against the purchase order.\"","type":"string","minLength":1},"role":{"nullable":true,"description":"Performer of this step — the specific job title, team, or system. Use \"Duvo\" for automated actions and \"System\" for system-triggered steps. Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"system":{"nullable":true,"description":"System, tool, or application used to perform this step. Null when the step is purely manual or is a decision/event with no associated tool. Examples: \"NetSuite\", \"Gmail\", \"Excel\", null","type":"string"},"input":{"nullable":true,"description":"Information or artifacts required to start this step. Null on start events or steps with no preconditions. Example: \"Invoice PDF and matching purchase order number\"","type":"string"},"output":{"nullable":true,"description":"What this step produces or updates. Null on pure waits or events that emit nothing. Example: \"Approved invoice record in NetSuite with reviewer signature\"","type":"string"},"exception":{"nullable":true,"description":"Known exceptions, errors, or failure modes observed in the captures for this step. Null when none were mentioned. Example: \"Customer disputes line items or PO number does not match\"","type":"string"},"handling":{"nullable":true,"description":"How exceptions or escalations are handled — escalation path, fallback action, or retry strategy. Null when no exception or no handling described. Example: \"Escalate to AP manager via email and pause processing until resolved\"","type":"string"},"assumptions":{"nullable":true,"description":"Assumptions the LLM made when extracting this step that were not directly stated in captures. Null if none. Used by verification agents to flag risky inferences. Example: [\"Invoices are reviewed within 24 hours of receipt\"]","type":"array","items":{"type":"string"}},"openQuestions":{"nullable":true,"description":"Specific gaps in understanding that a follow-up capture should address. Null if none. Drives the next interview or document request. Example: [\"Is there a backup approver when the AP manager is out of office?\"]","type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["low","medium","high"],"description":"Confidence in the accuracy of this step given evidence quality and completeness. \"high\" = directly stated by multiple sources, \"medium\" = stated by one source or inferred from strong signals, \"low\" = inferred with significant assumptions."},"nodeType":{"type":"string","enum":["gateway"]},"nodeSubtype":{"type":"string","enum":["exclusive","parallel","inclusive"],"description":"BPMN gateway subtype. \"exclusive\" (XOR — exactly one branch taken), \"parallel\" (AND — all branches taken), \"inclusive\" (OR — one or more branches taken)."},"description":{"type":"string","minLength":1,"description":"Full prose describing the decision logic at this gateway."},"rationale":{"type":"string","minLength":1,"description":"Why this branching decision exists in the process."},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"attribution":{"type":"string","minLength":1,"description":"Human-readable source label identifying who or what the evidence comes from. Examples: \"Anna (sales interview)\", \"Onboarding SOP §3.2\", \"Slack #ops 2024-06-12\""},"excerpt":{"type":"string","minLength":1,"description":"Verbatim supporting text quoted from the capture, document, or transcript. Example: \"We always wait for finance to sign off before sending the invoice.\""}},"required":["attribution","excerpt"],"additionalProperties":false},"description":"Evidence supporting the decision criteria."},"condition":{"description":"Decision criteria evaluated at this gateway. BPMN requires this on every branching gateway. Existing rows persisted with null/empty values parse as \"unknown\" via a read-side preprocess; producers should write a real condition string going forward.","type":"string","minLength":1},"extraCaptureNeeded":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the `clarity_proposal_extra_capture_request` row this slot points at. Created server-side by the agent after the LLM call; the LLM never produces this value."},"gap":{"type":"string","minLength":1,"description":"Plain-language description of what about this step is unknown or under-specified, blocking automation. One short sentence. Example: \"We don't know which fields the AP analyst copies from the invoice into NetSuite.\""},"proposal":{"description":"What the new capture should include in order to resolve the gap — concrete actions, screens, or decisions the user should walk through. Optional: omit when no specific proposal can be inferred. Example: \"Walk through reviewing one invoice in NetSuite end-to-end while narrating each field you check.\"","nullable":true,"type":"string","minLength":1}},"required":["id","gap"],"additionalProperties":false},"readiness":{"description":"Automation-readiness rating for this step. \"high\" = fully automatable today, \"medium\" = partially automatable or needs minor changes, \"low\" = blocked by manual review, judgement, or missing data.","nullable":true,"type":"string","enum":["low","medium","high"]},"readinessRationale":{"description":"One-sentence justification for the readiness rating, citing the specific signals that drove the choice. Example: \"Requires human judgement on edge cases that are not documented in the captures.\"","nullable":true,"type":"string"}},"required":["id","targetSteps","title","action","role","system","input","output","exception","handling","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false}]},"description":"Ordered steps describing the proposed redesigned process. Same shape as the current process steps; BPMN topology is encoded by each step's targetSteps[] edges."},"summary":{"description":"One short paragraph (3-5 sentences) describing the proposed transformed process at a glance. Surfaced at the top of the transformation-proposal tab so reviewers can orient themselves before scanning the steps. Example: \"Customers self-order on a tablet at the bar; a smart tap auto-pours the chosen beer into a labelled glass, which the customer collects from the pickup counter once payment clears.\"","nullable":true,"type":"string","minLength":1},"projectedImpact":{"description":"Answer-first, MECE-structured business case. 4-8 sentences of prose + one markdown assumptions table. Null when team context is insufficient to produce any quantitative or qualitative assessment.","nullable":true,"type":"string","minLength":1}},"required":["version","steps"],"additionalProperties":false,"description":"Opaque BPMN payload for the proposed transformed process. Field names inside `data` are camelCase by design."},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"},"status":{"type":"string","enum":["live","historic","draft","generating"],"description":"Versioning state. Only one 'live' row per process at a time; drafts may be edited or generating before promotion."},"creator_type":{"type":"string","enum":["human","ai"],"description":"Whether this row was created by a user edit ('human') or an AI pipeline run ('ai')."},"user_id":{"nullable":true,"description":"Creator user id (the human who edited or triggered the run).","type":"string","format":"uuid"},"sandbox_id":{"nullable":true,"description":"E2B sandbox id that produced AI rows; null for user edits.","type":"string"},"last_session_id":{"nullable":true,"description":"Claude SDK session id for artifact-chat follow-up reuse.","type":"string"}},"required":["id","clarity_current_process_id","parent_transformation_proposal_id","data","created_at","updated_at","status","creator_type","user_id","sandbox_id","last_session_id"],"additionalProperties":false}},"required":["snapshot"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Transformation Proposal Snapshot","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/automation":{"post":{"operationId":"buildClarityAutomation","tags":["ClarityV2"],"description":"Hand the latest transformation proposal for a v2 clarity process off to the workflow-builder pipeline. Returns 202 with the new run id; the LLM run completes asynchronously.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"}],"security":[{"bearerAuth":[]}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"automation_run":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Workflow-builder run id"},"status":{"type":"string","enum":["generating"],"description":"Always `generating` immediately after kickoff"}},"required":["id","status"],"additionalProperties":false}},"required":["automation_run"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Build Clarity Automation","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/transformation-proposals/{transformation_proposal_id}/extra-capture-requests":{"get":{"operationId":"listClarityExtraCaptureRequests","tags":["ClarityV2"],"description":"List active extra-capture requests for a given transformation proposal of a Clarity v2 process. The caller is expected to know the proposal id from the V2 read model and skip the call when no proposal exists yet.","parameters":[{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Number of results per page (1-100, default 20)"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of results to skip (default 0)"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"transformation_proposal_id","required":true,"description":"The transformation proposal id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Extra-capture-request id"},"proposal_id":{"type":"string","format":"uuid","description":"The transformation proposal this request belongs to"},"step_id":{"type":"string","description":"Step id within the proposal's BPMN graph"},"capture_id":{"nullable":true,"description":"Capture that fulfilled this request, once one is created","type":"string","format":"uuid"},"requested_user_id":{"nullable":true,"description":"Assigned team member, if any","type":"string","format":"uuid"},"status":{"type":"string","enum":["requested","captured","resolved"],"description":"Lifecycle status of the request"},"gap":{"type":"string","description":"Plain-language gap blocking automation"},"suggested_prompt":{"nullable":true,"description":"LLM-produced suggested capture prompt","type":"string"},"priority":{"type":"string","enum":["low","medium","high"],"description":"Priority of fulfilling this request"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"}},"required":["id","proposal_id","step_id","capture_id","requested_user_id","status","gap","suggested_prompt","priority","created_at","updated_at"],"additionalProperties":false}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total matching rows across all pages"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Page size that was applied"},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Offset that was applied"}},"required":["requests","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Extra Capture Requests","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/transformation-proposals/{transformation_proposal_id}/extra-capture-requests/{request_id}/assign":{"patch":{"operationId":"assignClarityExtraCaptureRequest","tags":["ClarityV2"],"description":"Assign (or unassign, with `user_id: null`) a team member to fulfil an extra-capture request. Restricted to admins and managers.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"nullable":true,"description":"Team member to assign, or null to unassign","type":"string","format":"uuid"}},"required":["user_id"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"transformation_proposal_id","required":true,"description":"The transformation proposal id"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"request_id","required":true,"description":"The extra-capture-request id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Extra-capture-request id"},"proposal_id":{"type":"string","format":"uuid","description":"The transformation proposal this request belongs to"},"step_id":{"type":"string","description":"Step id within the proposal's BPMN graph"},"capture_id":{"nullable":true,"description":"Capture that fulfilled this request, once one is created","type":"string","format":"uuid"},"requested_user_id":{"nullable":true,"description":"Assigned team member, if any","type":"string","format":"uuid"},"status":{"type":"string","enum":["requested","captured","resolved"],"description":"Lifecycle status of the request"},"gap":{"type":"string","description":"Plain-language gap blocking automation"},"suggested_prompt":{"nullable":true,"description":"LLM-produced suggested capture prompt","type":"string"},"priority":{"type":"string","enum":["low","medium","high"],"description":"Priority of fulfilling this request"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"}},"required":["id","proposal_id","step_id","capture_id","requested_user_id","status","gap","suggested_prompt","priority","created_at","updated_at"],"additionalProperties":false,"description":"The updated extra-capture request, including the new assignee"}},"required":["request"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Assign Clarity Extra Capture Request","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/invite-link":{"post":{"operationId":"createClarityInviteLink","tags":["ClarityV2"],"description":"Create or regenerate a process-scoped Clarity interview invite link. Only the process creator or team managers can create invite links; creating a new link invalidates any prior active link for the process.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"invite_link":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Invite-link id"},"url":{"type":"string","format":"uri","description":"Process-scoped invite URL"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 creation timestamp"},"created_by":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"User id that created the invite link"},"email":{"nullable":true,"description":"Creator email, when available","type":"string","format":"email"}},"required":["id","email"],"additionalProperties":false}},"required":["id","url","created_at","created_by"],"additionalProperties":false}},"required":["invite_link"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Clarity Invite Link","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/artifact-imports/create-upload-url":{"post":{"operationId":"createClarityArtifactImportUploadUrl","tags":["ClarityV2"],"description":"Create a signed upload URL for importing a Miro export into a Clarity v2 process. Supports SVG, XML, PNG, and JPEG exports. The caller must upload the file to the returned URL, then complete the import.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_name":{"type":"string","minLength":1,"pattern":"^.*\\.(?:[sS][vV][gG]|[xX][mM][lL]|[pP][nN][gG]|[jJ][pP][eE]?[gG])$","description":"Name of the Miro export file. Supported extensions: .svg, .xml, .png, .jpg, .jpeg"},"content_type":{"type":"string","enum":["image/svg+xml","application/xml","text/xml","image/png","image/jpeg"],"description":"MIME type of the Miro export file"},"extra_capture_request_id":{"description":"Optional extra-capture-request id to bind this import to","type":"string","format":"uuid"}},"required":["file_name","content_type"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"signed_url":{"type":"string","format":"uri","description":"Signed URL for uploading the artifact"},"capture_id":{"type":"string","format":"uuid","description":"Pending capture id to pass to completion"},"expires_at":{"type":"string","format":"date-time","description":"ISO 8601 upload URL expiration timestamp"}},"required":["signed_url","capture_id","expires_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Clarity Artifact Import Upload URL","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/artifact-imports/{capture_id}/complete":{"post":{"operationId":"completeClarityArtifactImport","tags":["ClarityV2"],"description":"Complete a Miro artifact import after uploading to the signed URL. The uploaded bytes are validated before the import becomes a usable Clarity capture.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_name":{"type":"string","minLength":1,"pattern":"^.*\\.(?:[sS][vV][gG]|[xX][mM][lL]|[pP][nN][gG]|[jJ][pP][eE]?[gG])$","description":"Name of the Miro export file. Supported extensions: .svg, .xml, .png, .jpg, .jpeg"},"content_type":{"type":"string","enum":["image/svg+xml","application/xml","text/xml","image/png","image/jpeg"],"description":"MIME type of the uploaded Miro export file"}},"required":["file_name","content_type"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"capture_id","required":true,"description":"The pending capture id returned by the upload-url endpoint"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"capture":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"processId":{"type":"string","format":"uuid"},"userId":{"type":"string","format":"uuid"},"userName":{"type":"string"},"type":{"type":"string","enum":["video","interview","document","screenshare"]},"videoUrl":{"nullable":true,"type":"string"},"videoTranscript":{"nullable":true,"type":"string"},"transcript":{"nullable":true,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["ai","user","interviewer"]},"message":{"type":"string","minLength":1},"timestamp":{"type":"number"}},"required":["source","message"],"additionalProperties":false}},"status":{"type":"string","enum":["pending","recording","processing","complete","failed"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","processId","userId","type","videoUrl","videoTranscript","transcript","status","createdAt","updatedAt"],"additionalProperties":false}},"required":["capture"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Complete Clarity Artifact Import","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/artifact-chat/conversations":{"get":{"operationId":"listClarityArtifactChatConversations","tags":["ClarityV2"],"description":"List the current user's recent non-deleted artifact-chat conversations for a Clarity v2 process and snapshot kind.","parameters":[{"schema":{"type":"string","enum":["current_process","transformation_proposal"]},"in":"query","name":"snapshot_kind","required":true,"description":"Artifact kind to list conversations for"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The Clarity process id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"process_id":{"type":"string","format":"uuid"},"snapshot_kind":{"type":"string","enum":["current_process","transformation_proposal"]},"title":{"nullable":true,"type":"string"},"sandbox_id":{"nullable":true,"type":"string"},"session_id":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["open","running","waiting_for_patch","waiting_for_hitl"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"nullable":true,"type":"string"}},"required":["id","user_id","process_id","snapshot_kind","title","sandbox_id","session_id","status","created_at","updated_at","deleted_at"],"additionalProperties":false}}},"required":["conversations"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Artifact Chat Conversations","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/artifact-chat/conversations/{conversation_id}/messages":{"get":{"operationId":"getClarityArtifactChatMessages","tags":["ClarityV2"],"description":"Load the latest artifact-chat messages for one active conversation, returned oldest-first.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The Clarity process id"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"conversation_id","required":true,"description":"The artifact-chat conversation id"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"process_id":{"type":"string","format":"uuid"},"snapshot_kind":{"type":"string","enum":["current_process","transformation_proposal"]},"title":{"nullable":true,"type":"string"},"sandbox_id":{"nullable":true,"type":"string"},"session_id":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["open","running","waiting_for_patch","waiting_for_hitl"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"nullable":true,"type":"string"}},"required":["id","user_id","process_id","snapshot_kind","title","sandbox_id","session_id","status","created_at","updated_at","deleted_at"],"additionalProperties":false},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"conversation_id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["user","assistant","system"]},"kind":{"type":"string","enum":["text","patch","hitl_question","hitl_answer","error","info"]},"body":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["patch"]},"status":{"type":"string","enum":["pending","accepted","declined","failed"]},"summary":{"type":"string"},"patch":{"readOnly":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"op":{"type":"string","enum":["add","replace","test"]},"path":{"type":"string"},"value":{"$ref":"#/components/schemas/ArtifactChatJsonValue"}},"required":["op","path","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","enum":["remove"]},"path":{"type":"string"}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","enum":["move","copy"]},"from":{"type":"string"},"path":{"type":"string"}},"required":["op","from","path"],"additionalProperties":false}]}},"snapshot_id":{"nullable":true,"type":"string","format":"uuid"}},"required":["kind","status","summary","patch","snapshot_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["hitl_question"]},"questions":{"readOnly":true,"minItems":1,"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"header":{"default":"","type":"string"},"options":{"default":[],"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"default":"","type":"string"}},"required":["label","description"],"additionalProperties":false}},"multiSelect":{"default":false,"type":"boolean"}},"required":["question","header","options","multiSelect"],"additionalProperties":false}}},"required":["kind","questions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["hitl_answer"]},"answers":{"readOnly":true,"type":"object","additionalProperties":{"type":"string"}}},"required":["kind","answers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["error"]},"text":{"type":"string"}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["info"]},"text":{"type":"string"}},"required":["kind","text"],"additionalProperties":false}]},"baseline_snapshot_id":{"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","conversation_id","role","kind","body","baseline_snapshot_id","created_at","updated_at"],"additionalProperties":false}}},"required":["conversation","messages"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Clarity Artifact Chat Messages","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/artifact-chat/messages":{"post":{"tags":["ClarityV2"],"description":"Submit a persisted artifact-chat user message and start a text turn.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"nullable":true,"type":"string","format":"uuid"},"snapshot_kind":{"type":"string","enum":["current_process","transformation_proposal"]},"baseline_snapshot_id":{"type":"string","format":"uuid"},"content":{"type":"string"},"answers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["conversation_id","snapshot_kind","baseline_snapshot_id"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"process_id":{"type":"string","format":"uuid"},"snapshot_kind":{"type":"string","enum":["current_process","transformation_proposal"]},"title":{"nullable":true,"type":"string"},"sandbox_id":{"nullable":true,"type":"string"},"session_id":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["open","running","waiting_for_patch","waiting_for_hitl"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"nullable":true,"type":"string"}},"required":["id","user_id","process_id","snapshot_kind","title","sandbox_id","session_id","status","created_at","updated_at","deleted_at"],"additionalProperties":false},"message":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"conversation_id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["user","assistant","system"]},"kind":{"type":"string","enum":["text","patch","hitl_question","hitl_answer","error","info"]},"body":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["patch"]},"status":{"type":"string","enum":["pending","accepted","declined","failed"]},"summary":{"type":"string"},"patch":{"readOnly":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"op":{"type":"string","enum":["add","replace","test"]},"path":{"type":"string"},"value":{"$ref":"#/components/schemas/ArtifactChatJsonValue"}},"required":["op","path","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","enum":["remove"]},"path":{"type":"string"}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","enum":["move","copy"]},"from":{"type":"string"},"path":{"type":"string"}},"required":["op","from","path"],"additionalProperties":false}]}},"snapshot_id":{"nullable":true,"type":"string","format":"uuid"}},"required":["kind","status","summary","patch","snapshot_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["hitl_question"]},"questions":{"readOnly":true,"minItems":1,"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"header":{"default":"","type":"string"},"options":{"default":[],"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"default":"","type":"string"}},"required":["label","description"],"additionalProperties":false}},"multiSelect":{"default":false,"type":"boolean"}},"required":["question","header","options","multiSelect"],"additionalProperties":false}}},"required":["kind","questions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["hitl_answer"]},"answers":{"readOnly":true,"type":"object","additionalProperties":{"type":"string"}}},"required":["kind","answers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["error"]},"text":{"type":"string"}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["info"]},"text":{"type":"string"}},"required":["kind","text"],"additionalProperties":false}]},"baseline_snapshot_id":{"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","conversation_id","role","kind","body","baseline_snapshot_id","created_at","updated_at"],"additionalProperties":false}},"required":["conversation","message"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true}},"/v1/clarity-v2/processes/{process_id}/artifact-chat/messages/{message_id}":{"put":{"tags":["ClarityV2"],"description":"Accept or decline a persisted artifact-chat patch proposal.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["accept","decline"]}},"required":["decision"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"message_id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"process_id":{"type":"string","format":"uuid"},"snapshot_kind":{"type":"string","enum":["current_process","transformation_proposal"]},"title":{"nullable":true,"type":"string"},"sandbox_id":{"nullable":true,"type":"string"},"session_id":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["open","running","waiting_for_patch","waiting_for_hitl"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"nullable":true,"type":"string"}},"required":["id","user_id","process_id","snapshot_kind","title","sandbox_id","session_id","status","created_at","updated_at","deleted_at"],"additionalProperties":false},"message":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"conversation_id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["user","assistant","system"]},"kind":{"type":"string","enum":["text","patch","hitl_question","hitl_answer","error","info"]},"body":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["patch"]},"status":{"type":"string","enum":["pending","accepted","declined","failed"]},"summary":{"type":"string"},"patch":{"readOnly":true,"type":"array","items":{"anyOf":[{"type":"object","properties":{"op":{"type":"string","enum":["add","replace","test"]},"path":{"type":"string"},"value":{"$ref":"#/components/schemas/ArtifactChatJsonValue"}},"required":["op","path","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","enum":["remove"]},"path":{"type":"string"}},"required":["op","path"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","enum":["move","copy"]},"from":{"type":"string"},"path":{"type":"string"}},"required":["op","from","path"],"additionalProperties":false}]}},"snapshot_id":{"nullable":true,"type":"string","format":"uuid"}},"required":["kind","status","summary","patch","snapshot_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["hitl_question"]},"questions":{"readOnly":true,"minItems":1,"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"header":{"default":"","type":"string"},"options":{"default":[],"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"default":"","type":"string"}},"required":["label","description"],"additionalProperties":false}},"multiSelect":{"default":false,"type":"boolean"}},"required":["question","header","options","multiSelect"],"additionalProperties":false}}},"required":["kind","questions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["hitl_answer"]},"answers":{"readOnly":true,"type":"object","additionalProperties":{"type":"string"}}},"required":["kind","answers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["error"]},"text":{"type":"string"}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["info"]},"text":{"type":"string"}},"required":["kind","text"],"additionalProperties":false}]},"baseline_snapshot_id":{"type":"string","format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","conversation_id","role","kind","body","baseline_snapshot_id","created_at","updated_at"],"additionalProperties":false}},"required":["conversation","message"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true}},"/v1/clarity-v2/processes/{process_id}/current-process/{current_process_id}/promote":{"post":{"operationId":"promoteClarityCurrentProcess","tags":["ClarityV2"],"description":"Promote a draft or historic current-process snapshot to live. Demotes the previously live row to historic in the same transaction. No-op if the target is already live. v2 only.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"current_process_id","required":true,"description":"The current-process snapshot id to promote"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"snapshot":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Snapshot id"},"parent_current_process_id":{"nullable":true,"description":"Parent current-process snapshot this draft forked from","type":"string","format":"uuid"},"data":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Schema version for the current process data payload. Increment on breaking changes to the data shape so consumers can branch on the version field."},"steps":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the step. Referenced by targetSteps[].stepId and by postprocessing agents annotating specific steps. Example: \"step-review-invoice\""},"targetSteps":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"description":"Id of the step this edge points to. Must match an existing step.id in the same steps array. Example: \"step-review-invoice\""},"label":{"nullable":true,"description":"Human-readable label shown on the BPMN edge. For gateways, the outcome answer; for default flows, \"Otherwise\". Examples: \"Approved\", \"> $5k\", \"Otherwise\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of an exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways must have ≥2 entries with exactly one isDefault: true."},"title":{"type":"string","minLength":1,"description":"Required node label used in lists and BPMN node labels. Structural markers use defaults such as \"Start\" and \"End\"."},"action":{"nullable":true,"description":"Verb-led one-liner summarizing the concrete action performed. Example: \"Reviews invoice line items in NetSuite against the purchase order.\"","type":"string","minLength":1},"role":{"nullable":true,"description":"Performer of this step — the specific job title, team, or system. Use \"Duvo\" for automated actions and \"System\" for system-triggered steps. Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"system":{"nullable":true,"description":"System, tool, or application used to perform this step. Null when the step is purely manual or is a decision/event with no associated tool. Examples: \"NetSuite\", \"Gmail\", \"Excel\", null","type":"string"},"input":{"nullable":true,"description":"Information or artifacts required to start this step. Null on start events or steps with no preconditions. Example: \"Invoice PDF and matching purchase order number\"","type":"string"},"output":{"nullable":true,"description":"What this step produces or updates. Null on pure waits or events that emit nothing. Example: \"Approved invoice record in NetSuite with reviewer signature\"","type":"string"},"exception":{"nullable":true,"description":"Known exceptions, errors, or failure modes observed in the captures for this step. Null when none were mentioned. Example: \"Customer disputes line items or PO number does not match\"","type":"string"},"handling":{"nullable":true,"description":"How exceptions or escalations are handled — escalation path, fallback action, or retry strategy. Null when no exception or no handling described. Example: \"Escalate to AP manager via email and pause processing until resolved\"","type":"string"},"assumptions":{"nullable":true,"description":"Assumptions the LLM made when extracting this step that were not directly stated in captures. Null if none. Used by verification agents to flag risky inferences. Example: [\"Invoices are reviewed within 24 hours of receipt\"]","type":"array","items":{"type":"string"}},"openQuestions":{"nullable":true,"description":"Specific gaps in understanding that a follow-up capture should address. Null if none. Drives the next interview or document request. Example: [\"Is there a backup approver when the AP manager is out of office?\"]","type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["low","medium","high"],"description":"Confidence in the accuracy of this step given evidence quality and completeness. \"high\" = directly stated by multiple sources, \"medium\" = stated by one source or inferred from strong signals, \"low\" = inferred with significant assumptions."},"nodeType":{"type":"string","enum":["event"]},"nodeSubtype":{"type":"string","enum":["start","end","timer","message","escalation"],"description":"BPMN event subtype. \"start\" (entry trigger), \"end\" (terminal state), \"timer\" (time-based wait), \"message\" (external communication), \"escalation\" (route to higher authority)."},"description":{"nullable":true,"description":"Optional prose describing what happens at this event. May be null for structural markers.","type":"string","minLength":1},"rationale":{"nullable":true,"description":"Optional reason for the event's existence. May be null for structural markers.","type":"string","minLength":1},"sources":{"type":"array","items":{"type":"object","properties":{"attribution":{"type":"string","minLength":1,"description":"Human-readable source label identifying who or what the evidence comes from. Examples: \"Anna (sales interview)\", \"Onboarding SOP §3.2\", \"Slack #ops 2024-06-12\""},"excerpt":{"type":"string","minLength":1,"description":"Verbatim supporting text quoted from the capture, document, or transcript. Example: \"We always wait for finance to sign off before sending the invoice.\""}},"required":["attribution","excerpt"],"additionalProperties":false},"description":"Evidence supporting this event. Empty array allowed (structural markers carry no evidence); non-empty values must follow the source schema."},"condition":{"nullable":true,"description":"Always null on events; included for shape compatibility across variants.","type":"string"},"extraCaptureNeeded":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the `clarity_proposal_extra_capture_request` row this slot points at. Created server-side by the agent after the LLM call; the LLM never produces this value."},"gap":{"type":"string","minLength":1,"description":"Plain-language description of what about this step is unknown or under-specified, blocking automation. One short sentence. Example: \"We don't know which fields the AP analyst copies from the invoice into NetSuite.\""},"proposal":{"description":"What the new capture should include in order to resolve the gap — concrete actions, screens, or decisions the user should walk through. Optional: omit when no specific proposal can be inferred. Example: \"Walk through reviewing one invoice in NetSuite end-to-end while narrating each field you check.\"","nullable":true,"type":"string","minLength":1}},"required":["id","gap"],"additionalProperties":false},"readiness":{"description":"Automation-readiness rating for this step. \"high\" = fully automatable today, \"medium\" = partially automatable or needs minor changes, \"low\" = blocked by manual review, judgement, or missing data.","nullable":true,"type":"string","enum":["low","medium","high"]},"readinessRationale":{"description":"One-sentence justification for the readiness rating, citing the specific signals that drove the choice. Example: \"Requires human judgement on edge cases that are not documented in the captures.\"","nullable":true,"type":"string"}},"required":["id","targetSteps","title","action","role","system","input","output","exception","handling","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the step. Referenced by targetSteps[].stepId and by postprocessing agents annotating specific steps. Example: \"step-review-invoice\""},"targetSteps":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"description":"Id of the step this edge points to. Must match an existing step.id in the same steps array. Example: \"step-review-invoice\""},"label":{"nullable":true,"description":"Human-readable label shown on the BPMN edge. For gateways, the outcome answer; for default flows, \"Otherwise\". Examples: \"Approved\", \"> $5k\", \"Otherwise\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of an exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways must have ≥2 entries with exactly one isDefault: true."},"title":{"type":"string","minLength":1,"description":"Required node label used in lists and BPMN node labels. Structural markers use defaults such as \"Start\" and \"End\"."},"action":{"nullable":true,"description":"Verb-led one-liner summarizing the concrete action performed. Example: \"Reviews invoice line items in NetSuite against the purchase order.\"","type":"string","minLength":1},"role":{"nullable":true,"description":"Performer of this step — the specific job title, team, or system. Use \"Duvo\" for automated actions and \"System\" for system-triggered steps. Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"system":{"nullable":true,"description":"System, tool, or application used to perform this step. Null when the step is purely manual or is a decision/event with no associated tool. Examples: \"NetSuite\", \"Gmail\", \"Excel\", null","type":"string"},"input":{"nullable":true,"description":"Information or artifacts required to start this step. Null on start events or steps with no preconditions. Example: \"Invoice PDF and matching purchase order number\"","type":"string"},"output":{"nullable":true,"description":"What this step produces or updates. Null on pure waits or events that emit nothing. Example: \"Approved invoice record in NetSuite with reviewer signature\"","type":"string"},"exception":{"nullable":true,"description":"Known exceptions, errors, or failure modes observed in the captures for this step. Null when none were mentioned. Example: \"Customer disputes line items or PO number does not match\"","type":"string"},"handling":{"nullable":true,"description":"How exceptions or escalations are handled — escalation path, fallback action, or retry strategy. Null when no exception or no handling described. Example: \"Escalate to AP manager via email and pause processing until resolved\"","type":"string"},"assumptions":{"nullable":true,"description":"Assumptions the LLM made when extracting this step that were not directly stated in captures. Null if none. Used by verification agents to flag risky inferences. Example: [\"Invoices are reviewed within 24 hours of receipt\"]","type":"array","items":{"type":"string"}},"openQuestions":{"nullable":true,"description":"Specific gaps in understanding that a follow-up capture should address. Null if none. Drives the next interview or document request. Example: [\"Is there a backup approver when the AP manager is out of office?\"]","type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["low","medium","high"],"description":"Confidence in the accuracy of this step given evidence quality and completeness. \"high\" = directly stated by multiple sources, \"medium\" = stated by one source or inferred from strong signals, \"low\" = inferred with significant assumptions."},"nodeType":{"type":"string","enum":["task"]},"nodeSubtype":{"type":"string","enum":["user","service","send","receive","manual","businessRule","script"],"description":"BPMN task subtype. \"user\" (human work), \"service\" (automated/API call), \"send\"/\"receive\" (messaging), \"manual\" (offline physical work), \"businessRule\" (rule engine), \"script\" (code execution)."},"description":{"type":"string","minLength":1,"description":"Full prose paragraph describing what happens in this step in natural language. Used for documentation reconstruction. Example: \"Finance reviews the invoice in NetSuite, checking line item accuracy and matching against the purchase order before flagging for approval.\""},"rationale":{"type":"string","minLength":1,"description":"Why this step exists in the process — its purpose or business reason. Used by downstream agents to assess whether the step is essential or removable. Example: \"Catches mispriced line items before they reach the customer and prevents downstream credit notes.\""},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"attribution":{"type":"string","minLength":1,"description":"Human-readable source label identifying who or what the evidence comes from. Examples: \"Anna (sales interview)\", \"Onboarding SOP §3.2\", \"Slack #ops 2024-06-12\""},"excerpt":{"type":"string","minLength":1,"description":"Verbatim supporting text quoted from the capture, document, or transcript. Example: \"We always wait for finance to sign off before sending the invoice.\""}},"required":["attribution","excerpt"],"additionalProperties":false},"description":"Evidence supporting this step's existence and details. At least one source is required — every step must trace back to something in the captures."},"condition":{"nullable":true,"description":"Optional precondition that gates this task. Null when the task is unconditional. Example: \"Only when invoice total exceeds $10,000\"","type":"string"},"extraCaptureNeeded":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the `clarity_proposal_extra_capture_request` row this slot points at. Created server-side by the agent after the LLM call; the LLM never produces this value."},"gap":{"type":"string","minLength":1,"description":"Plain-language description of what about this step is unknown or under-specified, blocking automation. One short sentence. Example: \"We don't know which fields the AP analyst copies from the invoice into NetSuite.\""},"proposal":{"description":"What the new capture should include in order to resolve the gap — concrete actions, screens, or decisions the user should walk through. Optional: omit when no specific proposal can be inferred. Example: \"Walk through reviewing one invoice in NetSuite end-to-end while narrating each field you check.\"","nullable":true,"type":"string","minLength":1}},"required":["id","gap"],"additionalProperties":false},"readiness":{"description":"Automation-readiness rating for this step. \"high\" = fully automatable today, \"medium\" = partially automatable or needs minor changes, \"low\" = blocked by manual review, judgement, or missing data.","nullable":true,"type":"string","enum":["low","medium","high"]},"readinessRationale":{"description":"One-sentence justification for the readiness rating, citing the specific signals that drove the choice. Example: \"Requires human judgement on edge cases that are not documented in the captures.\"","nullable":true,"type":"string"}},"required":["id","targetSteps","title","action","role","system","input","output","exception","handling","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the step. Referenced by targetSteps[].stepId and by postprocessing agents annotating specific steps. Example: \"step-review-invoice\""},"targetSteps":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"description":"Id of the step this edge points to. Must match an existing step.id in the same steps array. Example: \"step-review-invoice\""},"label":{"nullable":true,"description":"Human-readable label shown on the BPMN edge. For gateways, the outcome answer; for default flows, \"Otherwise\". Examples: \"Approved\", \"> $5k\", \"Otherwise\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of an exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways must have ≥2 entries with exactly one isDefault: true."},"title":{"type":"string","minLength":1,"description":"Required node label used in lists and BPMN node labels. Structural markers use defaults such as \"Start\" and \"End\"."},"action":{"nullable":true,"description":"Verb-led one-liner summarizing the concrete action performed. Example: \"Reviews invoice line items in NetSuite against the purchase order.\"","type":"string","minLength":1},"role":{"nullable":true,"description":"Performer of this step — the specific job title, team, or system. Use \"Duvo\" for automated actions and \"System\" for system-triggered steps. Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"system":{"nullable":true,"description":"System, tool, or application used to perform this step. Null when the step is purely manual or is a decision/event with no associated tool. Examples: \"NetSuite\", \"Gmail\", \"Excel\", null","type":"string"},"input":{"nullable":true,"description":"Information or artifacts required to start this step. Null on start events or steps with no preconditions. Example: \"Invoice PDF and matching purchase order number\"","type":"string"},"output":{"nullable":true,"description":"What this step produces or updates. Null on pure waits or events that emit nothing. Example: \"Approved invoice record in NetSuite with reviewer signature\"","type":"string"},"exception":{"nullable":true,"description":"Known exceptions, errors, or failure modes observed in the captures for this step. Null when none were mentioned. Example: \"Customer disputes line items or PO number does not match\"","type":"string"},"handling":{"nullable":true,"description":"How exceptions or escalations are handled — escalation path, fallback action, or retry strategy. Null when no exception or no handling described. Example: \"Escalate to AP manager via email and pause processing until resolved\"","type":"string"},"assumptions":{"nullable":true,"description":"Assumptions the LLM made when extracting this step that were not directly stated in captures. Null if none. Used by verification agents to flag risky inferences. Example: [\"Invoices are reviewed within 24 hours of receipt\"]","type":"array","items":{"type":"string"}},"openQuestions":{"nullable":true,"description":"Specific gaps in understanding that a follow-up capture should address. Null if none. Drives the next interview or document request. Example: [\"Is there a backup approver when the AP manager is out of office?\"]","type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["low","medium","high"],"description":"Confidence in the accuracy of this step given evidence quality and completeness. \"high\" = directly stated by multiple sources, \"medium\" = stated by one source or inferred from strong signals, \"low\" = inferred with significant assumptions."},"nodeType":{"type":"string","enum":["gateway"]},"nodeSubtype":{"type":"string","enum":["exclusive","parallel","inclusive"],"description":"BPMN gateway subtype. \"exclusive\" (XOR — exactly one branch taken), \"parallel\" (AND — all branches taken), \"inclusive\" (OR — one or more branches taken)."},"description":{"type":"string","minLength":1,"description":"Full prose describing the decision logic at this gateway."},"rationale":{"type":"string","minLength":1,"description":"Why this branching decision exists in the process."},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"attribution":{"type":"string","minLength":1,"description":"Human-readable source label identifying who or what the evidence comes from. Examples: \"Anna (sales interview)\", \"Onboarding SOP §3.2\", \"Slack #ops 2024-06-12\""},"excerpt":{"type":"string","minLength":1,"description":"Verbatim supporting text quoted from the capture, document, or transcript. Example: \"We always wait for finance to sign off before sending the invoice.\""}},"required":["attribution","excerpt"],"additionalProperties":false},"description":"Evidence supporting the decision criteria."},"condition":{"description":"Decision criteria evaluated at this gateway. BPMN requires this on every branching gateway. Existing rows persisted with null/empty values parse as \"unknown\" via a read-side preprocess; producers should write a real condition string going forward.","type":"string","minLength":1},"extraCaptureNeeded":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the `clarity_proposal_extra_capture_request` row this slot points at. Created server-side by the agent after the LLM call; the LLM never produces this value."},"gap":{"type":"string","minLength":1,"description":"Plain-language description of what about this step is unknown or under-specified, blocking automation. One short sentence. Example: \"We don't know which fields the AP analyst copies from the invoice into NetSuite.\""},"proposal":{"description":"What the new capture should include in order to resolve the gap — concrete actions, screens, or decisions the user should walk through. Optional: omit when no specific proposal can be inferred. Example: \"Walk through reviewing one invoice in NetSuite end-to-end while narrating each field you check.\"","nullable":true,"type":"string","minLength":1}},"required":["id","gap"],"additionalProperties":false},"readiness":{"description":"Automation-readiness rating for this step. \"high\" = fully automatable today, \"medium\" = partially automatable or needs minor changes, \"low\" = blocked by manual review, judgement, or missing data.","nullable":true,"type":"string","enum":["low","medium","high"]},"readinessRationale":{"description":"One-sentence justification for the readiness rating, citing the specific signals that drove the choice. Example: \"Requires human judgement on edge cases that are not documented in the captures.\"","nullable":true,"type":"string"}},"required":["id","targetSteps","title","action","role","system","input","output","exception","handling","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false}]},"description":"Ordered steps describing how the process works today, extracted from captures. Array position is the canonical order; BPMN topology is encoded by each step's targetSteps[] edges."},"swot":{"description":"SWOT analysis produced by the swot-analysis postprocessing agent. `undefined` = agent has not yet run; `null` = agent ran and produced no analysis.","nullable":true,"type":"object","properties":{"strengths":{"type":"array","items":{"type":"string","minLength":1},"description":"Internal advantages of the current process — capabilities, resources, or design choices that work in its favour today. Phrase each as a short, evidence-backed statement. Example: \"Bartenders know regulars by name, which keeps service personal during peak hours.\""},"weaknesses":{"type":"array","items":{"type":"string","minLength":1},"description":"Internal limitations of the current process — gaps, inefficiencies, or fragile assumptions visible in how it runs today. Phrase each as a short, evidence-backed statement. Example: \"Manual pour times balloon during rushes because there is only one tap.\""},"opportunities":{"type":"array","items":{"type":"string","minLength":1},"description":"External openings the current process could exploit — adjacent automations, scale effects, or unmet needs surfaced by the captures. Example: \"POS data could feed dynamic pricing for slow hours.\""},"threats":{"type":"array","items":{"type":"string","minLength":1},"description":"External risks that could degrade the current process — regulatory, operational, technological, or human factors visible in the captures. Example: \"New ID-check legislation will require staff to interrupt every order.\""}},"required":["strengths","weaknesses","opportunities","threats"],"additionalProperties":false},"summary":{"description":"One short paragraph (3-5 sentences) describing the captured process at a glance. Surfaced at the top of the current-process tab so reviewers can orient themselves before scanning the steps. Example: \"Customers order beer at the bar; the bartender greets them, picks an option matching their preference, pours and garnishes the glass, then rings the order through the POS before serving.\"","nullable":true,"type":"string","minLength":1}},"required":["version","steps"],"additionalProperties":false,"description":"Opaque BPMN payload describing the captured process. Field names inside `data` are camelCase by design."},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"},"status":{"type":"string","enum":["live","historic","draft","generating"],"description":"Versioning state. Only one 'live' row per process at a time; drafts may be edited or generating before promotion."},"creator_type":{"type":"string","enum":["human","ai"],"description":"Whether this row was created by a user edit ('human') or an AI pipeline run ('ai')."},"user_id":{"nullable":true,"description":"Creator user id (the human who edited or triggered the run).","type":"string","format":"uuid"},"sandbox_id":{"nullable":true,"description":"E2B sandbox id that produced AI rows; null for user edits.","type":"string"},"last_session_id":{"nullable":true,"description":"Claude SDK session id for artifact-chat follow-up reuse.","type":"string"}},"required":["id","parent_current_process_id","data","created_at","updated_at","status","creator_type","user_id","sandbox_id","last_session_id"],"additionalProperties":false}},"required":["snapshot"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Promote Clarity Current Process","deprecated":true}},"/v1/clarity-v2/processes/{process_id}/transformation-proposal/{transformation_proposal_id}/promote":{"post":{"operationId":"promoteClarityTransformationProposal","tags":["ClarityV2"],"description":"Promote a draft or historic transformation-proposal snapshot to live. Demotes the previously live row to historic in the same transaction. No-op if the target is already live. Live uniqueness is scoped to process_id (not the current-process anchor). v2 only.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"process_id","required":true,"description":"The clarity process id"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"transformation_proposal_id","required":true,"description":"The transformation-proposal snapshot id to promote"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"snapshot":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Proposal id"},"clarity_current_process_id":{"type":"string","format":"uuid","description":"The current-process snapshot this proposal was generated against. Use it to detect proposal/current-version anchor mismatches."},"parent_transformation_proposal_id":{"nullable":true,"description":"Parent transformation-proposal snapshot this draft forked from","type":"string","format":"uuid"},"data":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Schema version for the transformation proposal data payload. Increment on breaking changes to the data shape so consumers can branch on the version field."},"steps":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the step. Referenced by targetSteps[].stepId and by postprocessing agents annotating specific steps. Example: \"step-review-invoice\""},"targetSteps":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"description":"Id of the step this edge points to. Must match an existing step.id in the same steps array. Example: \"step-review-invoice\""},"label":{"nullable":true,"description":"Human-readable label shown on the BPMN edge. For gateways, the outcome answer; for default flows, \"Otherwise\". Examples: \"Approved\", \"> $5k\", \"Otherwise\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of an exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways must have ≥2 entries with exactly one isDefault: true."},"title":{"type":"string","minLength":1,"description":"Required node label used in lists and BPMN node labels. Structural markers use defaults such as \"Start\" and \"End\"."},"action":{"nullable":true,"description":"Verb-led one-liner summarizing the concrete action performed. Example: \"Reviews invoice line items in NetSuite against the purchase order.\"","type":"string","minLength":1},"role":{"nullable":true,"description":"Performer of this step — the specific job title, team, or system. Use \"Duvo\" for automated actions and \"System\" for system-triggered steps. Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"system":{"nullable":true,"description":"System, tool, or application used to perform this step. Null when the step is purely manual or is a decision/event with no associated tool. Examples: \"NetSuite\", \"Gmail\", \"Excel\", null","type":"string"},"input":{"nullable":true,"description":"Information or artifacts required to start this step. Null on start events or steps with no preconditions. Example: \"Invoice PDF and matching purchase order number\"","type":"string"},"output":{"nullable":true,"description":"What this step produces or updates. Null on pure waits or events that emit nothing. Example: \"Approved invoice record in NetSuite with reviewer signature\"","type":"string"},"exception":{"nullable":true,"description":"Known exceptions, errors, or failure modes observed in the captures for this step. Null when none were mentioned. Example: \"Customer disputes line items or PO number does not match\"","type":"string"},"handling":{"nullable":true,"description":"How exceptions or escalations are handled — escalation path, fallback action, or retry strategy. Null when no exception or no handling described. Example: \"Escalate to AP manager via email and pause processing until resolved\"","type":"string"},"assumptions":{"nullable":true,"description":"Assumptions the LLM made when extracting this step that were not directly stated in captures. Null if none. Used by verification agents to flag risky inferences. Example: [\"Invoices are reviewed within 24 hours of receipt\"]","type":"array","items":{"type":"string"}},"openQuestions":{"nullable":true,"description":"Specific gaps in understanding that a follow-up capture should address. Null if none. Drives the next interview or document request. Example: [\"Is there a backup approver when the AP manager is out of office?\"]","type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["low","medium","high"],"description":"Confidence in the accuracy of this step given evidence quality and completeness. \"high\" = directly stated by multiple sources, \"medium\" = stated by one source or inferred from strong signals, \"low\" = inferred with significant assumptions."},"nodeType":{"type":"string","enum":["event"]},"nodeSubtype":{"type":"string","enum":["start","end","timer","message","escalation"],"description":"BPMN event subtype. \"start\" (entry trigger), \"end\" (terminal state), \"timer\" (time-based wait), \"message\" (external communication), \"escalation\" (route to higher authority)."},"description":{"nullable":true,"description":"Optional prose describing what happens at this event. May be null for structural markers.","type":"string","minLength":1},"rationale":{"nullable":true,"description":"Optional reason for the event's existence. May be null for structural markers.","type":"string","minLength":1},"sources":{"type":"array","items":{"type":"object","properties":{"attribution":{"type":"string","minLength":1,"description":"Human-readable source label identifying who or what the evidence comes from. Examples: \"Anna (sales interview)\", \"Onboarding SOP §3.2\", \"Slack #ops 2024-06-12\""},"excerpt":{"type":"string","minLength":1,"description":"Verbatim supporting text quoted from the capture, document, or transcript. Example: \"We always wait for finance to sign off before sending the invoice.\""}},"required":["attribution","excerpt"],"additionalProperties":false},"description":"Evidence supporting this event. Empty array allowed (structural markers carry no evidence); non-empty values must follow the source schema."},"condition":{"nullable":true,"description":"Always null on events; included for shape compatibility across variants.","type":"string"},"extraCaptureNeeded":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the `clarity_proposal_extra_capture_request` row this slot points at. Created server-side by the agent after the LLM call; the LLM never produces this value."},"gap":{"type":"string","minLength":1,"description":"Plain-language description of what about this step is unknown or under-specified, blocking automation. One short sentence. Example: \"We don't know which fields the AP analyst copies from the invoice into NetSuite.\""},"proposal":{"description":"What the new capture should include in order to resolve the gap — concrete actions, screens, or decisions the user should walk through. Optional: omit when no specific proposal can be inferred. Example: \"Walk through reviewing one invoice in NetSuite end-to-end while narrating each field you check.\"","nullable":true,"type":"string","minLength":1}},"required":["id","gap"],"additionalProperties":false},"readiness":{"description":"Automation-readiness rating for this step. \"high\" = fully automatable today, \"medium\" = partially automatable or needs minor changes, \"low\" = blocked by manual review, judgement, or missing data.","nullable":true,"type":"string","enum":["low","medium","high"]},"readinessRationale":{"description":"One-sentence justification for the readiness rating, citing the specific signals that drove the choice. Example: \"Requires human judgement on edge cases that are not documented in the captures.\"","nullable":true,"type":"string"}},"required":["id","targetSteps","title","action","role","system","input","output","exception","handling","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the step. Referenced by targetSteps[].stepId and by postprocessing agents annotating specific steps. Example: \"step-review-invoice\""},"targetSteps":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"description":"Id of the step this edge points to. Must match an existing step.id in the same steps array. Example: \"step-review-invoice\""},"label":{"nullable":true,"description":"Human-readable label shown on the BPMN edge. For gateways, the outcome answer; for default flows, \"Otherwise\". Examples: \"Approved\", \"> $5k\", \"Otherwise\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of an exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways must have ≥2 entries with exactly one isDefault: true."},"title":{"type":"string","minLength":1,"description":"Required node label used in lists and BPMN node labels. Structural markers use defaults such as \"Start\" and \"End\"."},"action":{"nullable":true,"description":"Verb-led one-liner summarizing the concrete action performed. Example: \"Reviews invoice line items in NetSuite against the purchase order.\"","type":"string","minLength":1},"role":{"nullable":true,"description":"Performer of this step — the specific job title, team, or system. Use \"Duvo\" for automated actions and \"System\" for system-triggered steps. Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"system":{"nullable":true,"description":"System, tool, or application used to perform this step. Null when the step is purely manual or is a decision/event with no associated tool. Examples: \"NetSuite\", \"Gmail\", \"Excel\", null","type":"string"},"input":{"nullable":true,"description":"Information or artifacts required to start this step. Null on start events or steps with no preconditions. Example: \"Invoice PDF and matching purchase order number\"","type":"string"},"output":{"nullable":true,"description":"What this step produces or updates. Null on pure waits or events that emit nothing. Example: \"Approved invoice record in NetSuite with reviewer signature\"","type":"string"},"exception":{"nullable":true,"description":"Known exceptions, errors, or failure modes observed in the captures for this step. Null when none were mentioned. Example: \"Customer disputes line items or PO number does not match\"","type":"string"},"handling":{"nullable":true,"description":"How exceptions or escalations are handled — escalation path, fallback action, or retry strategy. Null when no exception or no handling described. Example: \"Escalate to AP manager via email and pause processing until resolved\"","type":"string"},"assumptions":{"nullable":true,"description":"Assumptions the LLM made when extracting this step that were not directly stated in captures. Null if none. Used by verification agents to flag risky inferences. Example: [\"Invoices are reviewed within 24 hours of receipt\"]","type":"array","items":{"type":"string"}},"openQuestions":{"nullable":true,"description":"Specific gaps in understanding that a follow-up capture should address. Null if none. Drives the next interview or document request. Example: [\"Is there a backup approver when the AP manager is out of office?\"]","type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["low","medium","high"],"description":"Confidence in the accuracy of this step given evidence quality and completeness. \"high\" = directly stated by multiple sources, \"medium\" = stated by one source or inferred from strong signals, \"low\" = inferred with significant assumptions."},"nodeType":{"type":"string","enum":["task"]},"nodeSubtype":{"type":"string","enum":["user","service","send","receive","manual","businessRule","script"],"description":"BPMN task subtype. \"user\" (human work), \"service\" (automated/API call), \"send\"/\"receive\" (messaging), \"manual\" (offline physical work), \"businessRule\" (rule engine), \"script\" (code execution)."},"description":{"type":"string","minLength":1,"description":"Full prose paragraph describing what happens in this step in natural language. Used for documentation reconstruction. Example: \"Finance reviews the invoice in NetSuite, checking line item accuracy and matching against the purchase order before flagging for approval.\""},"rationale":{"type":"string","minLength":1,"description":"Why this step exists in the process — its purpose or business reason. Used by downstream agents to assess whether the step is essential or removable. Example: \"Catches mispriced line items before they reach the customer and prevents downstream credit notes.\""},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"attribution":{"type":"string","minLength":1,"description":"Human-readable source label identifying who or what the evidence comes from. Examples: \"Anna (sales interview)\", \"Onboarding SOP §3.2\", \"Slack #ops 2024-06-12\""},"excerpt":{"type":"string","minLength":1,"description":"Verbatim supporting text quoted from the capture, document, or transcript. Example: \"We always wait for finance to sign off before sending the invoice.\""}},"required":["attribution","excerpt"],"additionalProperties":false},"description":"Evidence supporting this step's existence and details. At least one source is required — every step must trace back to something in the captures."},"condition":{"nullable":true,"description":"Optional precondition that gates this task. Null when the task is unconditional. Example: \"Only when invoice total exceeds $10,000\"","type":"string"},"extraCaptureNeeded":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the `clarity_proposal_extra_capture_request` row this slot points at. Created server-side by the agent after the LLM call; the LLM never produces this value."},"gap":{"type":"string","minLength":1,"description":"Plain-language description of what about this step is unknown or under-specified, blocking automation. One short sentence. Example: \"We don't know which fields the AP analyst copies from the invoice into NetSuite.\""},"proposal":{"description":"What the new capture should include in order to resolve the gap — concrete actions, screens, or decisions the user should walk through. Optional: omit when no specific proposal can be inferred. Example: \"Walk through reviewing one invoice in NetSuite end-to-end while narrating each field you check.\"","nullable":true,"type":"string","minLength":1}},"required":["id","gap"],"additionalProperties":false},"readiness":{"description":"Automation-readiness rating for this step. \"high\" = fully automatable today, \"medium\" = partially automatable or needs minor changes, \"low\" = blocked by manual review, judgement, or missing data.","nullable":true,"type":"string","enum":["low","medium","high"]},"readinessRationale":{"description":"One-sentence justification for the readiness rating, citing the specific signals that drove the choice. Example: \"Requires human judgement on edge cases that are not documented in the captures.\"","nullable":true,"type":"string"}},"required":["id","targetSteps","title","action","role","system","input","output","exception","handling","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable identifier for the step. Referenced by targetSteps[].stepId and by postprocessing agents annotating specific steps. Example: \"step-review-invoice\""},"targetSteps":{"type":"array","items":{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"description":"Id of the step this edge points to. Must match an existing step.id in the same steps array. Example: \"step-review-invoice\""},"label":{"nullable":true,"description":"Human-readable label shown on the BPMN edge. For gateways, the outcome answer; for default flows, \"Otherwise\". Examples: \"Approved\", \"> $5k\", \"Otherwise\"","type":"string"},"isDefault":{"type":"boolean","description":"True on exactly one outgoing edge of an exclusive or inclusive gateway, marking the fallback taken when no other condition matches. False on all other edges."}},"required":["stepId","label","isDefault"],"additionalProperties":false},"description":"Outgoing BPMN edges from this step. Empty array only on end events. Exclusive and inclusive gateways must have ≥2 entries with exactly one isDefault: true."},"title":{"type":"string","minLength":1,"description":"Required node label used in lists and BPMN node labels. Structural markers use defaults such as \"Start\" and \"End\"."},"action":{"nullable":true,"description":"Verb-led one-liner summarizing the concrete action performed. Example: \"Reviews invoice line items in NetSuite against the purchase order.\"","type":"string","minLength":1},"role":{"nullable":true,"description":"Performer of this step — the specific job title, team, or system. Use \"Duvo\" for automated actions and \"System\" for system-triggered steps. Examples: \"Finance Analyst\", \"Sales Operations\", \"Duvo\", \"System\"","type":"string","minLength":1},"system":{"nullable":true,"description":"System, tool, or application used to perform this step. Null when the step is purely manual or is a decision/event with no associated tool. Examples: \"NetSuite\", \"Gmail\", \"Excel\", null","type":"string"},"input":{"nullable":true,"description":"Information or artifacts required to start this step. Null on start events or steps with no preconditions. Example: \"Invoice PDF and matching purchase order number\"","type":"string"},"output":{"nullable":true,"description":"What this step produces or updates. Null on pure waits or events that emit nothing. Example: \"Approved invoice record in NetSuite with reviewer signature\"","type":"string"},"exception":{"nullable":true,"description":"Known exceptions, errors, or failure modes observed in the captures for this step. Null when none were mentioned. Example: \"Customer disputes line items or PO number does not match\"","type":"string"},"handling":{"nullable":true,"description":"How exceptions or escalations are handled — escalation path, fallback action, or retry strategy. Null when no exception or no handling described. Example: \"Escalate to AP manager via email and pause processing until resolved\"","type":"string"},"assumptions":{"nullable":true,"description":"Assumptions the LLM made when extracting this step that were not directly stated in captures. Null if none. Used by verification agents to flag risky inferences. Example: [\"Invoices are reviewed within 24 hours of receipt\"]","type":"array","items":{"type":"string"}},"openQuestions":{"nullable":true,"description":"Specific gaps in understanding that a follow-up capture should address. Null if none. Drives the next interview or document request. Example: [\"Is there a backup approver when the AP manager is out of office?\"]","type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["low","medium","high"],"description":"Confidence in the accuracy of this step given evidence quality and completeness. \"high\" = directly stated by multiple sources, \"medium\" = stated by one source or inferred from strong signals, \"low\" = inferred with significant assumptions."},"nodeType":{"type":"string","enum":["gateway"]},"nodeSubtype":{"type":"string","enum":["exclusive","parallel","inclusive"],"description":"BPMN gateway subtype. \"exclusive\" (XOR — exactly one branch taken), \"parallel\" (AND — all branches taken), \"inclusive\" (OR — one or more branches taken)."},"description":{"type":"string","minLength":1,"description":"Full prose describing the decision logic at this gateway."},"rationale":{"type":"string","minLength":1,"description":"Why this branching decision exists in the process."},"sources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"attribution":{"type":"string","minLength":1,"description":"Human-readable source label identifying who or what the evidence comes from. Examples: \"Anna (sales interview)\", \"Onboarding SOP §3.2\", \"Slack #ops 2024-06-12\""},"excerpt":{"type":"string","minLength":1,"description":"Verbatim supporting text quoted from the capture, document, or transcript. Example: \"We always wait for finance to sign off before sending the invoice.\""}},"required":["attribution","excerpt"],"additionalProperties":false},"description":"Evidence supporting the decision criteria."},"condition":{"description":"Decision criteria evaluated at this gateway. BPMN requires this on every branching gateway. Existing rows persisted with null/empty values parse as \"unknown\" via a read-side preprocess; producers should write a real condition string going forward.","type":"string","minLength":1},"extraCaptureNeeded":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the `clarity_proposal_extra_capture_request` row this slot points at. Created server-side by the agent after the LLM call; the LLM never produces this value."},"gap":{"type":"string","minLength":1,"description":"Plain-language description of what about this step is unknown or under-specified, blocking automation. One short sentence. Example: \"We don't know which fields the AP analyst copies from the invoice into NetSuite.\""},"proposal":{"description":"What the new capture should include in order to resolve the gap — concrete actions, screens, or decisions the user should walk through. Optional: omit when no specific proposal can be inferred. Example: \"Walk through reviewing one invoice in NetSuite end-to-end while narrating each field you check.\"","nullable":true,"type":"string","minLength":1}},"required":["id","gap"],"additionalProperties":false},"readiness":{"description":"Automation-readiness rating for this step. \"high\" = fully automatable today, \"medium\" = partially automatable or needs minor changes, \"low\" = blocked by manual review, judgement, or missing data.","nullable":true,"type":"string","enum":["low","medium","high"]},"readinessRationale":{"description":"One-sentence justification for the readiness rating, citing the specific signals that drove the choice. Example: \"Requires human judgement on edge cases that are not documented in the captures.\"","nullable":true,"type":"string"}},"required":["id","targetSteps","title","action","role","system","input","output","exception","handling","assumptions","openQuestions","confidence","nodeType","nodeSubtype","description","rationale","sources","condition"],"additionalProperties":false}]},"description":"Ordered steps describing the proposed redesigned process. Same shape as the current process steps; BPMN topology is encoded by each step's targetSteps[] edges."},"summary":{"description":"One short paragraph (3-5 sentences) describing the proposed transformed process at a glance. Surfaced at the top of the transformation-proposal tab so reviewers can orient themselves before scanning the steps. Example: \"Customers self-order on a tablet at the bar; a smart tap auto-pours the chosen beer into a labelled glass, which the customer collects from the pickup counter once payment clears.\"","nullable":true,"type":"string","minLength":1},"projectedImpact":{"description":"Answer-first, MECE-structured business case. 4-8 sentences of prose + one markdown assumptions table. Null when team context is insufficient to produce any quantitative or qualitative assessment.","nullable":true,"type":"string","minLength":1}},"required":["version","steps"],"additionalProperties":false,"description":"Opaque BPMN payload for the proposed transformed process. Field names inside `data` are camelCase by design."},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"},"status":{"type":"string","enum":["live","historic","draft","generating"],"description":"Versioning state. Only one 'live' row per process at a time; drafts may be edited or generating before promotion."},"creator_type":{"type":"string","enum":["human","ai"],"description":"Whether this row was created by a user edit ('human') or an AI pipeline run ('ai')."},"user_id":{"nullable":true,"description":"Creator user id (the human who edited or triggered the run).","type":"string","format":"uuid"},"sandbox_id":{"nullable":true,"description":"E2B sandbox id that produced AI rows; null for user edits.","type":"string"},"last_session_id":{"nullable":true,"description":"Claude SDK session id for artifact-chat follow-up reuse.","type":"string"}},"required":["id","clarity_current_process_id","parent_transformation_proposal_id","data","created_at","updated_at","status","creator_type","user_id","sandbox_id","last_session_id"],"additionalProperties":false}},"required":["snapshot"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Promote Clarity Transformation Proposal","deprecated":true}},"/v1/queues/{queue_id}":{"get":{"operationId":"getQueue","tags":["Case Queues"],"description":"Get a case queue by ID.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"queue":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"folder_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"has_approvals":{"type":"boolean"}},"required":["id","name","description","folder_id","created_at","has_approvals"],"additionalProperties":false}},"required":["queue"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Queue","deprecated":true},"patch":{"operationId":"updateQueue","tags":["Case Queues"],"description":"Update a case queue.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New queue name. Must be unique within the team.","type":"string","minLength":1,"maxLength":100},"description":{"description":"New description, or null to clear.","nullable":true,"type":"string","maxLength":500},"folder_id":{"description":"New folder id, or null to move to the root.","nullable":true,"type":"string","format":"uuid"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"queue":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"folder_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"has_approvals":{"type":"boolean"}},"required":["id","name","description","folder_id","created_at","has_approvals"],"additionalProperties":false}},"required":["queue"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Queue","deprecated":true},"delete":{"operationId":"deleteQueue","tags":["Case Queues"],"description":"Delete a case queue. Interrupts all associated running jobs first and returns the number of deleted cases plus the IDs of runs that were stopped.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"deleted_case_count":{"type":"number"},"interrupted_run_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["success","deleted_case_count","interrupted_run_ids"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Queue","deprecated":true}},"/v1/queues/{queue_id}/cases":{"delete":{"operationId":"clearQueueCases","tags":["Cases"],"description":"Delete every case in a queue. Interrupts any associated running jobs first. Destructive — not exposed via MCP.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"deletedCount":{"type":"number"},"interruptedRunIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["success","deletedCount","interruptedRunIds"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Clear Queue Cases","deprecated":true},"get":{"operationId":"listCases","tags":["Cases"],"description":"List cases in a queue. Supports status, date-range, and free-text filters via query params. For label filters, use POST /v2/teams/:team_id/queues/:queue_id/cases/search.","parameters":[{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Number of cases per page (1-100, default 20)."},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Zero-based offset for pagination."},{"schema":{"type":"string"},"in":"query","name":"status","required":false,"description":"Filter by one or more case statuses (comma-separated). Values: pending, claimed, completed, failed, needs_input, postponed."},{"schema":{"type":"string"},"in":"query","name":"search","required":false,"description":"Full-text search across case title and data."},{"schema":{"type":"string"},"in":"query","name":"created_at_from","required":false,"description":"Return only cases created on or after this ISO-8601 timestamp."},{"schema":{"type":"string"},"in":"query","name":"updated_at_from","required":false,"description":"Return only cases updated on or after this ISO-8601 timestamp."},{"schema":{"default":"created_at","type":"string","enum":["created_at","updated_at","postponed_to"]},"in":"query","name":"sort_by","required":false,"description":"Field to sort by. Default: created_at."},{"schema":{"default":"desc","type":"string","enum":["asc","desc"]},"in":"query","name":"sort_order","required":false,"description":"Sort direction. Default: desc."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"cases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"queue_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"data":{"type":"string"},"status":{"type":"string","enum":["pending","claimed","completed","failed"]},"claimed_at":{"nullable":true,"type":"string"},"claimed_by_run_id":{"nullable":true,"type":"string"},"completed_at":{"nullable":true,"type":"string"},"postponed_to":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"created_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"created_by_user_name":{"nullable":true,"type":"string"},"created_by_user_email":{"nullable":true,"type":"string"},"agent_run_status":{"nullable":true,"type":"string"},"agent_run_user_id":{"nullable":true,"type":"string","format":"uuid"},"pending_human_request_id":{"nullable":true,"type":"string","format":"uuid"},"pending_approval_batch_id":{"nullable":true,"type":"string","format":"uuid"},"pending_approval_assignee_user_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"approval_approved_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"approval_rejected_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"search_match_data_snippet":{"type":"object","properties":{"before":{"type":"string"},"match":{"type":"string"},"after":{"type":"string"}},"required":["before","match","after"],"additionalProperties":false},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","minLength":1},"color_hue":{"type":"integer","minimum":0,"maximum":360}},"required":["id","key","value","color_hue"],"additionalProperties":false}}},"required":["id","queue_id","title","data","status","claimed_at","claimed_by_run_id","completed_at","postponed_to","created_at","updated_at","created_by_user_id","created_by_user_name","created_by_user_email","agent_run_status","agent_run_user_id","pending_human_request_id","pending_approval_batch_id","pending_approval_assignee_user_ids","approval_approved_count","approval_rejected_count","labels"],"additionalProperties":false}},"total":{"type":"number"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["cases","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Cases","deprecated":true},"post":{"operationId":"createCases","tags":["Cases"],"description":"Create one or more cases in a queue. Provide either a single `case` object or a `cases` array (1-100); providing both returns 400. Each case accepts a title (max 500 chars), optional free-form `data`, and optional labels that will be assigned to the case on creation (missing labels are created on the queue).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"case":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500,"description":"Short title for the case (max 500 characters). Put long context in `data`."},"data":{"description":"Additional data for the case. Free-form text or JSON; Assignments receive this on claim.","type":"string"},"labels":{"description":"Optional labels to assign to the case at creation. Labels are created on the queue if they don't already exist.","maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"default":"","description":"Label key (omit for a simple tag).","type":"string"},"value":{"type":"string","minLength":1,"description":"Label value (required)."}},"required":["value"]}}},"required":["title"]},"cases":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500,"description":"Short title for the case (max 500 characters). Put long context in `data`."},"data":{"description":"Additional data for the case. Free-form text or JSON; Assignments receive this on claim.","type":"string"},"labels":{"description":"Optional labels to assign to the case at creation. Labels are created on the queue if they don't already exist.","maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"default":"","description":"Label key (omit for a simple tag).","type":"string"},"value":{"type":"string","minLength":1,"description":"Label value (required)."}},"required":["value"]}}},"required":["title"]}}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"added_cases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"queue_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"data":{"type":"string"},"status":{"type":"string","enum":["pending","claimed","completed","failed"]},"claimed_at":{"nullable":true,"type":"string"},"claimed_by_run_id":{"nullable":true,"type":"string"},"completed_at":{"nullable":true,"type":"string"},"postponed_to":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"created_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"created_by_user_name":{"nullable":true,"type":"string"},"created_by_user_email":{"nullable":true,"type":"string"},"agent_run_status":{"nullable":true,"type":"string"},"agent_run_user_id":{"nullable":true,"type":"string","format":"uuid"},"pending_human_request_id":{"nullable":true,"type":"string","format":"uuid"},"pending_approval_batch_id":{"nullable":true,"type":"string","format":"uuid"},"pending_approval_assignee_user_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"approval_approved_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"approval_rejected_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"search_match_data_snippet":{"type":"object","properties":{"before":{"type":"string"},"match":{"type":"string"},"after":{"type":"string"}},"required":["before","match","after"],"additionalProperties":false},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","minLength":1},"color_hue":{"type":"integer","minimum":0,"maximum":360}},"required":["id","key","value","color_hue"],"additionalProperties":false}}},"required":["id","queue_id","title","data","status","claimed_at","claimed_by_run_id","completed_at","postponed_to","created_at","updated_at","created_by_user_id","created_by_user_name","created_by_user_email","agent_run_status","agent_run_user_id","pending_human_request_id","pending_approval_batch_id","pending_approval_assignee_user_ids","approval_approved_count","approval_rejected_count","labels"],"additionalProperties":false}}},"required":["added_cases"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Cases","deprecated":true}},"/v1/cases/{case_id}":{"get":{"operationId":"getCase","tags":["Cases"],"description":"Get a case by ID. Returns the case, its event history, and every case-approval batch ever created on the case (newest first).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"case_id","required":true,"description":"The case's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"case":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"queue_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"data":{"type":"string"},"status":{"type":"string","enum":["pending","claimed","completed","failed"]},"claimed_at":{"nullable":true,"type":"string"},"claimed_by_run_id":{"nullable":true,"type":"string"},"completed_at":{"nullable":true,"type":"string"},"postponed_to":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"created_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"created_by_user_name":{"nullable":true,"type":"string"},"created_by_user_email":{"nullable":true,"type":"string"},"agent_run_status":{"nullable":true,"type":"string"},"agent_run_user_id":{"nullable":true,"type":"string","format":"uuid"},"pending_human_request_id":{"nullable":true,"type":"string","format":"uuid"},"pending_approval_batch_id":{"nullable":true,"type":"string","format":"uuid"},"pending_approval_assignee_user_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"approval_approved_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"approval_rejected_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"search_match_data_snippet":{"type":"object","properties":{"before":{"type":"string"},"match":{"type":"string"},"after":{"type":"string"}},"required":["before","match","after"],"additionalProperties":false},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","minLength":1},"color_hue":{"type":"integer","minimum":0,"maximum":360}},"required":["id","key","value","color_hue"],"additionalProperties":false}}},"required":["id","queue_id","title","data","status","claimed_at","claimed_by_run_id","completed_at","postponed_to","created_at","updated_at","created_by_user_id","created_by_user_name","created_by_user_email","agent_run_status","agent_run_user_id","pending_human_request_id","pending_approval_batch_id","pending_approval_assignee_user_ids","approval_approved_count","approval_rejected_count","labels"],"additionalProperties":false},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"case_queue_item_id":{"type":"string","format":"uuid"},"agent_run_id":{"nullable":true,"type":"string","format":"uuid"},"human_request_id":{"nullable":true,"type":"string","format":"uuid"},"type":{"type":"string"},"reason":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"agent_id":{"nullable":true,"type":"string","format":"uuid"},"agent_name":{"nullable":true,"type":"string"},"user_id":{"nullable":true,"type":"string","format":"uuid"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"},"human_request_title":{"nullable":true,"type":"string"}},"required":["id","case_queue_item_id","agent_run_id","human_request_id","type","reason","created_at","agent_id","agent_name","user_id","user_name","user_email","human_request_title"],"additionalProperties":false}},"approvalBatches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"case_queue_item_id":{"type":"string","format":"uuid"},"agent_run_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"created_at":{"type":"string"},"resolved_at":{"nullable":true,"type":"string"},"cancelled_at":{"nullable":true,"type":"string"},"cancellation_reason":{"nullable":true,"type":"string"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"assignee_user_id":{"type":"string","format":"uuid"},"assignee_name":{"nullable":true,"type":"string"},"assignee_email":{"nullable":true,"type":"string"},"prompt":{"type":"string"},"decision":{"nullable":true,"type":"string","enum":["approved","rejected"]},"responded_at":{"nullable":true,"type":"string"},"responded_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"responded_by_name":{"nullable":true,"type":"string"},"responded_by_email":{"nullable":true,"type":"string"},"cancelled_at":{"nullable":true,"type":"string"},"cancellation_reason":{"nullable":true,"type":"string"}},"required":["id","assignee_user_id","assignee_name","assignee_email","prompt","decision","responded_at","responded_by_user_id","responded_by_name","responded_by_email","cancelled_at","cancellation_reason"],"additionalProperties":false}}},"required":["id","case_queue_item_id","agent_run_id","title","created_at","resolved_at","cancelled_at","cancellation_reason","rows"],"additionalProperties":false}}},"required":["case","events","approvalBatches"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Case","deprecated":true},"delete":{"operationId":"deleteCase","tags":["Cases"],"description":"Delete a case. Interrupts any associated running jobs first.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"case_id","required":true,"description":"The case's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"interruptedRunIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["success","interruptedRunIds"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Case","deprecated":true}},"/v1/cases/{case_id}/runs":{"get":{"operationId":"listCaseRuns","tags":["Cases"],"description":"List Jobs (agent runs) that have claimed or received handover of a case, newest first. Capped at 50 ownership events.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"case_id","required":true,"description":"The case's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"case_queue_item_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"agent_name":{"type":"string"},"status":{"type":"string","enum":["not_started","pending","starting","running","waiting","completed","failed","interrupted"]},"source":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"started_at":{"nullable":true,"type":"string"},"completed_at":{"nullable":true,"type":"string"},"claimed_at":{"type":"string"},"has_pending_human_request":{"type":"boolean"},"pending_human_request_title":{"nullable":true,"type":"string"},"evaluation":{"type":"object","properties":{"passed":{"type":"number"},"total":{"type":"number"},"final_comment":{"type":"string"},"status":{"type":"string","enum":["ready","unavailable","in_progress"]},"severityCounts":{"type":"object","properties":{"critical":{"type":"integer","minimum":0,"maximum":9007199254740991},"medium":{"type":"integer","minimum":0,"maximum":9007199254740991},"low":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["critical","medium","low"],"additionalProperties":false}},"required":["passed","total","status"],"additionalProperties":false},"user_id":{"nullable":true,"type":"string","format":"uuid"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"}},"required":["id","case_queue_item_id","agent_id","agent_name","status","source","created_at","started_at","completed_at","claimed_at","has_pending_human_request","pending_human_request_title","evaluation","user_id","user_name","user_email"],"additionalProperties":false}}},"required":["runs"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Case Runs","deprecated":true}},"/v1/cases/{case_id}/runs/{run_id}/recent-messages":{"get":{"operationId":"listCaseRunRecentMessages","tags":["Cases"],"description":"Return the latest qualifying messages (assistant text + tool calls) for a Job on a case, newest last. Used to populate the live body of a running Job card in the case Activity timeline.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":10},"in":"query","name":"limit","required":false,"description":"Maximum number of qualifying messages to return. Defaults to 3, must be between 1 and 10."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"case_id","required":true,"description":"The case's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"run_id","required":true,"description":"The agent run's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["text"]},{"type":"string","enum":["tool_call"]},{"type":"string","enum":["tool_result"]},{"type":"string","enum":["system"]},{"type":"string","enum":["thinking"]}]},"runtime":{"anyOf":[{"type":"string","enum":["responses"]},{"type":"string","enum":["terminal-agent"]}]},"timestamp":{"type":"string"},"raw_message":{"anyOf":[{"type":"object","properties":{"session_id":{"type":"string"},"uuid":{"type":"string"}},"required":["session_id","uuid"],"additionalProperties":{}}]},"role":{"anyOf":[{"type":"string","enum":["user"]},{"type":"string","enum":["assistant"]},{"type":"string","enum":["system"]}]}},"required":["id","type","runtime","timestamp","raw_message","role"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"role":{"anyOf":[{"type":"string","enum":["assistant"]},{"type":"string","enum":["user"]}]},"text_content":{"type":"string"},"metadata":{"type":"object","properties":{"isAgentInstruction":{"type":"boolean"}},"additionalProperties":{}}},"required":["type","role","text_content"],"additionalProperties":false}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["text"]},{"type":"string","enum":["tool_call"]},{"type":"string","enum":["tool_result"]},{"type":"string","enum":["system"]},{"type":"string","enum":["thinking"]}]},"runtime":{"anyOf":[{"type":"string","enum":["responses"]},{"type":"string","enum":["terminal-agent"]}]},"timestamp":{"type":"string"},"raw_message":{"anyOf":[{"type":"object","properties":{"session_id":{"type":"string"},"uuid":{"type":"string"}},"required":["session_id","uuid"],"additionalProperties":{}}]},"role":{"anyOf":[{"type":"string","enum":["user"]},{"type":"string","enum":["assistant"]},{"type":"string","enum":["system"]}]}},"required":["id","type","runtime","timestamp","raw_message","role"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"role":{"type":"string","enum":["assistant"]},"text_content":{"type":"string"}},"required":["type","role","text_content"],"additionalProperties":false}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["text"]},{"type":"string","enum":["tool_call"]},{"type":"string","enum":["tool_result"]},{"type":"string","enum":["system"]},{"type":"string","enum":["thinking"]}]},"runtime":{"anyOf":[{"type":"string","enum":["responses"]},{"type":"string","enum":["terminal-agent"]}]},"timestamp":{"type":"string"},"raw_message":{"anyOf":[{"type":"object","properties":{"session_id":{"type":"string"},"uuid":{"type":"string"}},"required":["session_id","uuid"],"additionalProperties":{}}]},"role":{"anyOf":[{"type":"string","enum":["user"]},{"type":"string","enum":["assistant"]},{"type":"string","enum":["system"]}]}},"required":["id","type","runtime","timestamp","raw_message","role"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_call"]},"role":{"type":"string","enum":["assistant"]},"mcp_server_label":{"type":"string"},"tool_call":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"arguments":{"type":"object","additionalProperties":{}}},"required":["id","name"],"additionalProperties":false}},"required":["type","role","tool_call"],"additionalProperties":false}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["text"]},{"type":"string","enum":["tool_call"]},{"type":"string","enum":["tool_result"]},{"type":"string","enum":["system"]},{"type":"string","enum":["thinking"]}]},"runtime":{"anyOf":[{"type":"string","enum":["responses"]},{"type":"string","enum":["terminal-agent"]}]},"timestamp":{"type":"string"},"raw_message":{"anyOf":[{"type":"object","properties":{"session_id":{"type":"string"},"uuid":{"type":"string"}},"required":["session_id","uuid"],"additionalProperties":{}}]},"role":{"anyOf":[{"type":"string","enum":["user"]},{"type":"string","enum":["assistant"]},{"type":"string","enum":["system"]}]}},"required":["id","type","runtime","timestamp","raw_message","role"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"role":{"type":"string","enum":["assistant"]},"mcp_server_label":{"type":"string"},"tool_result":{"type":"object","properties":{"tool_call_id":{"type":"string"},"result":{},"error":{"type":"string"}},"required":["tool_call_id"],"additionalProperties":false}},"required":["type","role","tool_result"],"additionalProperties":false}]},{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"runtime":{"anyOf":[{"type":"string","enum":["responses"]},{"type":"string","enum":["terminal-agent"]}]},"timestamp":{"type":"string"},"role":{"type":"string","enum":["duvo"]},"type":{"anyOf":[{"type":"string","enum":["agent_run_created"]},{"type":"string","enum":["session_started"]},{"type":"string","enum":["session_completed"]},{"type":"string","enum":["session_interrupted"]},{"type":"string","enum":["session_error"]},{"type":"string","enum":["browser_session_created"]}]}},"required":["id","runtime","timestamp","role","type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["session_started"]}},"required":["type"],"additionalProperties":false}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"runtime":{"anyOf":[{"type":"string","enum":["responses"]},{"type":"string","enum":["terminal-agent"]}]},"timestamp":{"type":"string"},"role":{"type":"string","enum":["duvo"]},"type":{"anyOf":[{"type":"string","enum":["agent_run_created"]},{"type":"string","enum":["session_started"]},{"type":"string","enum":["session_completed"]},{"type":"string","enum":["session_interrupted"]},{"type":"string","enum":["session_error"]},{"type":"string","enum":["browser_session_created"]}]}},"required":["id","runtime","timestamp","role","type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["session_completed"]}},"required":["type"],"additionalProperties":false}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"runtime":{"anyOf":[{"type":"string","enum":["responses"]},{"type":"string","enum":["terminal-agent"]}]},"timestamp":{"type":"string"},"role":{"type":"string","enum":["duvo"]},"type":{"anyOf":[{"type":"string","enum":["agent_run_created"]},{"type":"string","enum":["session_started"]},{"type":"string","enum":["session_completed"]},{"type":"string","enum":["session_interrupted"]},{"type":"string","enum":["session_error"]},{"type":"string","enum":["browser_session_created"]}]}},"required":["id","runtime","timestamp","role","type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["session_interrupted"]}},"required":["type"],"additionalProperties":false}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"runtime":{"anyOf":[{"type":"string","enum":["responses"]},{"type":"string","enum":["terminal-agent"]}]},"timestamp":{"type":"string"},"role":{"type":"string","enum":["duvo"]},"type":{"anyOf":[{"type":"string","enum":["agent_run_created"]},{"type":"string","enum":["session_started"]},{"type":"string","enum":["session_completed"]},{"type":"string","enum":["session_interrupted"]},{"type":"string","enum":["session_error"]},{"type":"string","enum":["browser_session_created"]}]}},"required":["id","runtime","timestamp","role","type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["agent_run_created"]},"agent_run_id":{"type":"string"}},"required":["type","agent_run_id"],"additionalProperties":false}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"runtime":{"anyOf":[{"type":"string","enum":["responses"]},{"type":"string","enum":["terminal-agent"]}]},"timestamp":{"type":"string"},"role":{"type":"string","enum":["duvo"]},"type":{"anyOf":[{"type":"string","enum":["agent_run_created"]},{"type":"string","enum":["session_started"]},{"type":"string","enum":["session_completed"]},{"type":"string","enum":["session_interrupted"]},{"type":"string","enum":["session_error"]},{"type":"string","enum":["browser_session_created"]}]}},"required":["id","runtime","timestamp","role","type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["browser_session_created"]},"browser_session_id":{"type":"string"}},"required":["type","browser_session_id"],"additionalProperties":false}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string"},"runtime":{"anyOf":[{"type":"string","enum":["responses"]},{"type":"string","enum":["terminal-agent"]}]},"timestamp":{"type":"string"},"role":{"type":"string","enum":["duvo"]},"type":{"anyOf":[{"type":"string","enum":["agent_run_created"]},{"type":"string","enum":["session_started"]},{"type":"string","enum":["session_completed"]},{"type":"string","enum":["session_interrupted"]},{"type":"string","enum":["session_error"]},{"type":"string","enum":["browser_session_created"]}]}},"required":["id","runtime","timestamp","role","type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["session_error"]},"error":{"type":"string"}},"required":["type","error"],"additionalProperties":false}]}]}]}}},"required":["messages"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Case Run Recent Messages","deprecated":true}},"/v1/queues/{queue_id}/cases/bulk-delete":{"post":{"operationId":"bulkDeleteCases","tags":["Cases"],"description":"Delete multiple cases from a queue. Any active runs are interrupted first.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"case_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"},"description":"Case IDs to delete (1-100)."}},"required":["case_ids"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deletedCount":{"type":"number"},"interruptedRunIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["deletedCount","interruptedRunIds"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Bulk Delete Cases","deprecated":true}},"/v1/queues/{queue_id}/cases/bulk-reprocess":{"post":{"operationId":"bulkReprocessCases","tags":["Cases"],"description":"Re-process multiple cases on a chosen agent. Any active runs on the selected cases are interrupted first; the cases are then reset to pending and assigned to the chosen agent for the next dispatcher tick. The chosen agent must already be connected to the queue as a case-queue-consumer (with the trigger enabled or disabled).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"case_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"},"description":"Case IDs to re-process (1-100)."},"agent_id":{"type":"string","format":"uuid","description":"The agent that should run on the selected cases. Must be a consumer of this queue."}},"required":["case_ids"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"reprocessedCount":{"type":"number"},"skippedCount":{"type":"number"},"delegatedCount":{"type":"number","deprecated":true,"description":"Deprecated alias of reprocessedCount, kept for clients redirected from bulk-delegate. Removed on 2026-06-10."},"retriedCount":{"type":"number","deprecated":true,"description":"Deprecated alias of reprocessedCount, kept for clients redirected from bulk-retry. Removed on 2026-06-10."}},"required":["reprocessedCount","skippedCount"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Bulk Reprocess Cases","deprecated":true}},"/v1/queues/{queue_id}/cases/bulk-delegate":{"post":{"operationId":"bulkDelegateCases","tags":["Cases"],"description":"Deprecated: use POST /queues/{queue_id}/cases/bulk-reprocess instead. Permanently redirects (308) to bulk-reprocess. Scheduled for removal on 2026-06-10.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"case_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"},"description":"Case IDs to delegate (1-100)."},"agent_id":{"type":"string","format":"uuid","description":"The agent that should run on the selected cases."}},"required":["case_ids","agent_id"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"deprecated":true,"security":[{"bearerAuth":[]}],"responses":{"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Bulk Delegate Cases"}},"/v1/queues/{queue_id}/cases/bulk-retry":{"post":{"operationId":"bulkRetryCases","tags":["Cases"],"description":"Deprecated: use POST /queues/{queue_id}/cases/bulk-reprocess instead. Permanently redirects (308) to bulk-reprocess, which re-processes on the queue's auto-triggered assignment. Scheduled for removal on 2026-06-10.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"case_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"},"description":"Case IDs to retry (1-100)."}},"required":["case_ids"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"deprecated":true,"security":[{"bearerAuth":[]}],"responses":{"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Bulk Retry Cases"}},"/v1/queues/{queue_id}/cases/bulk-update-status":{"post":{"operationId":"bulkUpdateCaseStatus","tags":["Cases"],"description":"Update the status of multiple cases to completed or failed. Interrupts any active runs and cancels pending human requests.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"case_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid"},"description":"Case IDs to update (1-100)."},"status":{"type":"string","enum":["completed","failed"],"description":"Terminal status to set on each case."}},"required":["case_ids","status"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"updatedCount":{"type":"number"},"skippedCount":{"type":"number"},"interruptedRunIds":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["updatedCount","skippedCount","interruptedRunIds"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Bulk Update Case Status","deprecated":true}},"/v1/queues/{queue_id}/cases/{case_id}/labels":{"post":{"operationId":"assignCaseLabels","tags":["Cases"],"description":"Assign one or more labels to a case. Creates the labels on the queue if they don't already exist.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"labels":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"default":"","type":"string"},"value":{"type":"string","minLength":1}},"required":["value"]}}},"required":["labels"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"case_id","required":true,"description":"The case's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","minLength":1},"color_hue":{"type":"integer","minimum":0,"maximum":360}},"required":["id","key","value","color_hue"],"additionalProperties":false}}},"required":["labels"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Assign Case Labels","deprecated":true},"get":{"operationId":"listCaseLabels","tags":["Cases"],"description":"List all labels assigned to a case.","parameters":[{"schema":{"default":1000,"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"limit","required":false,"description":"Maximum number of labels to return."},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Zero-based offset for pagination."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"case_id","required":true,"description":"The case's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","minLength":1},"color_hue":{"type":"integer","minimum":0,"maximum":360}},"required":["id","key","value","color_hue"],"additionalProperties":false}}},"required":["labels"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Case Labels","deprecated":true}},"/v1/queues/{queue_id}/labels":{"get":{"operationId":"listQueueLabels","tags":["Cases"],"description":"List every label defined on a queue along with the count of cases each label is assigned to.","parameters":[{"schema":{"default":1000,"type":"integer","minimum":1,"maximum":1000},"in":"query","name":"limit","required":false,"description":"Maximum number of labels to return."},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Zero-based offset for pagination."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","minLength":1},"color_hue":{"type":"integer","minimum":0,"maximum":360},"case_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","key","value","color_hue","case_count"],"additionalProperties":false}}},"required":["labels"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Queue Labels","deprecated":true},"post":{"operationId":"createQueueLabel","tags":["Cases"],"description":"Create a label on a queue without assigning it to a case.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"default":"","type":"string"},"value":{"type":"string","minLength":1},"color_hue":{"type":"integer","minimum":0,"maximum":360}},"required":["value"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","minLength":1},"color_hue":{"type":"integer","minimum":0,"maximum":360},"case_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","key","value","color_hue","case_count"],"additionalProperties":false}},"required":["label"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Queue Label","deprecated":true}},"/v1/queues/{queue_id}/cases/{case_id}/labels/unlink":{"post":{"operationId":"unlinkCaseLabels","tags":["Cases"],"description":"Remove the given labels from a case.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid"}}},"required":["label_ids"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"case_id","required":true,"description":"The case's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Unlink Case Labels","deprecated":true}},"/v1/queues/{queue_id}/labels/{label_id}":{"delete":{"operationId":"deleteQueueLabel","tags":["Cases"],"description":"Delete a label from a queue. Cascade-deletes all assignments of this label on existing cases.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"label_id","required":true,"description":"The label's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Queue Label","deprecated":true},"patch":{"operationId":"updateQueueLabel","tags":["Cases"],"description":"Update a label's key, value, or color. Renaming key/value affects every case assigned to this label.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string","minLength":1},"color_hue":{"type":"integer","minimum":0,"maximum":360}},"required":["value"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"label_id","required":true,"description":"The label's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","minLength":1},"color_hue":{"type":"integer","minimum":0,"maximum":360}},"required":["id","key","value","color_hue"],"additionalProperties":false}},"required":["label"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Queue Label","deprecated":true}},"/v1/queues/{queue_id}/agents":{"get":{"operationId":"listQueueAgents","tags":["Case Queues"],"description":"List agents bound to a queue as producers (agents that push cases into the queue) or consumers (agents triggered by cases in the queue).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"queue_name":{"type":"string"},"producers":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid"},"agent_name":{"type":"string"},"case_trigger_enabled":{"type":"boolean"},"case_trigger_queue_name":{"nullable":true,"type":"string"},"problems":{"type":"array","items":{"type":"string","enum":["multiple_triggers","producer_consumer_mix"]}}},"required":["agent_id","agent_name","case_trigger_enabled","case_trigger_queue_name","problems"],"additionalProperties":false}},"consumers":{"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid"},"agent_name":{"type":"string"},"case_trigger_enabled":{"type":"boolean"},"is_handover_target":{"type":"boolean"},"problems":{"type":"array","items":{"type":"string","enum":["multiple_triggers","producer_consumer_mix"]}},"concurrency_limit":{"type":"integer","minimum":0,"maximum":9007199254740991},"at_concurrency_limit":{"type":"boolean"}},"required":["agent_id","agent_name","case_trigger_enabled","is_handover_target","problems"],"additionalProperties":false}}},"required":["queue_name","producers","consumers"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Queue Agents","deprecated":true}},"/v1/queues/{queue_id}/cases/search":{"post":{"operationId":"searchCases","tags":["Cases"],"description":"Search cases in a queue with rich filters (multi-status, date ranges, label-based filters). Use this when the simple query-string filters on GET /v2/teams/:team_id/queues/:queue_id/cases aren't enough.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filters":{"default":{},"type":"object","properties":{"status":{"type":"array","items":{"type":"string","enum":["pending","claimed","completed","failed","needs_input","postponed"]}},"created_at_from":{"type":"string"},"updated_at_from":{"type":"string"},"labels":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"limit":{"default":25,"type":"integer","minimum":1,"maximum":100},"offset":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"sort_by":{"default":"created_at","type":"string","enum":["created_at","updated_at","postponed_to"]},"sort_order":{"default":"desc","type":"string","enum":["asc","desc"]},"search":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"queue_id","required":true,"description":"The queue's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"cases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"queue_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"data":{"type":"string"},"status":{"type":"string","enum":["pending","claimed","completed","failed"]},"claimed_at":{"nullable":true,"type":"string"},"claimed_by_run_id":{"nullable":true,"type":"string"},"completed_at":{"nullable":true,"type":"string"},"postponed_to":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"created_by_user_id":{"nullable":true,"type":"string","format":"uuid"},"created_by_user_name":{"nullable":true,"type":"string"},"created_by_user_email":{"nullable":true,"type":"string"},"agent_run_status":{"nullable":true,"type":"string"},"agent_run_user_id":{"nullable":true,"type":"string","format":"uuid"},"pending_human_request_id":{"nullable":true,"type":"string","format":"uuid"},"pending_approval_batch_id":{"nullable":true,"type":"string","format":"uuid"},"pending_approval_assignee_user_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"approval_approved_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"approval_rejected_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"search_match_data_snippet":{"type":"object","properties":{"before":{"type":"string"},"match":{"type":"string"},"after":{"type":"string"}},"required":["before","match","after"],"additionalProperties":false},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","minLength":1},"color_hue":{"type":"integer","minimum":0,"maximum":360}},"required":["id","key","value","color_hue"],"additionalProperties":false}}},"required":["id","queue_id","title","data","status","claimed_at","claimed_by_run_id","completed_at","postponed_to","created_at","updated_at","created_by_user_id","created_by_user_name","created_by_user_email","agent_run_status","agent_run_user_id","pending_human_request_id","pending_approval_batch_id","pending_approval_assignee_user_ids","approval_approved_count","approval_rejected_count","labels"],"additionalProperties":false}},"total":{"type":"number"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["cases","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Search Cases","deprecated":true}},"/v1/runs/{run_id}":{"get":{"operationId":"getRun","tags":["Runs"],"description":"Get information about an agent run. Can be polled to check status.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"run_id","required":true,"description":"The run's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"nullable":true,"description":"The run details, or null if the run no longer exists","type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique run identifier"},"agent_id":{"type":"string","format":"uuid","description":"ID of the agent being run"},"build_id":{"type":"string","format":"uuid","description":"ID of the build being run"},"status":{"type":"string","description":"Current run status"},"source":{"nullable":true,"description":"How the run was initiated","type":"string"},"sandbox_id":{"nullable":true,"description":"The sandbox ID for this run","type":"string"},"started_at":{"nullable":true,"description":"ISO 8601 timestamp when the run started","type":"string"},"completed_at":{"nullable":true,"description":"ISO 8601 timestamp when the run completed","type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp when the run was created"},"updated_at":{"type":"string","description":"ISO 8601 timestamp when the run was last updated"},"human_in_the_loop_enabled":{"type":"boolean","description":"Whether this agent can request human input during execution"}},"required":["id","agent_id","build_id","status","source","sandbox_id","started_at","completed_at","created_at","updated_at","human_in_the_loop_enabled"],"additionalProperties":false},"pending_human_request":{"description":"The pending human request blocking the run, if any","nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique human-request identifier"},"title":{"type":"string","description":"Short title for the request"},"description":{"nullable":true,"description":"Longer description of the request","type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp when the request was created"},"type":{"type":"string","enum":["approval","question"],"description":"Type of human request: 'approval' for yes/no decisions, 'question' for structured questions with optional predefined answers"},"questions":{"description":"For 'question' type requests, the structured questions with optional predefined answer options","type":"array","items":{"type":"object","properties":{"question":{"type":"string","description":"The question being asked"},"header":{"description":"Short header for the question","type":"string"},"options":{"description":"Predefined answer options","type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"Display label for the option"},"description":{"description":"Optional explanation of what this option means","type":"string"}},"required":["label"],"additionalProperties":false}},"multi_select":{"description":"Whether multiple options can be selected","type":"boolean"}},"required":["question"],"additionalProperties":false}}},"required":["id","title","description","created_at","type"],"additionalProperties":false}},"required":["run"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Run","deprecated":true}},"/v1/runs/{run_id}/messages":{"post":{"operationId":"postRunMessage","tags":["Runs"],"description":"Post a message to an agent run. This will persist the message and resume the agent execution if the run is in a resumable state (waiting, completed, or interrupted).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"description":"The message content to send to the agent"}},"required":["message"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"run_id","required":true,"description":"The run's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"id":{"type":"string","description":"Unique message identifier"},"type":{"type":"string","description":"Message type"},"role":{"type":"string","description":"Sender role"},"timestamp":{"type":"string","description":"ISO 8601 timestamp when the message was posted"},"text_content":{"type":"string","description":"Plain text content of the message"}},"required":["id","type","role","timestamp","text_content"],"additionalProperties":false,"description":"The message that was posted to the run"}},"required":["message"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Post Run Message","deprecated":true},"get":{"operationId":"listRunMessages","tags":["Runs"],"description":"Get paginated messages for an agent run. Messages are returned in chronological order.","parameters":[{"schema":{"default":20,"type":"integer","minimum":1,"maximum":50},"in":"query","name":"limit","required":false,"description":"Number of messages per page (1-50, default 20)"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of messages to skip"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"run_id","required":true,"description":"The run's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique message identifier"},"type":{"type":"string","description":"Message type"},"role":{"type":"string","description":"Sender role (e.g., user, assistant, tool)"},"timestamp":{"type":"string","description":"ISO 8601 timestamp when the message was sent"},"text_content":{"description":"Plain text content of the message","type":"string"},"tool_call":{"description":"Tool invocation details when role is assistant","type":"object","properties":{"id":{"type":"string","description":"Tool call identifier"},"name":{"type":"string","description":"Tool name being invoked"},"arguments":{"description":"Arguments passed to the tool","type":"object","additionalProperties":{}}},"required":["id","name"],"additionalProperties":false},"tool_result":{"description":"Tool result details when role is tool","type":"object","properties":{"tool_call_id":{"type":"string","description":"ID of the tool call this result corresponds to"},"result":{"description":"Serialized tool output"},"error":{"description":"Error message if the tool invocation failed","type":"string"}},"required":["tool_call_id"],"additionalProperties":false}},"required":["id","type","role","timestamp"],"additionalProperties":false},"description":"Messages for the run, in chronological order"},"total":{"type":"number","description":"Total number of messages for the run"},"limit":{"type":"number","description":"Number of messages per page"},"offset":{"type":"number","description":"Number of messages skipped"}},"required":["messages","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Run Messages","deprecated":true}},"/v1/runs/{run_id}/human-requests/{request_id}/respond":{"post":{"operationId":"respondToHumanRequest","tags":["Runs"],"description":"Respond to a human-in-the-loop request. Use 'approved' (true/false) for approval-type requests, or 'answers' ({question: answer}) for question-type requests. Only works when the run is in 'waiting' status.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answers":{"description":"For question-type requests: a map of question text to answer. Multi-select answers should be comma-separated.","type":"object","additionalProperties":{"type":"string"}},"approved":{"description":"For approval-type requests: true to approve, false to deny","type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"run_id","required":true,"description":"The run's unique identifier"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"request_id","required":true,"description":"The human request's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"human_request":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique human-request identifier"},"run_id":{"type":"string","format":"uuid","description":"ID of the run this request belongs to"},"title":{"type":"string","description":"Short title for the request"},"description":{"nullable":true,"description":"Longer description of the request","type":"string"},"response":{"nullable":true,"description":"The response provided by the user","type":"string"},"responded_at":{"nullable":true,"description":"ISO 8601 timestamp when the user responded","type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp when the request was created"}},"required":["id","run_id","title","description","response","responded_at","created_at"],"additionalProperties":false}},"required":["human_request"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Respond To Human Request","deprecated":true}},"/v1/runs/{run_id}/stop":{"post":{"operationId":"stopRun","tags":["Runs"],"description":"Stop an agent run. No-op if the run is not currently running.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"run_id","required":true,"description":"The run's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the stop request succeeded"},"message":{"description":"Optional human-readable detail","type":"string"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"502":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Stop Run","deprecated":true}},"/v1/teams":{"get":{"operationId":"listMyTeams","tags":["Team"],"description":"List teams the authenticated caller can act on. API-key callers see only the key's team; OAuth callers see every team they're a member of.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"organization_id":{"nullable":true,"type":"string","format":"uuid"}},"required":["id","name","organization_id"],"additionalProperties":false}}},"required":["teams"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List My Teams","deprecated":true}},"/v1/agent-folders/{folder_id}":{"patch":{"operationId":"updateAgentFolder","tags":["Agent Folders"],"description":"Rename an agent folder or move it to a new parent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New folder name","type":"string","minLength":1,"maxLength":100},"parent_folder_id":{"description":"New parent folder ID. Pass null to move the folder to the root level.","nullable":true,"type":"string","format":"uuid"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"folder_id","required":true,"description":"The folder's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"folder":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique folder identifier"},"name":{"type":"string","description":"Human-readable folder name"},"team_id":{"type":"string","format":"uuid","description":"Team that owns the folder"},"parent_folder_id":{"nullable":true,"description":"Parent folder ID, or null if at the root level","type":"string","format":"uuid"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-updated timestamp"}},"required":["id","name","team_id","parent_folder_id","created_at","updated_at"],"additionalProperties":false}},"required":["folder"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Agent Folder","deprecated":true},"delete":{"operationId":"deleteAgentFolder","tags":["Agent Folders"],"description":"Delete an agent folder. If the folder contains assignments or subfolders, pass `force=true` to delete it and move the contained assignments to the root level.","parameters":[{"schema":{"type":"string"},"in":"query","name":"force","required":false,"description":"Pass 'true' to delete a folder that still contains assignments or subfolders. Any contained assignments will be moved to the root level."},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"folder_id","required":true,"description":"The folder's unique identifier"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on success"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Short error message"},"message":{"description":"Human-readable error detail","type":"string"},"has_contents":{"description":"True when the folder still contains assignments or subfolders","type":"boolean"},"agent_count":{"description":"Number of assignments that would be moved to the root level if force=true were passed","type":"number"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Agent Folder","deprecated":true}},"/v1/connections/{connection_id}":{"get":{"operationId":"getConnection","tags":["Connections"],"description":"Get one of your connections by ID.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"connection_id","required":true,"description":"Connection ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"provider":{"type":"string"},"user_id":{"nullable":true,"type":"string"},"team_id":{"type":"string"},"server_url":{"type":"string"},"transport_type":{"type":"string","enum":["stdio","sse","http"]},"auth_method":{"nullable":true,"type":"string"},"composio_mcp_id":{"default":null,"nullable":true,"type":"string"},"custom_integration_id":{"nullable":true,"type":"string"},"icon_url":{"nullable":true,"type":"string"},"oauth_provider":{"nullable":true,"type":"string"},"oauth_provider_key":{"nullable":true,"type":"string"},"oauth_scopes":{"nullable":true,"type":"array","items":{"type":"string"}},"has_headers":{"type":"boolean"},"has_oauth_tokens":{"type":"boolean"},"integration_id":{"nullable":true,"type":"string"},"shared":{"type":"boolean"},"created_by":{"nullable":true,"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","type","provider","user_id","team_id","composio_mcp_id","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Connection","deprecated":true},"patch":{"operationId":"updateConnection","tags":["Connections"],"description":"Update an existing connection. For sensitive header values, sending an empty string keeps the existing value; send a new value to overwrite. Toggling `shared` moves the connection between personal and team-shared.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"server_url":{"type":"string","format":"uri"},"auth_method":{"type":"string","enum":["url","oauth","apikey","headers"]},"headers":{"nullable":true,"type":"object","properties":{"plaintext":{"type":"object","additionalProperties":{"type":"string"}},"secret":{"type":"object","additionalProperties":{"type":"string"}}}},"composio_mcp_id":{"nullable":true,"type":"string"},"shared":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"connection_id","required":true,"description":"Connection ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"provider":{"type":"string"},"user_id":{"nullable":true,"type":"string"},"team_id":{"type":"string"},"server_url":{"type":"string"},"transport_type":{"type":"string","enum":["stdio","sse","http"]},"auth_method":{"nullable":true,"type":"string"},"composio_mcp_id":{"default":null,"nullable":true,"type":"string"},"custom_integration_id":{"nullable":true,"type":"string"},"icon_url":{"nullable":true,"type":"string"},"oauth_provider":{"nullable":true,"type":"string"},"oauth_provider_key":{"nullable":true,"type":"string"},"oauth_scopes":{"nullable":true,"type":"array","items":{"type":"string"}},"has_headers":{"type":"boolean"},"has_oauth_tokens":{"type":"boolean"},"integration_id":{"nullable":true,"type":"string"},"shared":{"type":"boolean"},"created_by":{"nullable":true,"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","type","provider","user_id","team_id","composio_mcp_id","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Connection","deprecated":true},"delete":{"operationId":"deleteConnection","tags":["Connections"],"description":"Delete a connection (disconnects the user's connection and removes any triggers bound to it).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"connection_id","required":true,"description":"Connection ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Connection","deprecated":true}},"/v1/connections/{connection_id}/credentials":{"get":{"operationId":"getConnectionCredentials","tags":["Connections"],"description":"Get the header keys configured for a connection. Sensitive values (api keys, tokens, passwords) are returned as empty strings — the response only reveals which credential fields are set, never their values.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"connection_id","required":true,"description":"Connection ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["id","headers"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Connection Credentials","deprecated":true}},"/v1/integrations/custom/{custom_integration_id}":{"delete":{"operationId":"deleteCustomIntegration","tags":["Integrations"],"description":"Delete a custom integration type (team-level catalog entry) and cascade-remove related connections. Requires manager-or-above role.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"custom_integration_id","required":true,"description":"Custom integration type ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Custom Integration","deprecated":true}},"/v1/credentials/{id}":{"get":{"operationId":"getSecret","tags":["Secrets"],"description":"Get an env-var secret by id. Returns metadata and env var keys; secret values are never exposed.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"user_id":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"service_slug":{"nullable":true,"type":"string"},"env_var_keys":{"type":"array","items":{"type":"string"}},"created_by":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","team_id","user_id","name","service_slug","env_var_keys","created_by","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get Secret","deprecated":true},"patch":{"operationId":"updateSecret","tags":["Secrets"],"description":"Update an env-var secret. Send `values` to replace all entries, or any of `rename_keys`, `remove_keys`, `add_values` for a non-destructive patch. Editing a team-shared secret or toggling sharing requires manager role.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"service_slug":{"nullable":true,"type":"string","minLength":1,"maxLength":64},"shared":{"type":"boolean"},"values":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":65536}},"rename_keys":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Z_][A-Z0-9_]*$"}},"remove_keys":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Z_][A-Z0-9_]*$"}},"add_values":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":65536}}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"user_id":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"service_slug":{"nullable":true,"type":"string"},"env_var_keys":{"type":"array","items":{"type":"string"}},"created_by":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","team_id","user_id","name","service_slug","env_var_keys","created_by","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update Secret","deprecated":true},"delete":{"operationId":"deleteSecret","tags":["Secrets"],"description":"Soft-delete an env-var secret. Deleting a team-shared secret requires manager role.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete Secret","deprecated":true}},"/v1/agents/{agentId}/revisions/{buildId}/credentials":{"get":{"operationId":"listRevisionSecrets","tags":["Secrets"],"description":"List env-var secrets attached to a specific revision (build) of an assignment. Returns metadata and env-var keys only — secret values are never exposed.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"buildId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"user_id":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"service_slug":{"nullable":true,"type":"string"},"env_var_keys":{"type":"array","items":{"type":"string"}},"created_by":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","team_id","user_id","name","service_slug","env_var_keys","created_by","created_at","updated_at"],"additionalProperties":false}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Revision Secrets","deprecated":true},"post":{"operationId":"attachRevisionSecret","tags":["Secrets"],"description":"Attach an env-var secret to a revision so its keys are injected into jobs spawned from that revision. Personal secrets can only be attached by their owner; team-shared secrets require builder permissions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"credentialId":{"type":"string","format":"uuid"}},"required":["credentialId"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"buildId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Attach Revision Secret","deprecated":true}},"/v1/agents/{agentId}/revisions/{buildId}/credentials/{credentialId}":{"delete":{"operationId":"detachRevisionSecret","tags":["Secrets"],"description":"Detach an env-var secret from a revision. Personal secrets can only be detached by their owner; team-shared secrets require builder permissions.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"buildId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"credentialId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Detach Revision Secret","deprecated":true}},"/v1/agents/{agentId}/revisions/{buildId}/logins":{"get":{"operationId":"listRevisionLogins","tags":["Credentials"],"description":"List browser logins attached to a specific revision (build) of an assignment. Returns metadata only — passwords and OTP secrets are never exposed.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"buildId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"user_id":{"nullable":true,"type":"string","format":"uuid"},"team_id":{"nullable":true,"type":"string","format":"uuid"},"domain":{"type":"string"},"username":{"nullable":true,"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","user_id","team_id","domain","username","created_at","updated_at"],"additionalProperties":false}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Revision Logins","deprecated":true},"post":{"operationId":"attachRevisionLogin","tags":["Credentials"],"description":"Attach a browser login to a revision so the browsing agent can use it during jobs spawned from that revision. Personal logins can only be attached by their owner; team-shared logins require builder permissions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"exposedCredentialId":{"type":"string","format":"uuid"}},"required":["exposedCredentialId"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"buildId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Attach Revision Login","deprecated":true}},"/v1/agents/{agentId}/revisions/{buildId}/logins/{exposedCredentialId}":{"delete":{"operationId":"detachRevisionLogin","tags":["Credentials"],"description":"Detach a browser login from a revision. Personal logins can only be detached by their owner; team-shared logins require builder permissions.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"agentId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"buildId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"exposedCredentialId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Detach Revision Login","deprecated":true}},"/v1/agents":{"get":{"operationId":"listAgents","tags":["Agents"],"description":"List agents for your team.","parameters":[{"schema":{"default":"false","type":"string","enum":["true","false"]},"in":"query","name":"include_schedules","required":false,"description":"Include the authenticated user's schedules for each agent in the response. Schedules are per-user, so this only returns schedules the current user owns."},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Number of agents per page (1-100, default 20)"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of agents to skip"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slack_enabled":{"nullable":true,"type":"boolean"},"microsoft_teams_enabled":{"nullable":true,"type":"boolean"},"agentic_memory_enabled":{"nullable":true,"type":"boolean"},"team_id":{"nullable":true,"type":"string"},"thread_id":{"nullable":true,"type":"string"},"folder_id":{"nullable":true,"type":"string"},"pinned_at":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"updated_by":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"last_run_at":{"nullable":true,"type":"string"},"latest_build":{"nullable":true,"type":"object","properties":{"id":{"type":"string","format":"uuid"},"copilot_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"revision_name":{"nullable":true,"type":"string"},"revision_description":{"nullable":true,"type":"string"},"config":{"nullable":true,"anyOf":[{"type":"object","properties":{"version":{"type":"string","enum":["v1"]},"data":{"type":"object","properties":{"model":{"type":"string"},"temperature":{"nullable":true,"type":"number","minimum":0,"maximum":2},"max_output_tokens":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true},"top_p":{"nullable":true,"type":"number","minimum":0,"maximum":1},"store":{"nullable":true,"type":"boolean"},"tools":{},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}]},"text":{"nullable":true,"type":"object","properties":{"format":{"nullable":true,"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false}]}},"additionalProperties":false},"files":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}}},"required":["model","tools","input","files","skills"],"additionalProperties":false}},"required":["version","data"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","enum":["v2"],"description":"Schema version discriminator — must be \"v2\" for the current schema"},"data":{"type":"object","properties":{"models":{"type":"object","properties":{"agent":{"type":"object","properties":{"model":{"type":"string","enum":["claude-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","d1-max","duvo-1-max","duvo-1-max-sonnet-1m","duvo-1-max-sonnet-4.5","duvo-1-max-sonnet-4.5-1m","duvo-1-max-opus","duvo-1-max-opus-4.5","gpt-4.1","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","claude-sonnet-4-20250514","claude-sonnet-4-20250514[1m]","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101"],"description":"Claude model identifier used for the primary agent loop"}},"required":["model"],"additionalProperties":false,"description":"Primary Claude agent model configuration"},"browsing":{"type":"object","properties":{"provider":{"type":"string","enum":["google","anthropic"],"description":"Provider backing the browsing/computer-use model"},"model":{"type":"string","enum":["gemini-2.5-pro","gemini-2.5-flash","gemini-3-pro-preview","claude-haiku-4-5","claude-sonnet-4-5","claude-opus-4-1"],"description":"Model identifier for the browsing provider"}},"required":["provider","model"],"additionalProperties":false,"description":"Browsing/computer-use model configuration"}},"required":["agent","browsing"],"additionalProperties":false,"description":"Model configuration for each capability the agent uses"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}],"description":"Initial agent instructions — either a single system prompt string or a list of structured messages"},"files":{"default":[],"description":"IDs of team files that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"description":"IDs of skills (team or system) that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"plugins":{"default":[],"description":"Plugins to load — either a built-in plugin name (e.g. \"code-review\") or a GitHub URL (e.g. \"https://github.com/owner/repo\")","nullable":true,"type":"array","items":{"type":"string"}},"subAgents":{"default":[],"description":"IDs of other assignments (agents in the same team) to expose to this assignment as Claude Code subagents. Each sub-assignment runs with its own SOP and connections; the parent can delegate to them via the Agent tool.","nullable":true,"type":"array","items":{"type":"string","format":"uuid"}},"options":{"description":"Optional runtime options controlling how the agent executes","type":"object","properties":{"browserProvider":{"description":"Browser infrastructure provider","type":"string","enum":["browserbase","browser-use"]},"evaluationSchemaId":{"description":"ID of the evaluation schema to apply to runs of this agent","type":"string"},"benchmarkExpectedOutcomes":{"description":"Expected outcomes used when running benchmark scenarios","type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Human-readable description of the expected outcome"},"criteria":{"type":"string","description":"Pass/fail criteria used to evaluate the outcome"}},"required":["description","criteria"],"additionalProperties":false}}},"additionalProperties":{}}},"required":["models","input","files","skills","plugins","subAgents"],"additionalProperties":false,"description":"Agent configuration payload"}},"required":["version","data"],"additionalProperties":false}]},"status":{"nullable":true,"type":"string"},"revision_number":{"nullable":true,"type":"number"},"parent_build_id":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"type":"string"},"created_by_name":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"},"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"build_id":{"type":"string"},"agent_id":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"frequency":{"type":"string","enum":["every_5_minutes","every_15_minutes","hourly","daily","workday","weekly","monthly","custom"]},"time":{"nullable":true,"type":"string"},"timezone":{"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"cron":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"task":{"nullable":true,"type":"string"},"recurring":{"nullable":true,"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","created_at","updated_at"],"additionalProperties":false}}},"required":["id","copilot_id","agent_id","name","config","status","revision_number","parent_build_id","created_by","created_at","updated_at"],"additionalProperties":false},"integration_configs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"integration_id":{"type":"string"},"integration_type":{"type":"string"},"integration_name":{"type":"string"},"created_at":{"type":"string"},"icon_url":{"nullable":true,"type":"string"},"is_connected":{"type":"boolean"},"linked_queue_names":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["id","integration_id","integration_type","integration_name","created_at"],"additionalProperties":false}},"user_triggers":{"type":"object","properties":{"slack_mention":{"type":"boolean"},"slack_channel":{"type":"boolean"},"teams_mention":{"type":"boolean"}},"required":["slack_mention","slack_channel","teams_mention"],"additionalProperties":false},"case_trigger_enabled":{"type":"boolean"},"case_trigger_has_conflict":{"type":"boolean"},"case_trigger_conflicting_agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"case_queue_name":{"nullable":true,"type":"string"}},"required":["id","name","slack_enabled","microsoft_teams_enabled","agentic_memory_enabled","team_id","thread_id","created_at","updated_at","last_run_at","latest_build","integration_configs","user_triggers","case_trigger_enabled","case_trigger_has_conflict","case_trigger_conflicting_agents","case_queue_name"],"additionalProperties":false}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["agents","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Agents","deprecated":true},"post":{"operationId":"createAgent","tags":["Agents"],"description":"Create a new agent. Optionally include a build configuration to create the first build in the same request.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Human-readable agent name"},"thread_id":{"nullable":true,"description":"Existing thread ID to associate with the agent","type":"string","format":"uuid"},"source_build_id":{"nullable":true,"description":"Build ID whose case-queue-consumer setup should be copied to the new agent","type":"string","format":"uuid"},"build":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Build name"},"config":{"type":"object","properties":{"version":{"type":"string","enum":["v2"],"description":"Schema version discriminator — must be \"v2\" for the current schema"},"data":{"type":"object","properties":{"models":{"type":"object","properties":{"agent":{"type":"object","properties":{"model":{"type":"string","enum":["claude-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","d1-max","duvo-1-max","duvo-1-max-sonnet-1m","duvo-1-max-sonnet-4.5","duvo-1-max-sonnet-4.5-1m","duvo-1-max-opus","duvo-1-max-opus-4.5","gpt-4.1","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","claude-sonnet-4-20250514","claude-sonnet-4-20250514[1m]","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101"],"description":"Claude model identifier used for the primary agent loop"}},"required":["model"],"description":"Primary Claude agent model configuration"},"browsing":{"type":"object","properties":{"provider":{"type":"string","enum":["google","anthropic"],"description":"Provider backing the browsing/computer-use model"},"model":{"type":"string","enum":["gemini-2.5-pro","gemini-2.5-flash","gemini-3-pro-preview","claude-haiku-4-5","claude-sonnet-4-5","claude-opus-4-1"],"description":"Model identifier for the browsing provider"}},"required":["provider","model"],"description":"Browsing/computer-use model configuration"}},"required":["agent","browsing"],"description":"Model configuration for each capability the agent uses"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"]}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"]}}],"description":"Initial agent instructions — either a single system prompt string or a list of structured messages"},"files":{"default":[],"description":"IDs of team files that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"description":"IDs of skills (team or system) that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"plugins":{"default":[],"description":"Plugins to load — either a built-in plugin name (e.g. \"code-review\") or a GitHub URL (e.g. \"https://github.com/owner/repo\")","nullable":true,"type":"array","items":{"type":"string"}},"subAgents":{"default":[],"description":"IDs of other assignments (agents in the same team) to expose to this assignment as Claude Code subagents. Each sub-assignment runs with its own SOP and connections; the parent can delegate to them via the Agent tool.","nullable":true,"type":"array","items":{"type":"string","format":"uuid"}},"options":{"description":"Optional runtime options controlling how the agent executes","type":"object","properties":{"browserProvider":{"description":"Browser infrastructure provider","type":"string","enum":["browserbase","browser-use"]},"evaluationSchemaId":{"description":"ID of the evaluation schema to apply to runs of this agent","type":"string"},"benchmarkExpectedOutcomes":{"description":"Expected outcomes used when running benchmark scenarios","type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Human-readable description of the expected outcome"},"criteria":{"type":"string","description":"Pass/fail criteria used to evaluate the outcome"}},"required":["description","criteria"]}}},"additionalProperties":{}}},"required":["models","input"],"description":"Agent configuration payload"}},"required":["version","data"],"description":"Build configuration (latest schema version only; legacy v1 configs are not accepted)"}},"required":["name","config"],"description":"Optional inline build. When present, a first build is created alongside the agent."}},"required":["name"]}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slack_enabled":{"nullable":true,"type":"boolean"},"microsoft_teams_enabled":{"nullable":true,"type":"boolean"},"agentic_memory_enabled":{"nullable":true,"type":"boolean"},"team_id":{"nullable":true,"type":"string"},"thread_id":{"nullable":true,"type":"string"},"folder_id":{"nullable":true,"type":"string"},"pinned_at":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"updated_by":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false}},"required":["id","name","slack_enabled","microsoft_teams_enabled","agentic_memory_enabled","team_id","thread_id","created_at","updated_at"],"additionalProperties":false},"build":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"copilot_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"revision_name":{"nullable":true,"type":"string"},"revision_description":{"nullable":true,"type":"string"},"config":{"nullable":true,"anyOf":[{"type":"object","properties":{"version":{"type":"string","enum":["v1"]},"data":{"type":"object","properties":{"model":{"type":"string"},"temperature":{"nullable":true,"type":"number","minimum":0,"maximum":2},"max_output_tokens":{"nullable":true,"type":"number","minimum":0,"exclusiveMinimum":true},"top_p":{"nullable":true,"type":"number","minimum":0,"maximum":1},"store":{"nullable":true,"type":"boolean"},"tools":{},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}]},"text":{"nullable":true,"type":"object","properties":{"format":{"nullable":true,"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false}]}},"additionalProperties":false},"files":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"nullable":true,"type":"array","items":{"type":"string"}}},"required":["model","tools","input","files","skills"],"additionalProperties":false}},"required":["version","data"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","enum":["v2"],"description":"Schema version discriminator — must be \"v2\" for the current schema"},"data":{"type":"object","properties":{"models":{"type":"object","properties":{"agent":{"type":"object","properties":{"model":{"type":"string","enum":["claude-sonnet-4-6","claude-sonnet-4-6[1m]","claude-opus-4-6","claude-opus-4-6[1m]","claude-opus-4-7","claude-opus-4-7[1m]","d1-max","duvo-1-max","duvo-1-max-sonnet-1m","duvo-1-max-sonnet-4.5","duvo-1-max-sonnet-4.5-1m","duvo-1-max-opus","duvo-1-max-opus-4.5","gpt-4.1","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","claude-sonnet-4-20250514","claude-sonnet-4-20250514[1m]","claude-sonnet-4-5-20250929","claude-sonnet-4-5-20250929[1m]","claude-opus-4-1-20250805","claude-opus-4-5-20251101"],"description":"Claude model identifier used for the primary agent loop"}},"required":["model"],"additionalProperties":false,"description":"Primary Claude agent model configuration"},"browsing":{"type":"object","properties":{"provider":{"type":"string","enum":["google","anthropic"],"description":"Provider backing the browsing/computer-use model"},"model":{"type":"string","enum":["gemini-2.5-pro","gemini-2.5-flash","gemini-3-pro-preview","claude-haiku-4-5","claude-sonnet-4-5","claude-opus-4-1"],"description":"Model identifier for the browsing provider"}},"required":["provider","model"],"additionalProperties":false,"description":"Browsing/computer-use model configuration"}},"required":["agent","browsing"],"additionalProperties":false,"description":"Model configuration for each capability the agent uses"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"detail":{"nullable":true,"type":"string","enum":["low","high","auto"]},"file_id":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]},"file_id":{"type":"string"}},"required":["type","file_id"],"additionalProperties":false}]}}]},"type":{"nullable":true,"type":"string","enum":["message"]}},"required":["role","content"],"additionalProperties":false}}],"description":"Initial agent instructions — either a single system prompt string or a list of structured messages"},"files":{"default":[],"description":"IDs of team files that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"skills":{"default":[],"description":"IDs of skills (team or system) that should be available to the agent","nullable":true,"type":"array","items":{"type":"string"}},"plugins":{"default":[],"description":"Plugins to load — either a built-in plugin name (e.g. \"code-review\") or a GitHub URL (e.g. \"https://github.com/owner/repo\")","nullable":true,"type":"array","items":{"type":"string"}},"subAgents":{"default":[],"description":"IDs of other assignments (agents in the same team) to expose to this assignment as Claude Code subagents. Each sub-assignment runs with its own SOP and connections; the parent can delegate to them via the Agent tool.","nullable":true,"type":"array","items":{"type":"string","format":"uuid"}},"options":{"description":"Optional runtime options controlling how the agent executes","type":"object","properties":{"browserProvider":{"description":"Browser infrastructure provider","type":"string","enum":["browserbase","browser-use"]},"evaluationSchemaId":{"description":"ID of the evaluation schema to apply to runs of this agent","type":"string"},"benchmarkExpectedOutcomes":{"description":"Expected outcomes used when running benchmark scenarios","type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Human-readable description of the expected outcome"},"criteria":{"type":"string","description":"Pass/fail criteria used to evaluate the outcome"}},"required":["description","criteria"],"additionalProperties":false}}},"additionalProperties":{}}},"required":["models","input","files","skills","plugins","subAgents"],"additionalProperties":false,"description":"Agent configuration payload"}},"required":["version","data"],"additionalProperties":false}]},"status":{"nullable":true,"type":"string"},"revision_number":{"nullable":true,"type":"number"},"parent_build_id":{"nullable":true,"type":"string"},"created_by":{"nullable":true,"type":"string"},"created_by_name":{"nullable":true,"type":"string"},"created_at":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"},"schedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"build_id":{"type":"string"},"agent_id":{"type":"string"},"user_id":{"type":"string"},"enabled":{"type":"boolean"},"frequency":{"type":"string","enum":["every_5_minutes","every_15_minutes","hourly","daily","workday","weekly","monthly","custom"]},"time":{"nullable":true,"type":"string"},"timezone":{"type":"string"},"day":{"nullable":true,"type":"string"},"day_of_month":{"nullable":true,"type":"number"},"cron":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"task":{"nullable":true,"type":"string"},"recurring":{"nullable":true,"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_name":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"}},"required":["id","build_id","agent_id","user_id","enabled","frequency","time","timezone","day","day_of_month","cron","source","task","recurring","created_at","updated_at"],"additionalProperties":false}}},"required":["id","copilot_id","agent_id","name","config","status","revision_number","parent_build_id","created_by","created_at","updated_at"],"additionalProperties":false}},"required":["agent"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Agent","deprecated":true}},"/v1/agent-folders":{"get":{"operationId":"listAgentFolders","tags":["Agent Folders"],"description":"List all agent folders for the authenticated team.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"folders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique folder identifier"},"name":{"type":"string","description":"Folder display name"},"team_id":{"type":"string","format":"uuid","description":"ID of the team that owns the folder"},"parent_folder_id":{"nullable":true,"description":"Parent folder ID, or null if this is a root folder","type":"string","format":"uuid"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-update timestamp"},"agent_count":{"type":"number","description":"Number of agents directly inside this folder"},"subfolder_count":{"type":"number","description":"Number of direct subfolders inside this folder"}},"required":["id","name","team_id","parent_folder_id","created_at","updated_at","agent_count","subfolder_count"],"additionalProperties":false},"description":"Agent folders owned by the authenticated team"}},"required":["folders"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Agent Folders","deprecated":true},"post":{"operationId":"createAgentFolder","tags":["Agent Folders"],"description":"Create a new agent folder.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Human-readable folder name"},"parent_folder_id":{"nullable":true,"description":"Parent folder ID for nested folders. Omit or null to create at the root level.","type":"string","format":"uuid"}},"required":["name"]}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"folder":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique folder identifier"},"name":{"type":"string","description":"Human-readable folder name"},"team_id":{"type":"string","format":"uuid","description":"Team that owns the folder"},"parent_folder_id":{"nullable":true,"description":"Parent folder ID, or null if at the root level","type":"string","format":"uuid"},"created_at":{"type":"string","description":"ISO 8601 creation timestamp"},"updated_at":{"type":"string","description":"ISO 8601 last-updated timestamp"}},"required":["id","name","team_id","parent_folder_id","created_at","updated_at"],"additionalProperties":false}},"required":["folder"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Agent Folder","deprecated":true}},"/v1/agent-folders/move-agents":{"post":{"operationId":"moveAgentsToFolder","tags":["Agent Folders"],"description":"Move one or more agents (assignments) into a folder, or to the root level.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid"},"description":"IDs of the agents (assignments) to move. Must be unique."},"folder_id":{"nullable":true,"description":"Destination folder ID. Pass null to move the agents to the root level.","type":"string","format":"uuid"}},"required":["agent_ids","folder_id"]}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on success"},"moved_count":{"type":"number","description":"Number of agents that were moved"}},"required":["success","moved_count"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Move Agents To Folder","deprecated":true}},"/v1/queues":{"get":{"operationId":"listQueues","tags":["Case Queues"],"description":"List case queues for your team.","parameters":[{"schema":{"default":250,"type":"integer","minimum":1,"maximum":250},"in":"query","name":"limit","required":false,"description":"Number of queues per page (1-250, default 250)"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of queues to skip"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"queues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"folder_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"has_approvals":{"type":"boolean"}},"required":["id","name","description","folder_id","created_at","has_approvals"],"additionalProperties":false}},"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["queues","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Queues","deprecated":true},"post":{"operationId":"createQueue","tags":["Case Queues"],"description":"Create a new case queue.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Queue name. Must be unique within the team."},"description":{"description":"Optional human-readable description.","nullable":true,"type":"string","maxLength":500},"folder_id":{"description":"Optional folder to nest the queue under.","nullable":true,"type":"string","format":"uuid"}},"required":["name"]}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"queue":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"nullable":true,"type":"string"},"folder_id":{"nullable":true,"type":"string","format":"uuid"},"created_at":{"type":"string"},"has_approvals":{"type":"boolean"}},"required":["id","name","description","folder_id","created_at","has_approvals"],"additionalProperties":false}},"required":["queue"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Queue","deprecated":true}},"/v1/runs":{"get":{"operationId":"listRuns","tags":["Runs"],"description":"List runs for the current team. Supports filtering by agent, user, case queue, status, etc. Messages, evaluation data, and case-queue metadata are included where available.","parameters":[{"schema":{"default":20,"type":"number","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Number of runs per page (1-100, default 20)"},{"schema":{"type":"number","minimum":0},"in":"query","name":"offset","required":false,"description":"Number of runs to skip"},{"schema":{"default":"created_at","type":"string","enum":["created_at"]},"in":"query","name":"sort_by","required":false,"description":"Field to sort by (default created_at)"},{"schema":{"default":"desc","type":"string","enum":["asc","desc"]},"in":"query","name":"sort_order","required":false,"description":"Sort direction (default desc)"},{"schema":{"type":"string","enum":["not_started","pending","starting","running","waiting","completed","failed","interrupted","stopped","needs_attention"]},"in":"query","name":"status","required":false,"description":"Filter to runs with this status"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"agent_id","required":false,"description":"Filter to runs for this agent"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"user_id","required":false,"description":"Filter to runs owned by this user; non-superadmin callers are scoped to themselves regardless of this value"},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"case_queue_id","required":false,"description":"Filter to runs associated with this case queue"},{"schema":{"type":"string"},"in":"query","name":"source","required":false,"description":"Filter to runs created from this source (e.g. api, schedule)"},{"schema":{"type":"string"},"in":"query","name":"search","required":false,"description":"Full-text search across run titles and case titles"},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"has_issues","required":false,"description":"If true, only return runs that have evaluation issues"},{"schema":{"type":"string","enum":["critical","medium","low"]},"in":"query","name":"issue_severity","required":false,"description":"If set, only return runs whose latest successful evaluation has at least one failing rubric with this severity (critical | medium | low). Implies has_issues; legacy evaluations without severity companion fields do not match this filter."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"since","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"digest_id","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"started_at":{"nullable":true,"type":"string","format":"date-time"},"completed_at":{"nullable":true,"type":"string","format":"date-time"},"status":{"type":"string","enum":["not_started","pending","starting","running","waiting","completed","failed","interrupted"]},"source":{"nullable":true,"type":"string"},"title":{"type":"string"},"run_number":{"type":"number"},"agent_id":{"type":"string","format":"uuid"},"agent_name":{"type":"string"},"build_id":{"type":"string","format":"uuid"},"user_id":{"nullable":true,"type":"string","format":"uuid"},"case_queue_item_id":{"nullable":true,"type":"string","format":"uuid"},"case_queue_id":{"nullable":true,"type":"string","format":"uuid"},"case_queue_name":{"nullable":true,"type":"string"},"case_title":{"nullable":true,"type":"string"},"postponed_to":{"nullable":true,"type":"string","format":"date-time"},"submitted_prompt_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"eval_summaries":{"nullable":true,"type":"object","properties":{"passed":{"type":"number"},"total":{"type":"number"},"final_comment":{"type":"string"},"status":{"type":"string","enum":["ready","unavailable","in_progress"]},"severityCounts":{"type":"object","properties":{"critical":{"type":"integer","minimum":0,"maximum":9007199254740991},"medium":{"type":"integer","minimum":0,"maximum":9007199254740991},"low":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["critical","medium","low"],"additionalProperties":false}},"required":["passed","total","status"],"additionalProperties":false}},"required":["id","created_at","updated_at","started_at","completed_at","status","source","title","run_number","agent_id","agent_name","build_id","user_id","case_queue_item_id","case_queue_id","case_queue_name","case_title","postponed_to","submitted_prompt_count"],"additionalProperties":false}},"total":{"type":"number"}},"required":["data","total"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Runs","deprecated":true},"post":{"operationId":"startRun","tags":["Runs"],"description":"Start a new agent run. Returns immediately with run info - does not wait for completion.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","format":"uuid","description":"The agent ID to run"},"message":{"description":"Optional initial message to start the run with (e.g. a trigger payload or user instruction)","type":"string"},"sandbox_id":{"description":"Optional sandbox ID with pre-uploaded files","type":"string"},"webhook_url":{"description":"Webhook URL to POST events to (human_request, run_completed, run_failed, run_interrupted)","type":"string","format":"uri"}},"required":["agent_id"]}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique run identifier"},"agent_id":{"type":"string","format":"uuid","description":"ID of the agent being run"},"build_id":{"type":"string","format":"uuid","description":"ID of the build being run"},"status":{"type":"string","description":"Current run status"},"source":{"nullable":true,"description":"How the run was initiated","type":"string"},"sandbox_id":{"nullable":true,"description":"The sandbox ID for this run","type":"string"},"started_at":{"nullable":true,"description":"ISO 8601 timestamp when the run started","type":"string"},"completed_at":{"nullable":true,"description":"ISO 8601 timestamp when the run completed","type":"string"},"created_at":{"type":"string","description":"ISO 8601 timestamp when the run was created"},"updated_at":{"type":"string","description":"ISO 8601 timestamp when the run was last updated"},"human_in_the_loop_enabled":{"type":"boolean","description":"Whether this agent can request human input during execution"}},"required":["id","agent_id","build_id","status","source","sandbox_id","started_at","completed_at","created_at","updated_at","human_in_the_loop_enabled"],"additionalProperties":false,"description":"The newly created run"}},"required":["run"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Start Run","deprecated":true}},"/v1/skills":{"get":{"operationId":"listSkills","tags":["Skills"],"description":"List all skills for the current team, including system skills.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique skill identifier"},"name":{"type":"string","description":"Human-readable skill name"},"description":{"type":"string","description":"Short summary of what the skill does"},"team_id":{"nullable":true,"description":"ID of the team that owns the skill, or null for system skills","type":"string","format":"uuid"},"updated_at":{"type":"string","description":"ISO timestamp of the last update"},"updated_by_user_id":{"nullable":true,"description":"User ID of the last person who updated the skill","type":"string"},"updated_by_user_name":{"nullable":true,"description":"Display name of the last person who updated the skill (falls back to email)","type":"string"}},"required":["id","name","description","team_id","updated_at","updated_by_user_id","updated_by_user_name"],"additionalProperties":false},"description":"Skills available to the current team (team and system skills)"}},"required":["skills"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Skills","deprecated":true},"post":{"operationId":"createSkill","tags":["Skills"],"description":"Create or update a skill from a JSON body. The server constructs SKILL.md from the provided fields and stores it. If a skill with the same name already exists in the team, it is updated.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"description":"Skill name. 1-64 lowercase alphanumeric chars and hyphens; no leading/trailing or consecutive hyphens."},"description":{"type":"string","minLength":1,"maxLength":1024,"description":"1-1024 chars describing what the skill does and when to invoke it."},"content":{"type":"string","description":"Markdown body of SKILL.md without YAML frontmatter. The server prepends the frontmatter from the other fields."},"license":{"description":"Optional: license name or reference to a bundled license file.","type":"string"},"compatibility":{"description":"Optional: 1-500 chars describing environment requirements.","type":"string","maxLength":500},"metadata":{"description":"Optional: arbitrary key-value metadata.","type":"object","additionalProperties":{}},"allowed-tools":{"description":"Optional (experimental): space-delimited list of pre-approved tools.","type":"string"}},"required":["name","description","content"]}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique skill identifier"},"name":{"type":"string","description":"Human-readable skill name"},"description":{"type":"string","description":"Short summary of what the skill does"},"team_id":{"type":"string","format":"uuid","description":"ID of the team that owns the skill"}},"required":["id","name","description","team_id"],"additionalProperties":false,"description":"The created or updated skill"}},"required":["skill"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique skill identifier"},"name":{"type":"string","description":"Human-readable skill name"},"description":{"type":"string","description":"Short summary of what the skill does"},"team_id":{"type":"string","format":"uuid","description":"ID of the team that owns the skill"}},"required":["id","name","description","team_id"],"additionalProperties":false,"description":"The created or updated skill"}},"required":["skill"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Short error code"},"message":{"description":"Human-readable error message","type":"string"},"validationErrors":{"description":"Per-field validation errors, present on frontmatter validation failure","type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the invalid field"},"message":{"type":"string","description":"Validation error message for the field"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Short error code"},"message":{"description":"Human-readable error message","type":"string"},"validationErrors":{"description":"Per-field validation errors, present on frontmatter validation failure","type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the invalid field"},"message":{"type":"string","description":"Validation error message for the field"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Short error code"},"message":{"description":"Human-readable error message","type":"string"},"validationErrors":{"description":"Per-field validation errors, present on frontmatter validation failure","type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the invalid field"},"message":{"type":"string","description":"Validation error message for the field"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Short error code"},"message":{"description":"Human-readable error message","type":"string"},"validationErrors":{"description":"Per-field validation errors, present on frontmatter validation failure","type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the invalid field"},"message":{"type":"string","description":"Validation error message for the field"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Skill","deprecated":true}},"/v1/skills/upload":{"post":{"operationId":"uploadSkill","tags":["Skills"],"description":"Create or update a skill by uploading a SKILL.md file or a ZIP archive containing SKILL.md at the root. If a skill with the same name exists in the team, it will be updated.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"team_id":{"type":"string","format":"uuid"}},"required":["id","name","description","team_id"],"additionalProperties":false}},"required":["skill"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"skill":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"team_id":{"type":"string","format":"uuid"}},"required":["id","name","description","team_id"],"additionalProperties":false}},"required":["skill"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"validationErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}}},"required":["error"],"additionalProperties":false}}}}},"summary":"Upload Skill","deprecated":true}},"/v1/clarity-v2/processes":{"get":{"operationId":"listClarityProcesses","tags":["ClarityV2"],"description":"List Clarity processes for the current team, most recently updated first. Returns lightweight metadata (capture counts, contributors, status) suitable for building a picker; the per-process read model is available via `GET /v2/teams/:team_id/clarity-v2/processes/:process_id` for v2 rows and `GET /v2/teams/:team_id/clarity/processes/:id` for legacy v1 rows. Both v1 (legacy) and v2 processes are returned by default; use `search`, `status`, and `version` to narrow discovery. Capped at 100 per page.","parameters":[{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Number of processes per page (1-100, default 50)"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of processes to skip (default 0)"},{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"search","required":false,"description":"Case-insensitive search across process names"},{"schema":{"type":"string","enum":["draft","collecting","generating","generating-current-process","generating-transformation-proposal","review","complete","generation_failed"]},"in":"query","name":"status","required":false,"description":"Filter by process lifecycle status"},{"schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"in":"query","name":"version","required":false,"description":"Filter by Clarity process schema version: 1 legacy, 2 v2"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"processes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","collecting","generating","generating-current-process","generating-transformation-proposal","review","complete","generation_failed"]},"visibility":{"type":"string","enum":["team","restricted"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1 = legacy clarity, 2 = clarity v2"},"capture_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"capture_counts":{"type":"object","properties":{"video":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"interview":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"document":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["video","interview","document"],"additionalProperties":false},"pending_invitation_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"contributors":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"user_name":{"type":"string"}},"required":["user_id","user_name"],"additionalProperties":false}},"created_at":{"type":"string"},"updated_at":{"type":"string"},"created_by_name":{"nullable":true,"type":"string"}},"required":["id","name","status","visibility","version","capture_count","pending_invitation_count","contributors","created_at","updated_at","created_by_name"],"additionalProperties":false}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"offset":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["processes","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Clarity Processes","deprecated":true}},"/v1/files":{"get":{"operationId":"listFiles","tags":["Files"],"description":"List files for the current team.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique file identifier"},"name":{"type":"string","description":"File name (basename)"},"path":{"type":"string","description":"Relative path of the file inside the team's storage"},"created_at":{"description":"ISO 8601 timestamp when the file was created","type":"string"},"updated_at":{"description":"ISO 8601 timestamp of the last update","type":"string"},"metadata":{"description":"File metadata from object storage","nullable":true,"type":"object","properties":{"mimetype":{"description":"MIME type of the file","type":"string"},"size":{"description":"File size in bytes","type":"number"}},"additionalProperties":false}},"required":["id","name","path"],"additionalProperties":false},"description":"Files visible to the current team"}},"required":["files"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Files","deprecated":true},"patch":{"operationId":"renameFile","tags":["Files"],"description":"Rename a file in team storage.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"relativePath":{"type":"string","minLength":1,"description":"Current path of the file relative to the team's storage root"},"newFilenameOnly":{"type":"string","minLength":1,"description":"New file name (no extension; the existing extension is preserved)"}},"required":["relativePath","newFilenameOnly"]}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True if the operation succeeded"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Rename File","deprecated":true}},"/v1/files/create-upload-url":{"post":{"operationId":"createFileUploadUrl","tags":["Files"],"description":"Generate a signed URL for uploading a file directly to GCS.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"description":"Name of the file to upload"},"contentType":{"type":"string","minLength":1,"description":"MIME type of the file"}},"required":["fileName","contentType"]}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"signedUrl":{"type":"string","format":"uri","description":"The signed URL for uploading"},"expiresAt":{"type":"string","format":"date-time","description":"When the URL expires"},"filePath":{"type":"string","description":"The path where the file will be stored"}},"required":["signedUrl","expiresAt","filePath"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create File Upload URL","deprecated":true}},"/v1/files/{*}":{"delete":{"operationId":"deleteFile","tags":["Files"],"description":"Delete a file from team storage.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"*","required":true,"description":"Path of the file to delete relative to the team's storage root"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True if the operation succeeded"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Delete File","deprecated":true}},"/v1/files/download-url/{*}":{"get":{"operationId":"getFileDownloadUrl","tags":["Files"],"description":"Generate a signed download URL for a file.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"*","required":true,"description":"Path of the file relative to the team's storage root"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Signed download URL"},"expiresAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the URL expires"}},"required":["url","expiresAt"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get File Download URL","deprecated":true}},"/v1/files/content/{*}":{"get":{"operationId":"getFileContent","tags":["Files"],"description":"Get the content of a text file.","parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"*","required":true,"description":"Path of the file relative to the team's storage root"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"UTF-8 decoded contents of the file"},"path":{"type":"string","description":"Relative path of the file"},"contentType":{"description":"MIME content type inferred from the file extension","type":"string"}},"required":["content","path"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Get File Content","deprecated":true},"put":{"operationId":"updateFileContent","tags":["Files"],"description":"Update the content of a text file.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"New UTF-8 text content for the file"}},"required":["content"]}}}},"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"*","required":true,"description":"Path of the file relative to the team's storage root"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True if the operation succeeded"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Update File Content","deprecated":true}},"/v1/integrations":{"get":{"operationId":"listIntegrations","tags":["Integrations"],"description":"List the team's integration catalog: built-in integration types plus any custom connection types defined for the team. OAuth authorization flows are browser-based and cannot be performed via this API; use the Duvo dashboard to complete OAuth-based connections.","parameters":[{"schema":{"type":"string"},"in":"query","name":"type","required":false},{"schema":{"default":100,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"provider":{"type":"string"},"user_id":{"nullable":true,"type":"string"},"team_id":{"type":"string"},"server_url":{"type":"string"},"transport_type":{"type":"string","enum":["stdio","sse","http"]},"auth_method":{"nullable":true,"type":"string"},"composio_mcp_id":{"default":null,"nullable":true,"type":"string"},"custom_integration_id":{"nullable":true,"type":"string"},"icon_url":{"nullable":true,"type":"string"},"oauth_provider":{"nullable":true,"type":"string"},"oauth_provider_key":{"nullable":true,"type":"string"},"oauth_scopes":{"nullable":true,"type":"array","items":{"type":"string"}},"has_headers":{"type":"boolean"},"has_oauth_tokens":{"type":"boolean"},"integration_id":{"nullable":true,"type":"string"},"shared":{"type":"boolean"},"created_by":{"nullable":true,"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","type","provider","user_id","team_id","composio_mcp_id","created_at","updated_at"],"additionalProperties":false}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","minimum":1,"maximum":9007199254740991},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["integrations","total","limit","offset"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Integrations","deprecated":true}},"/v1/integrations/custom":{"post":{"operationId":"createCustomIntegration","tags":["Integrations"],"description":"Create a custom integration type (team-level catalog entry) that users can then connect as user-provided MCP connections. Requires manager-or-above role.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"auth_method":{"type":"string","enum":["url","apikey","headers","oauth"]},"server_url":{"type":"string","format":"uri"},"oauth_client_id":{"type":"string","minLength":1},"oauth_client_secret":{"type":"string","minLength":1}},"required":["name","auth_method","server_url"]}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"provider":{"type":"string"},"user_id":{"nullable":true,"type":"string"},"team_id":{"type":"string"},"server_url":{"type":"string"},"transport_type":{"type":"string","enum":["stdio","sse","http"]},"auth_method":{"nullable":true,"type":"string"},"composio_mcp_id":{"default":null,"nullable":true,"type":"string"},"custom_integration_id":{"nullable":true,"type":"string"},"icon_url":{"nullable":true,"type":"string"},"oauth_provider":{"nullable":true,"type":"string"},"oauth_provider_key":{"nullable":true,"type":"string"},"oauth_scopes":{"nullable":true,"type":"array","items":{"type":"string"}},"has_headers":{"type":"boolean"},"has_oauth_tokens":{"type":"boolean"},"integration_id":{"nullable":true,"type":"string"},"shared":{"type":"boolean"},"created_by":{"nullable":true,"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","type","provider","user_id","team_id","composio_mcp_id","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Custom Integration","deprecated":true}},"/v1/connections":{"get":{"operationId":"listConnections","tags":["Connections"],"description":"List the authenticated user's connections (connected integration instances) for the current team. Includes team-shared instances visible to the caller when the org-level Connections sharing setting is on. Filter by integration type with the `type` query parameter.","parameters":[{"schema":{"type":"string"},"in":"query","name":"type","required":false},{"schema":{"default":100,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"provider":{"type":"string"},"user_id":{"nullable":true,"type":"string"},"team_id":{"type":"string"},"server_url":{"type":"string"},"transport_type":{"type":"string","enum":["stdio","sse","http"]},"auth_method":{"nullable":true,"type":"string"},"composio_mcp_id":{"default":null,"nullable":true,"type":"string"},"custom_integration_id":{"nullable":true,"type":"string"},"icon_url":{"nullable":true,"type":"string"},"oauth_provider":{"nullable":true,"type":"string"},"oauth_provider_key":{"nullable":true,"type":"string"},"oauth_scopes":{"nullable":true,"type":"array","items":{"type":"string"}},"has_headers":{"type":"boolean"},"has_oauth_tokens":{"type":"boolean"},"integration_id":{"nullable":true,"type":"string"},"shared":{"type":"boolean"},"created_by":{"nullable":true,"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","type","provider","user_id","team_id","composio_mcp_id","created_at","updated_at"],"additionalProperties":false}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","minimum":1,"maximum":9007199254740991},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["integrations","total","limit","offset"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Connections","deprecated":true},"post":{"operationId":"createConnection","tags":["Connections"],"description":"Create a new user-provided connection (custom MCP server) for the current team. OAuth-based integrations (native, composio) require an interactive browser flow — start them with the dedicated OAuth endpoints (`/v2/teams/:team_id/connections/oauth/native/:provider/start`, `/v2/teams/:team_id/connections/oauth/mcp/start`, or `/v2/teams/:team_id/connections/composio/start`) instead of calling this endpoint directly.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"server_url":{"type":"string","format":"uri"},"type":{"default":"custom_mcp","type":"string"},"provider":{"type":"string","enum":["user"]},"auth_method":{"type":"string","enum":["url","apikey","headers","oauth"]},"custom_integration_id":{"type":"string","format":"uuid"},"headers":{"type":"object","properties":{"plaintext":{"type":"object","additionalProperties":{"type":"string"}},"secret":{"type":"object","additionalProperties":{"type":"string"}}}}},"required":["name","provider","auth_method"]}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"provider":{"type":"string"},"user_id":{"nullable":true,"type":"string"},"team_id":{"type":"string"},"server_url":{"type":"string"},"transport_type":{"type":"string","enum":["stdio","sse","http"]},"auth_method":{"nullable":true,"type":"string"},"composio_mcp_id":{"default":null,"nullable":true,"type":"string"},"custom_integration_id":{"nullable":true,"type":"string"},"icon_url":{"nullable":true,"type":"string"},"oauth_provider":{"nullable":true,"type":"string"},"oauth_provider_key":{"nullable":true,"type":"string"},"oauth_scopes":{"nullable":true,"type":"array","items":{"type":"string"}},"has_headers":{"type":"boolean"},"has_oauth_tokens":{"type":"boolean"},"integration_id":{"nullable":true,"type":"string"},"shared":{"type":"boolean"},"created_by":{"nullable":true,"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","type","provider","user_id","team_id","composio_mcp_id","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Connection","deprecated":true}},"/v1/connections/composio/start":{"post":{"operationId":"startComposioConnection","tags":["Connections"],"description":"Start a Composio-backed connection. Returns a `redirect_url` the user must open in a browser to complete the OAuth handshake (or `null` for non-OAuth schemes like API_KEY when the connection finalizes synchronously). After the user completes the flow, call `/v2/teams/:team_id/connections/composio/finalize` to provision the corresponding Duvo connection.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"auth_config_id":{"type":"string","minLength":1,"description":"Composio auth-config ID for the toolkit. Obtain it from Composio's auth-config catalog or by listing existing configs."},"callback_url":{"type":"string","format":"uri","description":"Where to send the user's browser after they finish the Composio consent screen. Must be an absolute URL."},"auth_scheme":{"description":"Composio auth scheme (e.g. 'OAUTH2', 'API_KEY', 'BEARER_TOKEN'). Required when supplying non-OAuth credentials in `auth_fields`.","type":"string"},"auth_fields":{"description":"Auth field values keyed by field name. For OAuth, these are passed in `connection.data`; for API_KEY/BEARER_TOKEN/etc., these are passed via `connection.state` with the corresponding `auth_scheme`.","type":"object","additionalProperties":{"type":"string"}}},"required":["auth_config_id","callback_url"]}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"redirect_url":{"nullable":true,"description":"Browser URL the user must visit to complete authorization. Null when the connection was completed synchronously (e.g. for API_KEY auth that did not require a browser flow).","type":"string"},"status":{"nullable":true,"description":"Composio connection status (e.g. 'INITIATED', 'ACTIVE', 'FAILED').","type":"string"},"connected_account_id":{"type":"string","minLength":1,"description":"Composio connected-account ID created by this request. Always present — required by `/v2/teams/:team_id/connections/composio/finalize` to bind the new connection to the exact account."}},"required":["redirect_url","status","connected_account_id"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Start Composio Connection","deprecated":true}},"/v1/connections/composio/finalize":{"post":{"operationId":"connectComposioIntegration","tags":["Connections"],"description":"Finalize a Composio-backed connection after the start step (`/v2/teams/:team_id/connections/composio/start`) has produced a `connected_account_id`. Provisions a Composio MCP server bound to that account and persists the connection on the team. Works for both OAuth and non-OAuth start flows. Stale or invalid `connected_account_id`, missing app, or rejected upstream input surfaces as a 4xx via `composioErrorFor`; only genuinely unexpected upstream/persistence failures return 5xx.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app":{"type":"string","minLength":1,"description":"Composio app slug (e.g. 'slack', 'googlesheets'). Must match a Composio toolkit configured for the team."},"integration_name":{"type":"string","minLength":1,"description":"Human-readable name to display for the connection."},"connected_account_id":{"type":"string","minLength":1,"description":"Composio connected-account ID returned by `/v2/teams/:team_id/connections/composio/start`. Used to bind this finalize call to the exact account the user just authorized; without it the wrong account could be picked when the team has multiple Composio accounts for the same app."}},"required":["app","integration_name","connected_account_id"]}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"integration_id":{"type":"string"},"mcp_url":{"type":"string"}},"required":["integration_id","mcp_url"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Connect Composio Integration","deprecated":true}},"/v1/connections/mcp/probe":{"post":{"operationId":"probeMcpServer","summary":"Probe an MCP server for available tools","tags":["Connections"],"description":"Probe an MCP server URL and list the tools it exposes. Useful as a dry-run before creating a connection — verifies the URL is reachable, that authentication headers (if any) are correct, and surfaces the tool catalog. Performs no writes; sits alongside `/v2/teams/:team_id/connections/oauth/mcp/check` (which probes the same URL for OAuth support).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"server_url":{"type":"string","format":"uri","description":"MCP server URL to test"},"headers":{"description":"Optional HTTP headers for authentication","type":"object","additionalProperties":{"type":"string"}}},"required":["server_url"]}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","additionalProperties":{}}},"required":["name"],"additionalProperties":false}},"error":{"type":"string"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true}},"/v1/credentials":{"get":{"operationId":"listSecrets","tags":["Secrets"],"description":"List env-var secrets visible to the caller — team-shared (user_id IS NULL) plus the caller's own personal entries. Returns metadata and env-var keys only; secret values are never exposed.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"user_id":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"service_slug":{"nullable":true,"type":"string"},"env_var_keys":{"type":"array","items":{"type":"string"}},"created_by":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","team_id","user_id","name","service_slug","env_var_keys","created_by","created_at","updated_at"],"additionalProperties":false}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Secrets","deprecated":true},"post":{"operationId":"createSecret","tags":["Secrets"],"description":"Create an env-var secret. Personal by default; pass `shared: true` to create a team-shared secret (requires manager role).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"service_slug":{"nullable":true,"type":"string","minLength":1,"maxLength":64},"shared":{"default":false,"type":"boolean"},"values":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":65536}}},"required":["name","values"]}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"team_id":{"type":"string","format":"uuid"},"user_id":{"nullable":true,"type":"string","format":"uuid"},"name":{"type":"string"},"service_slug":{"nullable":true,"type":"string"},"env_var_keys":{"type":"array","items":{"type":"string"}},"created_by":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","team_id","user_id","name","service_slug","env_var_keys","created_by","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Create Secret","deprecated":true}},"/v1/teams/{teamId}/members":{"get":{"operationId":"listTeamMembers","tags":["Team"],"description":"List members of a team. The authenticated session or API key must be scoped to the requested team.","parameters":[{"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false,"description":"Number of members per page (1-100, default 50)"},{"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"in":"query","name":"offset","required":false,"description":"Number of members to skip"},{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"search","required":false,"description":"Optional case-insensitive name or email search"},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"teamId","required":true,"description":"Team ID"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"nullable":true,"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string"},"inheritedFromOrg":{"default":false,"type":"boolean"}},"required":["id","name","email","role","inheritedFromOrg"],"additionalProperties":false}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["members","total","limit","offset"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"List Team Members","deprecated":true}},"/v1/browser-agent/credentials/{userId}/{teamId}":{"get":{"operationId":"listCredentials","summary":"List credentials for user and team","tags":["Credentials"],"description":"List browser-login credentials visible to the caller for the current team — team-shared (user_id IS NULL) plus the caller's own personal logins. Optionally filter by `domain`. Passwords and OTP secrets are never returned; only metadata flags indicating whether they are set.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"domain","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"userId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"teamId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Credential ID"},"domain":{"type":"string","description":"Domain for the credential"},"username":{"nullable":true,"description":"Username (if any)","type":"string"},"hasEnabledTOTP":{"type":"boolean","description":"Whether TOTP is enabled"},"hasPassword":{"type":"boolean","description":"Whether a password is stored"},"user_id":{"nullable":true,"description":"Owner user id; null when shared with the team","type":"string"}},"required":["id","domain","username","hasEnabledTOTP","hasPassword","user_id"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true},"post":{"operationId":"createCredential","summary":"Create credential","tags":["Credentials"],"description":"Create a browser login. At least one of `password` or `otp_secret` must be provided. Personal by default; pass `shared: true` to create a team-shared login (requires manager role).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":1},"username":{"nullable":true,"type":"string","minLength":1},"password":{"nullable":true,"type":"string","minLength":1},"otp_secret":{"nullable":true,"type":"string","minLength":1},"shared":{"type":"boolean"}},"required":["domain"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"userId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"teamId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string"},"username":{"nullable":true,"type":"string"},"password":{"nullable":true},"otp_secret":{"nullable":true},"user_id":{"nullable":true,"type":"string"},"team_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","domain","username","password","otp_secret","user_id","team_id","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true}},"/v1/browser-agent/credentials/{userId}/{teamId}/{id}":{"get":{"operationId":"getCredential","summary":"Get credential by id","tags":["Credentials"],"description":"Get a browser login by id. Returns the encrypted password/otp_secret blobs — only the owner or team members can access it.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"userId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"teamId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string"},"username":{"nullable":true,"type":"string"},"password":{"nullable":true},"otp_secret":{"nullable":true},"user_id":{"nullable":true,"type":"string"},"team_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","domain","username","password","otp_secret","user_id","team_id","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true},"patch":{"operationId":"updateCredential","summary":"Update credential by id","tags":["Credentials"],"description":"Update a browser login by id. At least one of password or otp_secret must remain set after the update. Editing a team-shared login or toggling sharing requires manager role.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":1},"username":{"nullable":true,"type":"string","minLength":1},"password":{"nullable":true,"type":"string","minLength":1},"otp_secret":{"nullable":true,"type":"string","minLength":1},"shared":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"userId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"teamId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string"},"username":{"nullable":true,"type":"string"},"password":{"nullable":true},"otp_secret":{"nullable":true},"user_id":{"nullable":true,"type":"string"},"team_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","domain","username","password","otp_secret","user_id","team_id","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true},"delete":{"operationId":"deleteCredential","summary":"Delete credential by id","tags":["Credentials"],"description":"Delete a browser login by id. Deleting a team-shared login requires manager role.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"userId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"teamId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string","nullable":true,"enum":[null]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"deprecated":true}},"/v1/connections/oauth/native/{provider}/start":{"post":{"operationId":"startNativeOAuth","tags":["Connections"],"description":"Start an OAuth-based connection with a native provider (Gmail, Google Sheets, Outlook, etc.). Returns an authorization URL that must be opened in a browser by a human end-user; once they grant consent, Duvo creates the matching connection and redirects the browser to the optional `return_url` (or the Duvo dashboard if none is provided). Poll `/v2/teams/:team_id/connections` to detect the new connection.","requestBody":{"required":true,"content":{"application/json":{"schema":{"default":{},"type":"object","properties":{"return_url":{"description":"Where to send the user's browser after OAuth completes.","type":"string"}},"additionalProperties":{"type":"string"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"provider","required":true,"description":"OAuth provider slug (e.g. 'google', 'gmail', 'googlesheets', 'outlook'). Must match a configured native OAuth provider."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"authorization_url":{"type":"string","description":"OAuth provider authorization URL to open in a browser"}},"required":["authorization_url"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Start Native OAuth","deprecated":true}},"/v1/connections/oauth/mcp/start":{"post":{"operationId":"authorizeMcpOAuth","tags":["Connections"],"description":"Start an OAuth-based connection with a remote MCP server using Dynamic Client Registration. Returns an authorization URL the user must open in a browser; once they grant consent, Duvo creates the matching connection and redirects the browser to the optional `returnUrl`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mcp_server_url":{"type":"string","format":"uri","description":"URL of the MCP server requiring OAuth."},"name":{"type":"string","minLength":1,"description":"Human-readable name to display for the connection."},"custom_integration_id":{"description":"Optional ID of a custom integration this connection should be associated with.","type":"string","format":"uuid"},"return_url":{"description":"Where to send the user's browser after consent completes. Accepts an absolute URL on a domain Duvo allows, or a path relative to the Duvo frontend (e.g. `/integrations/slack`).","type":"string"},"integration_type":{"description":"Optional integration type label.","type":"string"}},"required":["mcp_server_url","name"]}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"authorization_url":{"type":"string","description":"OAuth provider authorization URL to open in a browser"}},"required":["authorization_url"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"summary":"Authorize MCP OAuth","deprecated":true}}},"servers":[{"url":"https://api.duvo.ai","description":"Production server"}],"tags":[{"name":"Runs","description":"Start, monitor, and manage agent runs (Jobs in the Duvo UI)"},{"name":"Sandboxes","description":"Create sandboxes and upload files for agent runs"},{"name":"Case Queues","description":"Manage case queues and their agent bindings"},{"name":"Cases","description":"Create, list, and manage cases and their labels within queues"},{"name":"Case Approvals","description":"Submit decisions on pending case approval requests issued by an agent run"},{"name":"Agents","description":"Create and manage agents (Assignments in the Duvo UI) for automation workloads"},{"name":"Revisions","description":"Create and manage agent revisions — the underlying Setup for an Assignment"},{"name":"Agent Folders","description":"Organize agents (Assignments in the Duvo UI) into folders"},{"name":"Agent Memory","description":"Read an agent's memory files (the Memory feature in the Duvo UI)"},{"name":"Suggestions","description":"List, apply, and dismiss an Agent's improvement suggestions (the suggestions inbox in the Duvo UI)"},{"name":"Schedules","description":"List schedules configured for an agent (Assignment in the Duvo UI)"},{"name":"Case Triggers","description":"Configure case triggers that automatically dispatch agent runs (Jobs in the Duvo UI) for cases added to a queue"},{"name":"Triggers","description":"Configure event triggers that start a Job automatically when an external event fires (e.g. an email arrives, a Linear issue is created, or a file changes in Google Drive)"},{"name":"MCP","description":"MCP JSON-RPC endpoint exposing public API routes as LLM-callable tools"},{"name":"Skills","description":"Manage team and system skills (reusable knowledge packs)."},{"name":"Files","description":"Manage team files."},{"name":"Plugins","description":"Discover plugins that can be referenced from a revision."},{"name":"Team","description":"Inspect the team and members associated with the API key"},{"name":"Integrations","description":"Browse the team's catalog of available integration types"},{"name":"Connections","description":"Manage your connected integrations"},{"name":"Credentials","description":"Manage browser logins (domain + username + password + TOTP) used by the browsing agent to log into websites, and attach them to assignment revisions"},{"name":"Secrets","description":"Manage env-var secrets injected into jobs, and attach them to assignment revisions. Only metadata is exposed; values are never returned"},{"name":"Revision Integrations","description":"Attach integrations to assignment revisions, pin specific connections, and link case queues"},{"name":"ClarityV2","description":"Manage Clarity v2 process snapshots, transformation proposals, and the extra-capture-request follow-up loop"}]}